I'd like to implement the ability to terminate the process instance at any user task of my jbpm project. I know that I should theoretically be able to do this with a termination end event attached to any task in my workflow, but this seems like a bad solution to have so many terminate events.
Is there a better, more efficient, more readable way to do this?
I don't know if this is better, but you can do this:
kcontext.getProcessInstance().signalEvent("terminate",null);
where "terminate" is the signal's name catched by your Signal Event. Here you can see a approach: http://s7.postimg.org/p6ktmvz0r/Screen_Shot_2015_01_18_at_19_45_48.png