Adding Events to Chains

In addition to commands, you can add events to a chain, such as to:

  • Test an output with automated conditional logic
  • Set values for dynamic variables
  • Enable an approval workflow
  • Upload files for the next command
  • Force a chain result

Adding an Event to Set Runtime Inputs

To define variables used throughout a chain as it executes, you can prompt collaborators to provide their values as the first step. To add Runtime Inputs as the first step of a new chain, click Start building or the first Add (+) of the chain, select Runtime Inputs. Add Runtime Inputs

Then, for each input to prompt for:

1
Click Add Input.
2
Select the type of input to add, such as TextField, BooleanField, or DropdownField.
3
Enter a unique name and description to help identify the input.
4
Select whether to require the input.
5
Enter any additional details about the input based on its type, such as a default value, or the list of options for a dropdown.
6
After you add all runtime inputs, click Save.

Adding an Event to Set Dynamic Chain Variables

To set or change values during the execution of a chain, create dynamic variables for those values, and then add a Set Dyanmic Chain Variables event.

1
In the chain, click Add (+) where the event should occur, and select Event.
2
Under Choose template, click Set Dynamic Chain Variable. Add a Dynamic Chain Variable event
3
Select where to add the event in context of where you clicked Add (+):
  • To add the event between two commands, click Insert between. For example, to change the values based on the previous command's output before proceeding to the next step.
  • To add the event as a new branch of a logic tree, click Insert new branch. For example, to change the values based on whether the previous command succeeds or fails.
4
Under Run condition, select whether the event should occur based on the previous command's success, failure, or warnings. If the event should occur regardless of the previous command's exit codes, click Any.
5
Under Basic Info, enter a unique name to help identify the event.
6
Under Action, select the dynamic variable to set. For information about how to create dynamic variables, see Managing Variables for the Workspace and Chains.
7
In Value, enter the default value for the variable as static text, or set it dynamically based on a command output or runtime variable:
  • To base the value on an earlier command's output, click < >, and then, under Command on the left panel, select the command and its output.
  • To base the value on a runtime variable, click < >, and then, under Runtime on the left panel, select the variable.
8
Click Save.

Adding an Event for Conditional Logic

To test variables or command outputs within the chain using text-matching, regular expressions, or boolean true/false logic, add a Conditional event. For example, with a conditional event, you can verify that outputs contain predefined values or no future dates.

Step 1: Add the Event as a Node

1
In the chain, click Add (+) where the event should occur, and click Event.
2
Under Choose template, click Conditional. Add a Conditional event
3
Select where to add the event in context of where you clicked Add (+):
  • To add the event between two commands, click Insert between. For example, to test the previous command's output before proceeding to the next step.
  • To add the event as a new branch of a logic tree, click Insert new branch. For example, to branch and test variables conditionally based on whether the previous command succeeds or fails.
4
Under Run condition, select whether the event should occur based on the previous command's success, failure, or warnings. If the event should occur regardless of the previous command's exit codes, click Any.

Step 2: Add the Conditional Logic

After you add the node to the chain, enter a unique to name to help identify the event, and build the conditional logic. The conditional logic appears as a group that you add rules and other groups of rules to, each joined with an AND or OR boolean.

  • If all conditions must be true for a group to be true, select AND.
  • If only one condition must be true for a group to be true, select OR.

You can add rules to test various data types:

Data Type Description
String One or more characters
Integer Any whole, non-decimal numeric value
Date Any date string or Date variable
Float Any numeric value
JSON JavaScript Object Notation; use Variable Transformation to parse objects

To verify whether data meets the criteria to pass, pair it with an operator and value:

  • Is blank or Is not blank
  • Contains
  • Matches regular expression
  • Starts with or Ends with
  • = and !=
  • < and <=
  • > and >=

After you set up the logic, click Save.

Adding an Event for an Approval Workflow

To pause the chain to enable an approval workflow before proceeding to the next step, add an Approval event. With an approval workflow, you can:

  • Approve or reject information before it flows between data sources.
  • Coordinate resources and collect auditable responses.
  • Automate the workflow between requesters and approvers.

