JBoss Community

Re: Service Task + Error Boundary Event ?

created by wishmaster7 in jBPM - View the full discussion

well... I have found a way to trigger the boundary event, it works this way :

 

String serviceTaskId = "ServiceTask_1";

String errorCode = "Error";

ksession.signalEvent("Error-"+serviceTaskId+"-"+errorCode, "", processInstance.getId());

 

BUT...

 

if I am in a sub-process, the "Fail" node is triggered, but the sub-process is not completed => we don't reach the next node in the parent process.

 

the boundary event has an attribute:  cancelActivity="true" . but it seems the process is still waiting for something to happen in the sub-process. and I haven't been able to manually abort the service task (not even sure if it's the solution).

 

I've also tried with a "Terminate Definition" on the "Fail" node, it doesn't solve the problem.

 

 

does someone has an idea of what I should do ?

Reply to this message by going to Community

Start a new discussion in jBPM at Community