This operation sends a BPMN signal. Use it to notify signal-catching process elements and optionally pass variables with the signal.
The base request is:
sendSignal()
The following example sends a signal with a single variable:
new RuntimeProcessInstanceService().sendSignal({
name: 'approvalReceived',
variables: {
approved: true
}
});
You can use the optional SignalPayload when a script needs to send a BPMN signal. Signals are broadcast by name and can include variables for signal-catching process elements.
The following example sends a signal with multiple variables:
const signalPayload = {
name: 'approvalReceived',
variables: {
approved: true,
reviewer: variables.reviewer
}
};
new RuntimeProcessInstanceService().sendSignal(signalPayload);
When a process instance contains a signal-catching event that matches the signal name, the runtime delivers the signal and makes the supplied variables available to the receiving process elements.