Output mapping on intermediate message catch event i.c.w. terminate event


#1

I run into a problem which is comparable to 5483.

When the above workflow reaches the Terminate event an error is given that variable Local_Done does not exist. In our real-life workflow this construct is used in a sub-process.

The error occurs when the mapping uses ${Local_Done} and is prevented when ${execution.getVariable(‘Local_Done’)} is used.

Question that remains: is there a reason that the output mapping is performed on the terminate event? I expect it to be unintended behavior.


#2

Hi @Xander,

This is expected behavior. We have seen use cases for both options (i.e. execute or skip output mappings) and that is why you can for example choose in APIs like RuntimeService#deleteProcessInstance if they should invoke output mappings. It would certainly make sense to add this as a configuration option to the terminate end event as well. Feel free to raise a feature request in our JIRA and/or provide a pull request if you would like to contribute this.

Cheers,
Thorben