cancel
Showing results for 
Search instead for 
Did you mean: 

Boundary Events on Java Delegates or Subprocess seem broken

mfaulkner
Champ in-the-making
Champ in-the-making
I have two parallel (async) flows within a subprocess, with a boundary event on the subprocess and a long running Java service.
The top branch begins its task and then the lower branch begins and transitions to the error event. All are based on the same error code.

When the long running service completes, it always takes the transition to step 2, even though all boundary events are marked to cancel the activity.
I would have expected the long running service to at least take the error transition. Is this a defect or a misunderstanding on my part?

[attachment=0]MyProcessWithBoundaryEvent.bpmn20.png[/attachment]
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
You can't have boundry-events on a service-task (or at least, activiti can't cope with this). it only works on scopes (subprocess) and wait-state activities (usertaks, receive task). If the service-tasks throws a BPMNError, the subprocess-catching boundary-event will catch the error and cancel the whole subprocess, no need to declare a throwing event on the service-task, since you probably throw the BPMNError in code…

mfaulkner
Champ in-the-making
Champ in-the-making
Thanks for the clarification. The modeler could be improved to prevent one from making this attachment. I'm waiting for 5.10 to come out as throwing a BPMN error in 5.9 does not get handled properly.