Hello,
I have following scenario.
I have process that sometimes creates subprocess. The subprocess has several async actions
(I call ESB service). The super process checks result value of the subprocess and
according that value the superprocess continues.
I sometimes want to end superprocess prematurely with possible running subprocess. And
that causes problems. The superprocess instance receives end, it ends root token and after
that it ends the subprocess instance. After the subprocess instance ends, subprocess
signals token of the superprocess which has been ended already, and that is wrong.
I have made following change to the org.jbpm.graph.exe.ProcessInstance
I have changed method ProcessInstance.end() slightly.
| public void end() {
| // if the subproces does not exist, end root token
| if (rootToken.getSubProcessInstance() == null) {
| rootToken.end();
| .... the code is unchanged
| } else
| // if subprocess instance exists, only end subprocess. The subprocess will signal
this process later
| rootToken.getSubProcessInstance().end();
| }
|
It is important that I check result value of sub process (I have special variable). If the
subprocess is ended prematuraly, I read the result value (it's not set) and the
superprocess can do what ever action I can. And moreover I can be sure that subprocess
ends before the super process.
What do you think? It could be new feature request...
Regards
Pavel
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168338#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...