cancel
Showing results for 
Search instead for 
Did you mean: 

deleteProcessInstance and sync serviceTask

andrasnaszrai
Champ in-the-making
Champ in-the-making
Hi,

I am using activiti with bpmns containg only service tasks without the activiti:async="true" setting. Based on my experiences this means that activiti will not store any information about my process instance until the first service task is done.

I am trying to make it possible for my processes to be cancelled and i am using the deleteProcessInstance method of RuntimeService. This method requires the processInstanceId of the process instance i want to cancel, and this can be acquired the soonest by using an execution listener for start events, and that is before the first service task. But even if i have the processInstanceId the deleteProcessInstance cannot cancel the process before it is stored in the database. Is that correct?

So provided that my first service task cannot be made activiti:async, because seemingly this introduces a considerable latency in the execution time, my process cannot be interrupted before the first service task ends.

Am i correct about all this, or am i missing something? Is there another way to cancel a process or maybe shorten the latency of activiti:async (it can be minutes based on my experiences)?

Thanks in advance for your support!

Br,
Andras
1 REPLY 1

trademak
Star Contributor
Star Contributor
Your question if cancelling is only possible after the process instance is persisted, yes it is. The best solution would be to use activity:async="true" and in 5.17.0 with the new async executor the overhead is minimal. So that would be the best way to deal with this requirement to my opinion.

Best regards,
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.