Overview
The Error Node redirects a workflow when the Plug-In component of an automated Screen/Task node module returns an error. In the Workflow Builder, the Error node attaches to that Screen/Task node in the Automated swimlane.
If your Plug-In already contains an error trigger, your Error node won't catch the error and redirect.
You’ll find the Error node in the list of nodes on the left of the Workflow Builder.
What You'll Learn
After completing this article, you’ll know when to use an Error node, how to configure its most commonly used settings, and understand the best practices.
Settings Menu Description
Next, let's explore the node's Settings Menu. This menu appears as a blue menu bar, either above or below the node, when you select the node itself. The Error node has these Settings Menu options:
Setting | Description |
---|---|
Edit | Takes you to the Edit Error Event window, where you can configure related settings. |
Delete | Removes the node from the workflow. |
Edit Error Event Window Description
Clicking the Edit button displays the Edit Error Event window.
The following settings are available in the Edit Error Event window:
Setting | Description |
---|---|
Label | Sets the name of your node. By default, the Label displays as errorEvent-1. The label you enter here is optional and displays below the node on the workflow canvas. Define your labels by associating them with the role of the node. |
Adding an Error Node
For this use case, the workflow confirms if an end-user wants an error returned. If your end-user selects no, your workflow proceeds and returns a message retrieved from a transform. If your end-user selects yes, the Plug-In in the second Screen/Task node simulates an error. Then, your Error node returns the end-user to the first Screen/Task to answer the question again.
What You Need
To set up this use case, you need:
1 Error node
1 End node
Configure the Screen/Task Nodes
Add three Screen/Task nodes to your workflow. The first Screen/Task node connects to the Start node. The second Screen/Task node uses Plug-In components to simulate an error response. The final Screen/Task node returns a message if no error occurs.
Drag and drop two Screen/Task nodes into the Authenticated swimlane.
Select a Screen/Task node.
Click Edit.
In the Label field, enter Input.
From the Module drop-down, enter or select Enablement Labs: Error Node Use Case-Input.
Click X (Close).
Select the second Screen/Task node.
In the Label field, enter Result.
From the Module drop-down, enter or select Enablement Labs: Error Node Use Case-Result.
Click X (Close).
Drag and drop a third Screen/Task node into the Automated swimlane.
Click Edit.
In the Label field, enter Error Check.
From the Module drop-down, enter or select Enablement Labs: Error Node Use Case-Error Check .
Click X (Close).
Connect the output port (right) of the Start node to the input port (left) of the Input Screen/Task node.
Connect the output port (right) of the Input Screen/Task node to the input port (left) of the Error Check Screen/Task node.
Connect the output port (right) of the Error Check Screen/Task node to the input port (left) of the Result Screen/Task node.
Configure the Error Node
Next, add an Error node. Your Error node redirects the workflow path if a Plug-In error occurs.
Drag and drop an Error node onto your Error Check Screen/Task node.
Click Edit.
In the Label field, enter Error Event.
Connect the output port (bottom) of the Error node to the input port (left) of the Input Screen/Task node.
Click X (Close).
Configure the End Node
Drag and drop an End node into the Authenticated swimlane.
Click Edit.
In the Label field, enter End.
Connect the output port (right) of the Result Screen/Task node to the input port (left) of the End node.
Click Save....
Save your workflow.
Your workflow looks like the following image when finished: