When task has interrupting event then only when finishing can “get” status about this task (ClientStatusException).
It’s possible implement getStatus() method to query task status?
Example if we have a long, multi step process, that we can’t split (not worth it) in BPMN, we can check task status, and if it’s already cancelled we stop our process too.
Or can we get some extra informations via ActivatedJob
currently, there is no way to query the job status. You only know that the job is canceled then the complete job command is rejected.
Splitting the long-running task into multiple steps in the workflow is your best option if the task should be canceled.
However, you could use the exporter API to see when a job is canceled. Then, the exporter can send a notification to the worker to cancel the task execution. There are some community projects which could cover this case, for example, using the Hazelcast exporter.