Conditional Boundary Event listener executed even if the task is completed?

Hi there!

I have the following situation: By completing a task that has a Conditional Boundary Event, I am updating the variables so that the conditional is met. But since I do the update it in the “complete” of the task (taskService.complete(taskID,variabes);), the flow comes out by the task that has just been completed and not the conditional event. Which makes lots of sense.

The thing is that the execution listener of the conditional event is executed even though the task to which it is associated is being completed. The flow doesn’t come out through the conditional (which is correct), but the listener is always called. Is there a way to prevent this?

Here’s the process I’m doing the testing with. The first task that is completed must activate the remaining one. That’s why both conditional listens for the same variable, that is set on the taskService.complete

flow

Thanks!

Hi @Cristian_Mastrantono,

you could move the listener code into a task listener on the complete event.

Hope this helps, Ingo

Hi Ingo, thanks for your response!

The thing is, I need to do some work when the conditional is executed so I cannot move all the code from the listener of the conditional to the task one, but I find it strange that when completing a task, the conditional boundary attached listener is executed but then the flow does not go out there.

Thanks again!