Each operation can be configured with actions to take on success or failure of the operation, including running another operation or sending an email notification. The result is linked operations or notifications that are kicked off when conditions are met. An operation being kicked off based on operation actions is said to be downstream of an upstream operation before it.
Accessing Operation Actions
The Settings option for operations is accessible from these locations:
- The project pane's Workflows tab (see Component Actions Menu in Project Pane Workflows Tab).
- The project pane's Components tab (see Component Actions Menu in Project Pane Components Tab).
- The design canvas (see Component Actions Menu in Design Canvas).
Once the operation settings screen is open, select the Actions tab:
Configuring Operation Actions
Each option available within the Actions tab of the operation settings is described below.
Condition: Use the first dropdown to select the condition that should trigger the action. These conditions can be set:
On Success: The action is triggered when the operation is successful.TIP: You can force a success trigger even if the operation failed. This setting is available under the operation settings Options tab and may be useful for setting up later parts of the project without requiring success of a dependent operation (see Operation Options).
On Fail: The action is triggered when the operation fails.
On SOAP Fault: The action is triggered when a SOAP fault occurs. A SOAP fault is an error resulting from incorrect message format, header processing, or incompatibility. This condition is applicable only for operations using SOAP activities or Salesforce activities.
- Action: Use the second dropdown to select the action to perform, limited to a maximum of one of each action type for each condition. These actions can be configured:
Run Operation: Kicks off the operation selected in the next dropdown, and can be used to link or chain together operations to run subsequently.
- Operation: When Run Operation is selected, the third dropdown lists available operations within the project, including any operations that are included in other workflows within the project that have not already been associated with an action.
- Send Email Notification: Sends an email notification selected in the next dropdown.
- Email Notification: When Send Email Notification is selected, the third dropdown lists available email notifications configured within the project that have not already been associated with an action.
- Create New Email Notification: When Send Email Notification is selected, a link is available to configure a new email notification. Documentation on configuration is available under Email Notifications.
- Add Action: To add the action to the operation, make sure all three dropdowns have selections and then click Add Action. The action is then displayed in the table below.
- Remove Action: To remove an action from an operation, click the "X" next to the parameter within the table. The action is removed from the table.
Display of Links on the Design Canvas
When you add operation actions, you can visually see the links between operations, emails, and other components with connected lines on the design canvas.
The color and position of the lines indicate their meaning:
- Green: Green lines are displayed for an On Success condition and appear on the left of linked operations or emails.
- Red: Red lines are displayed for an On Fail condition and appear on the right of linked operations or emails.
- Orange: Orange lines are displayed for an On SOAP Fault condition and appear on the right of linked operations or emails.
- Gray: Gray lines are displayed for an operation called from a script using the
Linked Run Operation Action in the Same Workflow
Operations that are linked in the same workflow are displayed with lines connecting each operation:
Linked Run Operation Action in a Different Workflow
Operations that are linked in different workflows are displayed with lines connecting to a block that represents the other workflow. Click the name of the workflow and operation to go to that workflow within the design canvas:
Linked Send Email Action
Linked email notifications are displayed directly on the design canvas connected to the operation they are associated with:
RunOperation() Function from a Script
In lieu of configuring operation actions to run operations, you can also call an operation from a script using the
RunOperation() function. In this case, a gray link line is displayed connecting the script with the operation.
SendEmailMessage() Function from a Script
In lieu of configuring operation actions to send an email, you can also send an email notification from a script using the
SendEmailMessage() function. At this time, there is no visual representation of the link on the design canvas.