Step 1: Add the Event as a Node

1
In the chain, click Add (+) where the event should occur, and click Event.
2
Under Choose template, click Approval. Add an Approval event
3
Select where to add the event in context of where you clicked Add (+):
  • To add the event between two commands, click Insert between. For example, to approve the previous command's output before proceeding to the next step.
  • To add the event as a new branch of a logic tree, click Insert new branch. For example, to require approval only if the previous command's output contains warnings.
4
Under Run condition, select whether the event should occur based on the previous command's success, failure, or warnings. If the event should occur regardless of the previous command's exit codes, click Any.

Step 2: Set Up the Approval Workflow

After you add the event as a node, set up the approval workflow, including who performs the approvals and who to notify of their approvals or rejections. You can enable multiple types of workflows:

  • In a Sequential approval, multiple approvers receive the request one-at-a-time, in an hierarchy.
  • In a Flat approval, multiple collaborators can approve the data at the same time.
  • In a Single approval, the workflow requires only one approver.

To set up the workflow:

1
Under Basic Info, enter a unique name to help identify the approval event.
2
In Title, enter a short description of the approval workflow.
3
In Requesters, enter the email addresses of the collaborators to notify of approvals or rejections. If multiple email addresses, separate them with a comma.
4
In Approvers, enter the email addresses of the collaborators to approve or reject data. If multiple email addresses, separate them with a comma.
5
In Details, enter any additional information for the approvers about the workflow, such as guidelines of when to approve or reject the data.
6
In Due in, enter how many days each approver has to respond to an approval request.
7
In Approval type, select whether the workflow is for a Sequential, Flat, or Single approval.
8
To attach the output of an earlier command for approval, in Attachments, click < >, and then select the command output from the left panel.
9
Click Save.

Approval Outputs

An approval workflow generates data that you can then load into other data sources, such as a relational database. You can use these outputs directly, or transform them in combination with other commands.

Output Type
Approval Emails List
Requestor Emails List
Approval Details String
Approval Responses JSON

Adding an Event to Upload Files

To pause the chain to enable collaborators to upload files before proceeding to the next step, add a Runtime Upload Files event.

1
In the chain, click Add (+) where the event should occur, and click Event.
2
Under Choose template, click Runtime File Upload. Add a Runtime File Upload event
3
Select where to add the event in context of where you clicked Add (+):
  • To add the event between two commands, click Insert between. For example, to upload files based on the previous command's output before proceeding to the next step.
  • To add the event as a new branch of a logic tree, click Insert new branch. For example, to upload files conditionally based on whether the previous command succeeds or fails.
4
Under Run condition, select whether the event should occur based on the previous command's success, failure, or warnings. If the event should occur regardless of the previous command's exit codes, click Any.
5
Under Basic Info, enter a unique name to help identify the event.
6
In Uploaders, list the email addresses of collaborators who can upload files. If multiple addresses, separate them with a comma.
7
In Due in, enter the number of days an uploader has to respond to an upload request.
8
In Description, enter the reason or intent for the uploaded files.
9
Click Save.

Adding an Event to Set the Chain's Result

To force a result within the chain before proceeding to the next step, add a Set Chain Result event.

1
In the chain, click Add (+) where the event should occur, and click Event.
2
Under Choose template, click Set Chain Result. Add a Set Chain Result event
3
Select where to add the event in context of where you clicked Add (+):
  • To add the event between two commands, click Insert between. For example, to set a result based on the previous command's output before proceeding to the next step.
  • To add the event as a new branch of a logic tree, click Insert new branch. For example, to set a results conditionally based on whether the previous command succeeds or fails.
4
Under Run condition, select whether the event should occur based on the previous command's success, failure, or warnings. If the event should occur regardless of the previous command's exit codes, click Any.
5
Under Basic Info, enter a unique name to help identify the event.
6
Under Event Details, select whether to have the chain result in a Success, Warning, or Failure condition.
7
Select whether to stop the chain, such as when added to a new, conditional branch.
8
Click Save.