-
1. Re: EL Condition failing
falazar Mar 28, 2007 10:29 AM (in response to falazar)Definition Fragment Repost:
<decision name="Approve Test 1">
<transition name="continue" to="Pending PR > 1000">
<condition><![CDATA[#{amount > 1000}]]></condition>
</transition>
<transition name="approve" to="Approved PR">
<condition><![CDATA[#{amount <= 1000}]]></condition>
</transition>
</decision> -
2. Re: EL Condition failing
falazar Mar 28, 2007 10:29 AM (in response to falazar)<decision name="Approve Test 1"> <transition name="continue" to="Pending PR > 1000"> <condition><![CDATA[#{amount > 1000}]]></condition> </transition> <transition name="approve" to="Approved PR"> <condition><![CDATA[#{amount <= 1000}]]></condition> </transition> </decision>
-
3. Re: EL Condition failing
dslevine Mar 28, 2007 3:22 PM (in response to falazar)Without having looked at the JBPM source code in this section, it looks like its doing a Double to Long comparison and getting an error. Would
#{ amount > 1000.00 }
make a difference? Or something like
#{ amount > (Double) 1000.00 }
? (i'm not sure of the syntax of casting in EL.)
d -
4. Re: EL Condition failing
dslevine Mar 28, 2007 3:25 PM (in response to falazar)re-reading the error message, it looks like it uses the right half of the expression to determine the type, and then attempts to convert the left half to that type. (check the source code to confirm.) so I'd still suggest the same plan -- figure out how to make the right side of the equation a double.
And please post your eventual solution for others to see who might need to do this eventually. -
5. Re: EL Condition failing
kukeltje Mar 28, 2007 3:32 PM (in response to falazar)You need to put a converter on in the jsf page if the variable is not initialized in java code as a Long/Int/whatever before it is firstly used in a page. For this reason I'd like to have the type in the definition as well.