Cancel process with infinite loop inside service task

Hi!

I’m new to Flowable so I could need some help. I searched trough but did’t find an answer.
My case:
I have a simple process made in Flowable modeler that looks like this:
Capture

When I start the process inside Flowable task it runs as expected. But when I cancel the process it finishes in Flowable task. But when I look inside the logs I see it is still going on. What could be the problem?

How to implement an infinite loop that can be terminated trough “Cancel process” button?
Thanks in advance.

Regards,
Ivan

That’s not possible: cancelling can only be done when a process instance is in a wait state. In this case, the process instance will run, most likely until the database transaction times out.

The upcoming release has support for ‘Future JavaDelegates’, which would allow to stop (however, we haven’t exposed it yet on the cancel). See more details here: https://blog.flowable.org/2020/08/06/true-parallel-service-task-execution-with-flowable/

Thank you very much on this answer! :slight_smile: