我的路线中有一个属性。我想在选择/何时更改此属性的值。我怎么能在我的路线上这样做?
<route>
<setProperty propertyName="UpdateORInsert">
<constant>INSERT</constant>
</setProperty>
<choice>
<when>
------Change value of UpdateORInsert-------
</when>
</choice>
</route>
答案 0 :(得分:0)
It can be done using simple component in your route inside `when`:
<route>
<setProperty propertyName="UpdateORInsert">
<constant>INSERT</constant>
</setProperty>
<choice>
<when>
<simple>${Yourspecificcondition}</simple>
<setProperty propertyName="UpdateORInsert">
<constant>UPDATE</constant>
</setProperty>
</when>
</choice>
</route>