Message Delegates
Message Delegates
Message Delegates are the Java representation of the Message Events in a BPMN model. Message Delegates are linked to a certain Message Event by selecting the Message Event in the Camunda Modeler and adding a Java class to the Implementation
field. This uses the fully qualified class name. For example:
org.package.MyClass
Message Delegates are only needed for Message Send Events. Incoming messages will be resolved to the correct BPMN process execution automatically using Message Correlation and the message inputs will be added to that execution's process variables.
To make a Message Delegate for Message Send Events, the Java class needs to extend AbstractTaskMessageSend
. Most of the time, there will not be any processing logic inside Message Delegates, therefore the execute
method will not be overridden like with Service Delegates. Although there might be cases where this is necessary. Instead, Message Delegates should be used to aggregate previously computed data and attach it to the message. This is done by overriding the getAdditionalInputParamters
method. The DSF translates BPMN messages into FHIR Task resources to execute the communication modeled in BPMN diagrams. The information being sent to another BPMN process is specified in the Task.input elements a.k.a. Input Parameters, hence the name of the method. The constructor of your delegate class should also forward a ProcessPluginApi
instance to its superclass constructor.
Related Topics
Messaging, Input Parameters, Adding Input Parameter to Task Profiles