-
1. Re: Decision -> select path
masipu Aug 22, 2007 3:00 AM (in response to masipu)update to problem:
If i don't use the join node (well, even if i do use this happens), both paths are still ran.<decision name="DecisionThing"> <event type="node-enter"> <action name="ResolveDecision" class="com.eventizer.actionhandlers.ResolveTransition"> <nodeName>SomeName</nodeName> </action> </event> <transition name="0" to="Zero"></transition> <transition name="1" to="One"></transition> </decision> <state name="Zero"> <event type="node-enter"> <action name="DoSomething" class="com.eventizer.actionhandlers.Some"> </action> </event> <transition name="" to="End process"></transition> </state> <state name="One"> <event type="node-enter"> <action name="DoSomethingElse" class="com.eventizer.actionhandlers.SomeElse"> </action> </event> <transition name="" to="End process"></transition> </state>
So here, I want to either run Zero or One, not both. -
2. Re: Decision -> select path
masipu Aug 22, 2007 6:08 AM (in response to masipu)I made more research with this problem.
It seems, that when the process ends, it executes the second node - the not selected path (the one I didn't go to from decision). The reason it executes the not selected is that it is the default transition from decision node.
I made a test case that simplified this (decision node and two child nodes so that depending on selection and transition, it printed different string to console) and after I went to end state, it ran the default transition of decision node. If I chose the default transition, it was executed twice, if I chose the second transition, both were executed.
decision
/ \
node 1 node2
\ /
end state
So the question remains, why it executes the default transition after i go to end state? -
3. Re: Decision -> select path
vorsorge Aug 22, 2007 6:57 AM (in response to masipu)For me this seems to be rather a problem in the implemented handlers than in jBPM itself.
I think there are some code lines where you signal the process:
pInstance.signal()
Are you sure that you don't call this twice?
Martin -
4. Re: Decision -> select path
masipu Aug 22, 2007 7:29 AM (in response to masipu)Thanks mate! The problem wasn't with signalin but using the handler. I had ACTIONhandler in action node-enter where I used leaveNode method rather than DecisionHandler. It's fixed now. Sorry for my stupidness :)