Signal event with parameter


I’m communicating between processes and need to variable with a message / signal. Signals work just fine, but I cannot pass any other data / payload with them. So is it possible to throw a signal event form workflow with additional parameters? For example doing something like:

    <intermediateThrowEvent id="sid-5D3A521C-2031-4313-A6A5-B8393B52BF16">
      <signalEventDefinition signalRef="test_signal">
          <flowable:field name="myVariableName" expression=${myVariableName}"/>

That’s currently not possible. But I agree it would be a very useful feature to have.
It’s not something currently planned, but if you’re interested and wanting to do a PR, we can help you point to the right classes that would need a change for this :-).

Hi @joram, thanks for your reply. I think implementing the feature is a way to go for me, as my current workaround using service task calls feels cumbersome. I’ll have a look at the code once I get some free time and will come back to you with additional questions.
Cheers, Jan

1 Like

Has this been implemented?

Reading through the documentation, there seem to be some references to signals & variables:

However the documentation is totally clear on what these API calls actually mean within the greater context of Flowable.

If this feature hasn’t been implemented, how long would you estimate that it would take to develop? Alternatively, are there any workarounds for this?

No, the API supports it (check the RuntimeService), but the mapping in the model is not implemented.

Depends on who implements the feature. The hard part is the variable mapping (type handling, null checking, etc.). It’s not a feature that’ll be implemented in a matter of hours (taking in account unit testing, docs, etc.).

As an alternative: the event registry tasks do have variable mapping.

@joram Thanks for the reply.

Some more questions:

  • In this context, what do you mean by “model”?
  • Could a script task or java service task retrieve a RuntimeService instance (or a proxy to it) and call the signalEventReceived method with a map? Or by “the mapping in the model is not implemented”, do you mean that the signalEventReceived overload that accepts variables just silently discards them?
  • Using the event registry would mean setting up an event source like RabbitMQ, etc? Are events always a one-to-one mapping (like messages), a one-to-many mapping (like signals), or both? Is there any documentation on using the event registry with the BPMN service (I can’t seem to find any)?