Signal events with input / output parameters

Excited to see that the 6.6 release includes

  • In and out parameters can be defined for signal events, similar to the existing in and out parameter support for call activities…

Is there any code / examples I can look at to see how this looks in terms of XML.
There doesn’t seem to be any UI for it yet, but if I can figure out how to do it manually that will work for me

I’m imagining it will look something like the following??

<signal id="someSignal" name="Some Signal" flowable:scope="processInstance"></signal>
<process id="test1" name="test1" isExecutable="true">
 <startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
<sequenceFlow id="1" sourceRef="startEvent1" targetRef="throwSignalWithParams"></sequenceFlow>
 <intermediateThrowEvent id="throwSignalWithParams">
             <flowable:out source="myVar" target="targetMyVar"></flowable:out>
     <endEvent id="end"></endEvent>
     <sequenceFlow id="2" sourceRef="throwSignalWithParams" targetRef="end"></sequenceFlow> </process>

Here’s an example BPMN xml:

Which can be set in the API by doing something like

        Map<String, Object> payload = new HashMap<>();
        payload.put("testVar", "test");
        payload.put("anotherVar", "anotherTest");
        payload.put("nameVar", "John Doe");
        runtimeService.signalEventReceived("alert", payload);
1 Like