11.3. Signaling Process Instance

You can signal a running process instance using either API or Business Central.

Signaling Process Instance Using API

To signal a process instance using the Kie Session API, use the void signalEvent(String type, Object event) call on the parent Kie Session. The call triggers all active signal event nodes waiting for that event type in the Kie Session. The runtime strategy determines the number of processes which receive the signal.

If you need to signal a specific process instance, use void signalEvent(String type, Object event, long processInstanceId).

Note

If you use the Throwing Intermediate event of type Signal, the execution engine calls void signalEvent(String type, Object event).

If you do not want the signal to be delivered to all the listening processes, replace the Throwing Intermediate event with a Script Task:

kcontext.getKieRuntime().signalEvent("signalRefId", data, processInstanceId);

Signaling Process Instance from Business Central

To signal a process instance from Business Central, do the following:

  1. Log into Business Central.
  2. Click Process ManagementProcess Instances.
  3. Locate the required process instance and click Signal in the instance row.
  4. Fill the following fields:

    • Signal Name: corresponds to the SignalRef or MessageRef attributes of the signal. This field is required.
    • Signal Data: corresponds to data accompanying the signal. This field is optional.
Note

You can also send a Message event to the process. To do so, add the Message- prefix in front of the MessageRef value.