The sendCustomEvent operation synchronizes workflows with external events.
public void sendCustomEvent(String eventName, String serializedProperties);
The sendCustomEvent operation sends messages from Web service clients to workflows that are waiting for a particular event to occur before they run. The waiting workflows resume their run when they receive the message from sendCustomEvent.
A custom event that calls sendCustomEvent to send a message when it occurs can be any script, workflow, or action that Orchestrator can run. For example, a workflow might use sendCustomEvent to trigger another workflow that reloads all Orchestrator plug-ins when the sending workflow performs a specific action while it is running.
The messages that sendCustomEvent sends are simple triggers, the format of which is not exposed to users. The message triggers the waiting workflow to run at the moment that the server receives it.
No return value informs applications that the sendCustomEvent operation ran successfully.
The sendCustomEvent operation returns an exception if you pass it an invalid parameter.
Workflows waiting for a message from sendCustomEvent before they run must declare the event they are waiting for by calling the System.waitCustomEventUntil operation from the Orchestrator API. The following example shows two calls to waitCustomEventUntil.
System.waitCustomEventUntil("internal", customEventKey, myDate); System.waitCustomEventUntil("external", customEventKey, myDate);
The waitCustomEventUntil operation's parameters are as follows.