0
votes

I've implemented a custom workitemhandler which I want to complete only by an external REST call. Therefore the items executeWorkItem() method does NOT call manager.completeWorkItem(workItem.getId(), results); at the end, which is perfectly ok. I've also assigned a signal event to this workitem in my process, which is also called by an external REST call. Both things work as expected, but what I do not understand is that every time I signal the work item, it also automatically completes the work item, which leads to the problem that the process continuous with its regular path AND the signaled one. But the reason for the signal is to interrupt the process to follow ONLY the signaled path path.

The process image to this can be found here http://cl.ly/image/0F3L3E2w2l0j. In this example I signaled the "Fail Transfer" but the rest gets also executed even nothing completed the workitem.

I'm using jBPM 6.1 Final.

Thanks in advance for any help.

1
The signals property "CancelActivity" is also set to true. Doesn't this flag tell the engine to cancel the activity if the signal gets called?Florian

1 Answers

0
votes

Nevermind, I found the reason for this behavior. The custom work item handler implemented

public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
        manager.abortWorkItem(workItem.getId());
    } 

After removing manager.abortWorkItem(workItem.getId());, the process behaves as expected.