Time condition to automatically complete task

I am stuck with the following problem:

I have a parallel gateway that leads to 3 different tasks. The tasks (which are just approvals from each group involved) must be executed in a 15-day period. If not executed in time, the flow must continue without their approval (I know it sounds unusual, but that’s how it must work for now).

The “approval1” variable must indicate if the project was approved, not approved, or if there was no answer (within the 15 days) from the responsible group.

I have tried the Timer Boundary Events (both interrupting and non-interrupting), but they haven’t worked as I expected (they either didn’t carry the variable “approval1” or the tasks were stuck in the gateway).

My next attempt would be to try a Conditional Boundary Event to set that if not completed within 15 days, the task would autocomplete with the variable “approved1” set as “No Feedback”.

Could anyone help me code this conditional or suggest a different approach?

Not 100% sure that this would work, but have you tried putting a script task after the Timer Boundary to set the appropriate approval variable to “No Feedback”?

1 Like

Hi @CamilaDemier ,

One solution would be to initialize the three approved variables to “no_answer” value, embed your parallel logic into a sub-process, and attach a timer to the sub-process as illustrated in the below snip

Condition expression of approved path should be set to
#{(approveResult1 eq 'approved' or approveResult1 eq 'no_answer') and (approveResult2 eq 'approved' or approveResult2 eq 'no_answer') and (approveResult3 eq 'approved' or approveResult3 eq 'no_answer')}

Kindly find attached a simplified running example (Notice: time duration is set to 3 minutes for demonstartion purposes)
interrupted-approval-process.bpmn (12.1 KB)

1 Like

A shorter condition could be

#{approveResult1 != 'rejected' and approveResult2 != 'rejected' and approveResult3 != 'rejected')}

1 Like