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:
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
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.
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)?