External signal external-signal
The External signal activity is a Flow control activity. It lets you trigger the execution of a workflow from another workflow or an API call.
Follow these steps to configure the External signal activity and trigger its execution:
-
Add an External signal activity into your workflow.
-
Complete the configuration of your workflow, and start its execution. The External Signal activity displays as “Pending,” waiting to be triggered.
-
Retrieve the following information:
-
The workflow’s internal name, which displays next to its label.
accordion View example -
The External signal activity’s name, which displays in the workflow’s Execution options.
accordion View example
-
-
To trigger the workflow, execute the
PostEvent
JavaScript function. This function lets you pass variables with the values of your choice and use them in the triggered workflow.The
PostEvent
function can be executed either from another workflow or from an API call.-
To trigger an External signal activity from a workflow, execute the PostEvent function from the Initialization script pane, accessible from the activity’s Execution options. For the JavaScript code activity, execute the function from the activity’s script.
The syntax is as follows:
code language-none xtk.workflow.PostEvent("<workflow-internal-name>","<signal-activity-name>","",<variables <variable-name>="<value>"/>, false);
accordion View example In this example, the “signal1” External signal activity is triggered. It has been added to the workflow whose internal name is “WKF12345.” A variable named “customID” is passed with the value “123456.”
- To trigger an External signal activity from an API call, follow the steps detailed in the Campaign API documentation. Learn how to use the static
PostEvent
method.
-