Cancel, pause restart Handle in SpringBoot

Hi there,
We are building SpringbootApplication using org.flowable:flowable-spring-boot-starter-process-rest:6.4.1"

We created *.bpmn20.xml with multiple asynch Service Tasks .

Now we want to have a capability to Cancel or Pause the execution of a process on demand.

We have also deployed flowable-*.war files in the tomcat . After we trigger Springboot Application through postman and go to flowable-admin war application , Process Engine --Definitions–>Process Instances , we can see one of the process instance is active . But we are not able to see what specific task it is executing at that moment (the Tasks tab is empty) or any handle to Cancel or pause the flow.

What is the best way of doing that ? Can we achieve that through flowable-admin application? Also is there possibility of building end points in Springboot for these handles (cancel/pause/restart etc)

Appreciate any suggestion.

There are Java APIs and REST endpoints to do most if not all of what you are asking for. Look in the runtime service for most of these behaviors on the Java API side. The flowable-rest app contains the swagger docs, I usually keep and instance around in a docker container for reference like so:

docker run --name flowable-rest-docs -p 8888:8080  flowable/flowable-rest

Because that command exposes the container at port 8888 on the localhost you can then go to http://localhost:8888/flowable-rest/docs/ and see the docs.

The same REST endpoints that flowable-rest uses are available by including the flowable-spring-boot-starter-rest dependency. If you look at the source of the rest app, you’ll see its mostly just the starter plus security configuration and swagger documentation. The flowable-admin app uses these endpoints to do all of it’s work, but I don’t think suspending/activating a process is one of its features.

A note on suspending a task: Suspending a running process can get complicated. It does not interrupt running code, like service tasks, but it does mark the process as suspended. When the service task returns, it will see that the process has been updated and throw and optimistic lock exception. When the exception gets thrown the transaction will get rolled back to the previous wait state.