There still seems to be no answer to this. When reading through the documentation and looking at the sample code, there isn't anything pointing out how to abort a workflow. In fact if you follow, what I regard as the straight forward solution (listed below) the flow isn't interrupted at all.
I have a flow with two tasks that each is mapped to a WorkItemHandler. If I in my first WorkItemHandler implementation call
workItemManager.abortWorkItem(workItem.getId());
I would assume that the second handler would not be called - but it does. Actually the whole flow is completed.
Can someone explain how to abort a workflow and when the above method call is useful, if not for exactly that?
Do I need to add other elements to my bpmn 2.0 flow? I have one start event, two tasks and one end event. All connected in a lineary fashion.