[jBPM] - MultipleInstances Task ends entire workflow
by davesomebody
davesomebody [http://community.jboss.org/people/davesomebody] created the discussion
"MultipleInstances Task ends entire workflow"
To view the discussion, visit: http://community.jboss.org/message/615029#615029
--------------------------------------------------------------
Hi,
I have been puzzling through some confusing behavior experienced in jBPM 5.1 which I did not see in jBPM 5.0.
Specifically what I see is when the first iteration of a Multiple Instances task hits the end node in the multiple instances sub-flow the entire process is terminated.
I have verified this from stepping through the debugger and instrumenting my session with a listener to see which tasks are triggered, terminated etc. What I see is a single iteration through the sub-flow in the mulitple instances graph followed by each subsequent iteration triggering but the process terminating before the other iterations even get started down their path.
I'm not setting up the flow any different than I would have in jBPM 5.0.
Also, in jBPM 5.0 I noticed that Custom Tasks did not behave properly in jBPM 5.0, worked around by using a re-usable subflow task. When stepping through in the debugger I see that subsequent iterations through the sub-flow seem to thing the custom task has triggered already. Anybody know if this has been addressed in 5.1?
Still a big supporter!
Dave
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/615029#615029]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 9 months
[jBPM] - Re: How to finish the processInstance
by Kris Verlaenen
Kris Verlaenen [http://community.jboss.org/people/KrisVerlaenen] created the discussion
"Re: How to finish the processInstance"
To view the discussion, visit: http://community.jboss.org/message/613297#613297
--------------------------------------------------------------
This all seems to be normal.
Why do you think that the processInstance is still active in this case?
If you do ksession.getProcessInstance(id) after completing the user task, do you get a process instance in state active? Or null?
Or are you looking at the processInstance variable in this case? As the processInstance variable in your code is a snapshot of the state of the process instance after starting it. Note that this process instance is disconnected, meaning that it will not update when the state of the process instance in the engine is updated. To get an updated state, you need to do ksession.getProcessInstance(id) again. In this case, this should return null, as the process instance has completed.
Kris
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/613297#613297]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 9 months