Objective - Learn how to implement try/catch logic around an entire section to allow for iteration specific logging and error handling
- Create a parent workflow that will trigger the callable (child) workflow
- Create a Callable workflow that will perform some tasks
- Add an Alerting workflow to allow for error handling
Step 1 - Create a parent workflow
The parent workflow is the workflow that will trigger the whole process. In our example below, we are using a manual trigger which when activated will get the latest sales leads from Salesforce, loop over the response array and pass each new lead to our callable workflow for processing. This setup allows for each iteration to be processed in parallel resulting in greater efficiency.
Step 2 - Create a callable workflow to process the sales leads
The callable workflow is where the bulk of the data processing is completed. In our example below, we are taking in the Salesforce leads returned in the parent workflow above and sending a message to a Slack channel notifying the team of the new lead.
Step 3 - Add an Alerting workflow for error handling
The alerting workflow is used to perform some tasks when a workflow encounters errors. In this case, we will be monitoring our callable workflow using the alerting workflow.
Create a new workflow and use the Alert trigger to initiate the workflow. In this example, an email will be sent when a workflow encounters an error.
Open your callable workflow and select Settings from the top left menu.
Then under Alerting Workflow select your newly created Alerting workflow from the dropdown and select Submit.
You now have a parent workflow that calls a callable (child) workflow that performs some data processing in parallel. Each iteration of the callable workflow will have its own logging allowing for easier issue identification and resolution as well as its own error handling flow.
Please sign in to leave a comment.