Catch signal event: Access processVariables

Hi,

I’m catching a signal event in BPMN using an IntermediateCatchEvent, which works well. The signal was fired in Java code:
runtime.signalEventReceived(signalName, processVariables);

However, I’m not able to access the processVariables-Map. I’m using the Input/Output parameters on the IntermediateCatchEvent as shown in the picture. Is that a correct way to do?

Furthermore, I would prefer to catch / handle the signal directly in code. Is there any way to do this?

Thanks!

Hi @fnord,

I am not sure if I got you right. Your output parameter, as shown in the screenshot, creates a global variable named processVariables, whereas each entry of the map referenced in RuntimeService#signalEventReceived adds a variable to the waiting execution.

Does this answer your question?

Cheers,
Tassilo

Hi Tassilo,

thanks for the reply.

Your output parameter, as shown in the screenshot, creates a global variable named processVariables

That’s what I want - but when accessing the processVariables-variable in a following task, it is empty. So the map fired with the
runtime.signalEventReceived(signalName, processVariables);
didn’t make it into the next task.

Hopefully this helps to understand the question.

Regards,
fnord

Hi @fnord,

only the entries of the map referenced in RuntimeService#signalEventReceived will be available as variables.

Cheers,
Tassilo

Hi @tasso94,

that helped. Didn’t know I can directly access the variables transported by the map without specifying any variable mapping. Thanks!

Regards,
fnord