cancel
Showing results for 
Search instead for 
Did you mean: 

Process stuck in timerEvent after rollback

remibantos
Champ in-the-making
Champ in-the-making
Hello,

After a disk space issue in my Activiti server, I've noticed that a lot of business processes transactions had been rollbacked.
I use Activiti REST API, and i've added a timerEvent with a delay at the very begining of each business processes, to emulate an asynchronous call when starting active business processes through API.
So currently, all my business processes are stuck in this timerEvent.

Is there a way to make Activiti /runtime/executions REST API asynchronous?
How can I restart these business processes stucked in this intermediateCatchEvent? What kind of signal could I send for this timerEvent?

Here's an exctract of my process definition:



   <startEvent id="start"/>
   <sequenceFlow id="_3" sourceRef="start" targetRef="startDelay"/>
   <intermediateCatchEvent id="startDelay" name="IntermediateCatchingEvent">
      <timerEventDefinition>
         <timeDuration>PT5S</timeDuration>
      </timerEventDefinition>
   </intermediateCatchEvent>
   <sequenceFlow id="_4" sourceRef="startDelay" targetRef="parallelgateway1"/>


Thanks
7 REPLIES 7

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Is there a way to make Activiti /runtime/executions REST API asynchronous?
[/quote
What do you mean?

What kind of signal could I send for this timerEvent?
e.g.
org.activiti.engine.ManagementService#executeJob or set job retries to >0.

Regards
Martin

remibantos
Champ in-the-making
Champ in-the-making
Hi,

Currently, when I do a POST request to runtime/process-instances resource to start a process instance, I have to wait for Activiti to execute the instance to the first waiting "activity" such as an event gateway for sample, to finally get a HTTP 201 answer.
I would like instead that Activiti answers a 202 ACCEPTED HTTP code and create the process instance (and process it) asynchronously.
See the runtime/signals service which has such behavior.
Should I do a PR for that?

Thanks,
Rémi

jbarrez
Star Contributor
Star Contributor
Simply make the first step of the process async and it will return after starting it.

But that will still give you a 201 and not a 202 of course.

remibantos
Champ in-the-making
Champ in-the-making
I had this in mind indeed. However it seems like a workaround to what I would like to achieve.
I would prefer to use an asynchronous version of runtime/process-instances service so I would not have to modify all my business processes first steps. (not runtime/executions as in my first post)
So my understanding is that there's no such behavior in current version of Activiti "Process Instances" REST API.

Thanks

jbarrez
Star Contributor
Star Contributor
Nope, it's not there at the moment. But it's something i'd like to add in the future for sure.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi remibantos,

another possibility is to hook into process parsing and make first steps of all processes async by default.

Regards
Martin

remibantos
Champ in-the-making
Champ in-the-making
Hi Martin,

Thanks, this is what I do know, (waiting for someone to do a PR for an async REST api) but I had a lot of issues with enabling of async continuations in my BP.
(See this post I just did: https://forums.activiti.org/comment/35378#comment-35378)