cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop a process instance

akanyilmaz
Champ in-the-making
Champ in-the-making
Hi,

I want to stop a process instance after a specified service task executed. Is there any way to stop an execution?

Thanks
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Are you kidding? Isn't adding an end-event after the service-task do the trick? You should just model this behavior in your process…

akanyilmaz
Champ in-the-making
Champ in-the-making
I am sorry. I mean is not that. I don't want to stop, i just want to pause an execution. maybe later i will continue this execution.

frederikherema1
Star Contributor
Star Contributor
Add a receive-taks in the process right after the ervice-task. The process will stop flowing (paused if you wish):

http://activiti.org/userguide/index.html#bpmnReceiveTask

Later on, if you can't to continue the process, just signal it:

runtimeService.signal(execution.getId());