Community

SubProcess signaling issue

reply from HuiSheng Xu in jBPM Development - View the full discussion

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

Start a new discussion in jBPM Development at Community