<camunda:outputParameter> does not work for events

Hi,

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.

NotWorkingExample.bpmn (4.0 KB)

WorkingExample.bpmn (3.9 KB)

I think it is a bug . Should I open a jira issue for it?

best regards,

Markus

Hi Markus,

Thank you for reporting this. Could you please distill this into a unit test (see the template: https://github.com/camunda/camunda-engine-unittest)?

Cheers,
Thorben

Hi Thorben,

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?

Best regards,

Markus

Hi Markus,

Thanks for the effort. Could you push your test to a github repository?

Cheers,
Thorben

Hi Thorben,

I pushed it to a git repository.

https://github.com/EinsZwo/event_output_parameter_error.git

Best regards,

Markus

Hi Markus,

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.

Cheers,
Thorben