HuiSheng Xu [
http://community.jboss.org/people/rebody] replied to the discussion
"SubProcess signaling issue"
To view the discussion, visit:
http://community.jboss.org/message/544966#544966
--------------------------------------------------------------
Hi Maceij,
It is a very common problem when we use sub-process, because there is no way to get a
sub-process from it's super-process.
Consider about which of using is better:
1.
//
// Is there any risk for a session already closed exception?
//
ProcesssInstance subProcessInstance = execution.getSubProcessInstance();
if (subProcessInstance != null) {
executionService.signalExecutionById(subProcessInstance.getId());
}.
2.
String subProcessInstanceId = execution.getSubProcessInstanceId();
if (subProcessInstanceId != null) {
executionService.signalExecutionById(subProcessInstanceId);
}
3.
if (execution.hasSubProcessInstance()) {
executionService.signalExecutionById(execution.getSubProcessInstanceId());
}
4.
// Don't like this way, need to add too much methods in API.
executionService.signalSubProcessInstance(executionId);
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/544966#544966]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]