This content has been marked as final.
Show 3 replies
-
1. Re: Decision node & expressions - this is not working
dhartford Mar 27, 2006 4:10 PM (in response to dhartford)Sorry, jbpm-3.1 starter kit.
-
2. Re: Decision node & expressions - this is not working
saviola Mar 28, 2006 2:06 AM (in response to dhartford)Hi dhartford (How do you pronounce this name :()!
I would suggest you give more sensible mapped name to the variable you are using in the condition expression and use this name instead.
Also try using contextInstance object for accessing the variable instead of executionContext.<task-node name="getinfo"> <task name="getinfo" swimlane="swimlane1"> <controller> <variable name="decinfo" access="read,write,required" mapped-name="decisionVariable"/> </controller> </task> <transition name="fdfsfds" to="myfirstdecnode"></transition> </task-node> <decision name="myfirstdecnode"> <transition name="tr1" to="itask"> <condition>decisionVariable == 'I'</condition> </transition> <transition name="tr2" to="etask"> <condition>decisionVariable == 'E'</condition> </transition> <transition name="tr3" to="ctask"> <condition> contextInstance.getVariable("decisionVariable").toString().equalsIgnoreCase("C") </condition> </transition> </decision>
By the way do you know that you can use variable to define which is the next transition you want to take:<transition name="to tn1" to="tn1"> <condition expression="#{contextInstance.variables['Bla'] eq 'alabalAportokala'}"/> </transition>
I suppose you have already set the variable like this for example:<event type="node-leave"> <script> <variable name="Initiator" mapped-name="Bla"/> <expression> executionContext.setVariable("Bla", "alabalAportokala"); </expression> </script> </event>
I hope this could be usefull.
Regards, Saviola -
3. Re: Decision node & expressions - this is not working
dhartford Mar 28, 2006 8:21 AM (in response to dhartford)Hi Saviola,
Thanks, using the expression="" format (JSP EL?) worked when the other expressions did not. I may have been using older examples.
I use the mapped-name more as a label (i.e. webapp), so that may be part of my previous problem.
-D