I want to cancel the whole transaction, with no compensation.
When the event arrives, the output of the current task is evaluated (and sadly it depends on a variable created by the task)
(in my real life, there are many tasks in the transactions)
When you say transaction - what do you mean? There is a transaction symbol in BPMN that you’re using here but there are also transactions from the engine’s perspective which you might not be aware of.
When you say cancel - what do you expect to happen? from a process and technical level.
How do you define compensation? asynchronous execution of another task that performs a compensation or the rolling back of a threads execution.
This seems to indicate that the event is dependent on the output of the task - but you’ve used an interrupting event in your model, so I’m not sure how you expect the event to get an output from a task that hasn’t been completed.
When it happened, there are active task in the BPMN Transaction, and their output is evaluated.
In my case, the output depends on variables set by the Task (External Task or User Task), so when the task is canceled, i got a incident because the variable is absent.
I managed to make it works, using a groovy script in the output:
out = null;
if (! execution.isCanceled() ) {
out = execution.getVariable("titi");
}
out