Job Priority in a parallel gateway

Hi,

I have created a simple process with a parallel gateway where both the arms call a separate southbound service. Problem is, the services are available on different VPNs so I have to disconnect from one VPN to connect to the other one. For this purpose, I have introduced timers(Timer 1 & 2) on both sides. One arm (Timer 1) takes <=10 minutes(it calls the same service at an interval of 1 min) while the other takes 1 minute(Timer 2). The issue is, while the 10min arm is executing, the process switches to the other arm in the meantime where it is not able to connect to the second service and it fails. I have tried assigning job priority to the timers 1 & 2 but timer 2 gets executed all the same. I have attached the diagram.

Why do you want them to run in parallel? Seems like it would be better suited if they ran sequentially.

I know! I suggested the same, but I’m being overruled! They insist on using a parallel gateway for design requirements. I just need one of them to run at a time. Is there any way to do it?

Hi,

rather than use timers and a race condition, could you rely on exclusive [1] job execution?

regards

Rob

[1] https://docs.camunda.org/manual/7.10/user-guide/process-engine/the-job-executor/#concurrent-job-execution

1 Like

Not working, the second timer is still executing while the first arm is executing. Sorry for the blurry image but if you can get the general design of the diagram, you can see that we need the last two timers as per the design. I’m sorry, I know it might be a bad modelling practice, but is there no other way around it?

Regards
Ankita

Hi,

If you remove the timers, and set the service tasks to exclusive asynchronous before, then you should see serial execution as per the documentation…

regards

Rob

3 Likes

Thanks.Problem solved :smile: