I tried to use camunda:outputParameter at a timer and message event which both have a sequenceFlow in a service task. The process variable defined via camunda:outputParameter should be used in this service task.
Unfortunately the process variable is unknown when executing the service task. This only happens when defining the camunda:outputParameter at a intermediate catch event. When defining it at a other service Task which is executed first everything works fine.
I added twp models to demonstrate what does not work.
I created a unit test which results in an error.
Its not as easy as expected first. The described behavior only occures if the event has a incoming sequence flow connected to a event based gateway.
It gets clear when having a look at the diagram used in my unit test.
How can I add the zip file with my unit test to this thread or do I have to provide a other format?
Thanks for the code. I created a bug ticket, see https://app.camunda.com/jira/browse/CAM-6183.
I’m not sure if output mappings should work on events following an event-based gateway or if we should prevent users from creating such mappings. Please see the ticket for the reasoning for option 1.
As a workaround, you can use an execution listener to set a (local) variable when the timer event is triggered.