[jboss-user] [jBPM] - Propagation of ABORT state in Sub process to parent.
Joao Schim
do-not-reply at jboss.com
Wed Nov 2 08:12:26 EDT 2011
Joao Schim [http://community.jboss.org/people/jschim] created the discussion
"Propagation of ABORT state in Sub process to parent."
To view the discussion, visit: http://community.jboss.org/message/634591#634591
--------------------------------------------------------------
Hi all,
We are using drools/jBPM5 as part of our long term preservation experiment (here at the dutch national library) which purpose is to analyse and reject or store digital publications. The problem that we are facing currently is that the whole process is getting quite enormous and we 've decided to split it up into various subprocesses. We now have about 16 subprocesses / .rf files. The thing is that when we detect a deficiency in the publication and/or the metadata we 'reject' the publication and abort the process. Inside a subprocess the abort however is never propagated to the parent process and the latter will continue the process even while the abort was raised in the childprocess, causing all kinds of unexpected behaviour.
To cope with this we've created a custom extension on the SubProcessNodeInstance and registered this with the NodeInstanceFactoryRegistry.
The difference with the original instance is that when the child process gets in an ABORTED state this state is propagated to the parent process instance.
in code:
} else if (processInstance.getState() == ProcessInstance.STATE_COMPLETED) {
handleOutMappings(processInstance);
triggerCompleted();
} else if (processInstance.getState() == ProcessInstance.STATE_ABORTED) {
handleOutMappings(processInstance);
getProcessInstance().setState(ProcessInstance.STATE_ABORTED);
Another solution would be to use the output mapping of the subprocess node and use a variable for this. but injecting split joins attached to end node's on every subprocess node would be very cumbersome for our situation, not making the process definition more readable.
I would like to hear whether the approach we've taken is sensible. does it align with the underlying fundamentals of BPMN ? would a JIRA issue to implement such a change make sene ?
Please share your opinion on this approach.
Thanks in advance..
Joao
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/634591#634591]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111102/43a7d0a7/attachment.html
More information about the jboss-user
mailing list