Parallel Gateway Issues

Hello everyone,

I have been trying to use a Parallel Gateway to trigger an event if a certain variable is not true. However I noticed that the Timer sometimes starts and other times it does not (I added a second trigger timer for testing purposes)

Does anyone knows why this happens?

workflow.bpmn (18.5 KB)

I’m not sure I follow your logic here.
What is “Trigger Timer” supposed to do?

I have a feeling that you might have a slight misunderstanding of the BPMN language, which is causing your execution error.

I think you might want a sub-process with a loop on it until Timer Condition completed, or possibly an event-based sub-process.

Hmm, let’s put it like this.

Let’s say a payload starts a camunda process.

When this camunda process starts the idea is that it should also start a timer.

This timer is supposed to run parallel to the other logic.

When this timer ends, if the other process has reached a certain point then the “Trigger Timer” will not be run (in this case it will be because I added it before the exclusive gateway for testing purposes), otherwise it will run.

Hi @Oretoh,

this is the use case for an Event Subprocess, starting with an interrupting (or maybe non-interrupting, depends on your logic) timer event: Event Subprocess |

Hope this helps, Ingo

Thank you, after reading the previous comment I thought that might be the case and it seems to be, so that did indeed help. However when the “main process” throws an exception I noticed the event process is not getting triggered, I tried with both the interrupting and non-interrupting timer.

However in both cases, if the camunda throws an exception the subprocess will be killed with it and it won’t trigger the timer.

Any ideas, besides trying to avoid exceptions?

Below, the camunda process with a non-interrupting timer.

workflow.bpmn (17.9 KB)

Hi @Oretoh,

your timer will be inserted in the database once the process instance rached the “Portability Request Response”, because this is the only task with asynchonous continuation.

You can add an async after on the start event to start the timer earlier.

Hope this helps, Ingo

1 Like

Hello @Ingo_Richtsmeier

Tried adding it like this

Still doesn’t work after an exception, I’m assuming it might be because it kills the entire camunda process.

Hi @Oretoh,

where did you get which exception? Could you share a stacktrace here together with the code that raises it?

Otherwise it’s just rough guessing…

Cheers, Ingo