AnsweredAssumed Answered

Activiti process result to queue

Question asked by tj1 on Oct 28, 2015
Latest reply on Nov 3, 2015 by jbarrez
Hi guys,

we implemented pooling of processes in Activiti, now we are doing calls every 20s to get completed processes at that time. Recently we decided to changed that behavior to pub-sub. Basically when Activiti process is finished the same data as result from "/query/historic-process-instances" is published to the queue. 

The best way I found is to subscribe to "PROCESS_COMPLETED,PROCESS_CANCELLED" using ActivitiEventListener. Everything works with that well, except when we have issues related to the queue. service is down or so. If it happens, then I will get an exception in EventListener. In that case if I set isFailOnException() return false, then I will lose the information about ended process, if I set true, then the previous successful steps of transaction will be rollabacked.

Questions:
1) In given scenario is it possible somehow to repeat only the EventListener action without the one or more tasks which were included in transaction?
2) Maybe you know other options or extension points where I can put the data to the queue after process is finished and be able to retry if adding failed?

P.S. I know that I can create separate tasks which could do that. :) But that IMOP shouldn't be in business process.

Best Regards,
TJ

Outcomes