Is there really no one on this forum who can answer my question?
Does a processInstance.end() cancel the process immediately? Or does it take effect when the currently processing node ends?
This makes a big difference to me, because I have nodes with actions that can run more than an hour.
There is a process-end event which (afaik) can be put on the process-definition itself. I would assume (but then again, i am not the expert) that that event would be called when the process ends. Even if it was via the processInstance.end() method. On that event you could call your own action.
I'd like to stress some thing though. This project is open source. If you look at the source of ProcessInstance.end() you'd see the following:
et voila.... give it a try and you would not have had to wait 2 days for an answer.