A Camunda 8 Connector to send a BPMN Message
Send a BPMN Message
Name | Description | Class | Default | Level |
---|---|---|---|---|
messageName | Name of message to send, used to find the receiver | java.lang.String | REQUIRED | |
messageId | Message Id | java.lang.String | OPTIONAL | |
correlationVariables | Correlation value (1) | java.lang.String | OPTIONAL | |
MessageVariables | Expression to get the variable expression (2) | java.lang.String | REQUIRED | |
messageDuration | Duration of message on server | java.lang.String | OPTIONAL |
(1) CorrelationVariables If the receiver is a intermediate catch event message, a correlation is mandatory to find the process instance to unfreeze.
(2) MessageVariables:
Variables to copy in the message. The format is "(=)* An string can be done explicitly To give the value, a constant can be used
statusTransferExpense=Correct,dateTransferExpense=2024/12/05,amountTransfer=453
In general, values of variables are not a constant. So, to pass value, use a Feel Expression can be provided:
= "statusTransferExpense="+statusTransfer+",dateTransferExpense="+dateTransfer+", amountTransfer="+amount
where statusTransfer
, dateTransfer
and amount
are process variables.
Attention, Feel expression accept only string:
Variables statusTransfer
, dateTransfer
must be String processes variable.
If not, the complete expression returns null, without any information.
To avoid this and use any kind of variable, use a constant expression with placeholder ${<processVariable>}
.
For example, in the expression:
statusTransferExpense=${statusTransfer}, dateTransferExpense=${dateTransfer}, amountTransfer=${amount}
statusTransfer
will be replace by its value, a String, dateTransfer
can be a Date, and amount
a double.
See test/resources/SendMessage.bpmn"
Name | Description | Class | Level |
---|---|---|---|
messageKey | Key generated by Zeebe | java.lang.Long | REQUIRED |
tenantId | Tenant ID which capture the message | java.lang.String | REQUIRED |
Name | Explanation |
---|---|
INCORRECT_VARIABLE_DEFINITION | Incorrect variable expression definition. The value must be a list of (name=variable,)+ |
SEND_MESSAGE | Error during the send operation |
mvn clean package
Two jars are produced. The jar with all dependencies can be upload in the Cherry Framework
The element template can be found in the element-templates directory.
This process send a message Pay employee
without any correlation.
The second process send back a message Transfer done
with a correlation key.