Setting up a Timer Boundary Event clears the Outputs variables.
Our intention is to withdraw a contract after 4 days timeout. The contract variable is being set by a task before the said task (with the timer event). However, when we set the contract.status with a value, the entire variable is set to null.
Is there a better way of achieving this behavior?
Attached are images portraying what we did and the history from Zeebe Simple Monitor.
Here is the Simple Monitor log
I can’t reproduce the behavior with the given information. Please share your example (or a simplified version of it).
In General, does Timer Boundary Event supports Outputs?
The modeler (v 5.0.0) has the Outputs variables.
I’ve attached a simple process that should simulate the problem.
When the Timer Event triggers, the entire contract is
timer_example.bpmn (5.0 KB)
@Haimon thank you for sharing the example.
But I can’t reproduce the issue if I create the process instance with the following variables:
And complete the first task with the following variables:
At the end of the process instance, I have the following variables:
However, if I complete the job without the variable “contractId” then the variable “contract” is
null after the completion of the task.
Please check that you set the expected variable when completing the job.
Does this help you?
In my opinion (not an expert, so use caution with this opinion), a Timer Boundary event shouldn’t support Outputs. To make the expected behavior clear, there should be a service task that fires from the timer that sets your variable values.
Remember that overall BPMN is supposed to be a implementation-agnostic language.
You could view it as sending out your offer (by paper forms), and setting a kitchen timer. The kitchen timer only goes “Ding” - it doesn’t do any actions. When the timer dings, then someone (or a program) needs to update the documents to indicate that the offer is withdrawn.