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