I'm looking for a way to start/stop/resume a process instance in flowable. In the docs I haven't find anything. All I've found are the operations for start/suspend a deployment process.
Runtimeservice does not have start/suspendProcessByInstanceXXX, at least for what I've found. Are there ways to achieve this?
I don't want to delete running process and then restart, I want to suspend it.
Asked
Active
Viewed 3,096 times
2

Usr
- 2,628
- 10
- 51
- 91
1 Answers
2
You can achieve this by calling suspendProcessInstanceById() method in RuntimeService which Suspends the process instance with the given process instance id. read more...

Sherif Abdelkhaliq
- 150
- 5
-
Hi, thank you. If I want to restart it again, if I use startProcessInstanceById() it resumes the process from where it was suspended or does it restart from the beginning (i.e. creating a new process instance) ? – Usr Apr 26 '19 at 10:02
-
1startProcessInstanceById() always starts new process instance... to restart the process without closing current instance don't use suspend otherwise use an exclusive gateway with one flow pointing to the first task of the process and the other flow to the end event of the process – Sherif Abdelkhaliq Apr 27 '19 at 12:29
-
But by using an exclusive gateway can I control the suspend/resume action externally? – Usr Apr 29 '19 at 08:32
-
sure, you can add execution listener to exclusive gateway definition and add your custom logic and use execution parameter to access process instance. – Sherif Abdelkhaliq Apr 29 '19 at 08:38