cancel
Showing results for 
Search instead for 
Did you mean: 

Cancel process instance started as a CallActivity

aveltens
Champ in-the-making
Champ in-the-making
Hello,

how can I cancel a process instance programmatically? I have read that i just could delete the process instance via runtime service, but this leads to problems, when the intance was started as a CallActivity: The parent process is then "stuck" at the CallActivity node and does not continue.

Is there a way to handle the deletion of the called process in the parent process? How can the parent process be continued? Or is there another/better way to cancel a process instance?

Thanks in advance and kind regards!
4 REPLIES 4

saatsch
Champ in-the-making
Champ in-the-making
Hey

this would be very interesting, we are facing the same problem.

Greets,
saatsch

aveltens
Champ in-the-making
Champ in-the-making
We modelled a "StartSubProcess" process that uses a Service-Task to start a process programmatically. To start a sub process we start this "StartSubProcess" via callactivity instead of the actual process we want to start. The actual procress ist started programmatically with the Java-Activiti-API in the service task, so that it is no real sub-process.

To cancel this "sub-process" we just delete it and afterwards signal the "StartSubProcess" which is in a wait state, so that it moves on and the acutal parent process (which called the "StartSubProcess") is continued.

It's not a simple solution, but it works fine, and since we had no choice we implemented it that way. Hopefully activiti will implement a better way to cancel a sub-process in near future.

pfeiffer
Champ in-the-making
Champ in-the-making
Is there already a solution for this problem ?

jbarrez
Star Contributor
Star Contributor
I haven't tried it yet, but I'm thinking using events (terminate end event/signal/…) might be the way to go here….

(again, not tested yet!)