This content has been marked as final.
Show 7 replies
-
1. Re: expression question
kukeltje Aug 16, 2009 8:09 AM (in response to freak182)The expressions are 'EL' (JUEL) so any tutorial you can find about that is applicable here.
The expression should return the NAME of the transition to take. Not a boolean.
Booleans are needed it you put conditions ON the transitions -
2. Re: expression question
freak182 Aug 16, 2009 10:30 PM (in response to freak182)Hello,
I change my expression to:<decision name="Collateral" expression='#{ collateral > 0 }'> <transition to="fork1" name="true"></transition> <transition to="NO_COLLATERAL" name="false"></transition> </decision> final Map<String, Serializable> param = new HashMap<String, Serializable>(); param.put("collateral", new Integer(1));
and it work fine. Now I am just confused that i cannot use string comparisson in expression? please advice.
Thanks a lot.
Cheers. -
3. Re: expression question
chebancabpm Aug 17, 2009 4:35 AM (in response to freak182)"freak182" wrote:
Hello,
I change my expression to:<decision name="Collateral" expression='#{ collateral > 0 }'> <transition to="fork1" name="true"></transition> <transition to="NO_COLLATERAL" name="false"></transition> </decision> final Map<String, Serializable> param = new HashMap<String, Serializable>(); param.put("collateral", new Integer(1));
and it work fine. Now I am just confused that i cannot use string comparisson in expression? please advice.
Thanks a lot.
Cheers.
Hello,
in my opinion this syntax is more readable:<decision name="Collateral" expression='#{ collateral == "true" ? "true" : "false" }'> <transition to="fork1" name="true"></transition> <transition to="NO_COLLATERAL" name="false"></transition> </decision>
The expression-based decisions must return a transition name. -
4. Re: expression question
freak182 Aug 17, 2009 5:10 AM (in response to freak182)Hello,
I also already try that one but no luck. :)
Thanks. -
5. Re: expression question
kukeltje Aug 17, 2009 5:42 AM (in response to freak182)what version are you using?
-
6. Re: expression question
freak182 Aug 17, 2009 7:14 AM (in response to freak182)Hello,
using v 3.2.x -
7. Re: expression question
kukeltje Aug 17, 2009 7:18 AM (in response to freak182)Can you try with the latest 3.2.6SP1? Not that you should use that, I'm just curious if it works as it should with the latest 3.2 version (it does for me)
Or try change the names of the transitions to not use 'true' and 'false' but e.g. 'to_fork1' and 'to_no_collateral'