Workflow Node
Last updated
Last updated
The Workflow Node allows users to incorporate a sub-workflow or the same workflow within the main workflow. It is particularly useful for encapsulating a series of steps that are repeated or logically grouped.
Insert Workflow Node:
From the 'Add Node' panel, select the Workflow Node and place it onto the canvas.
Select which workflow you need to add to the canvas and then click on that workflow to add it to the main workflow canvas.
Configuring the Version: After adding the workflow node, click on the dropdown button to select any specific version of the workflow.
Note: You can select an existing sub-workflow or create a new one. Existing workflows can be chosen from a list, while new ones can be crafted by defining a new series of nodes.
Configure the input parameters that the sub-workflow will accept from the main workflow.
Passing Parameters:
Determine which data from the main workflow will be passed into the sub-workflow. This may involve mapping workflow variables to the input parameters expected by the sub-workflow.
This tab allows you to test the sub-workflow independently of the main workflow to ensure it behaves as expected.
Testing the Sub-Workflow:
Execute the test by providing the necessary input parameters and clicking the test button.
The output and any actions taken by the sub-workflow during the test will be displayed here.
Results Interpretation:
The output will be presented in a JSON format, indicating what data will be passed back to the main workflow.
The actions performed during the test, if any, are also listed here, allowing you to verify that the sub-workflow executes as intended.
Adjust settings that control how the sub-workflow integrates with the main workflow.
The "Timeout after" option allows you to set a time limit for the node's operation. If the node takes longer than the specified time, it will automatically stop running.
If you turn this setting on, then even if the workflow node gets any error, the workflow will continue to execute the next node with the error.
Let's take an example:
Let's say we have these 3 nodes in our workflow:
The first one is a Formula node, the second one is a Rule node and the third one is a database node.
In the past, our workflow system was designed with a stringent error management approach. If any node within the workflow encountered an error at any point during its execution, the entire process would come to a complete halt. This meant that if the first node, for example, "modified_cart," experienced any error, the workflow would not proceed to the next node. Instead, it would stop immediately at the first node, requiring immediate intervention to address the error before the workflow could continue. This approach prioritized error verification and strict control over processes, but it also meant increased interruptions and potential delays as errors were resolved one at a time.
Our current system introduces a feature called "Continue on error," which can be toggled on or off for each node in the workflow. When this setting is activated, it allows the workflow to proceed to the next node even if an error occurs in the current node. Specifically, if the first node, like "modified_cart," encounters an error while this setting is enabled, the workflow will not be halted. Instead, it will advance to the subsequent node, such as the rule node, with the error details passed along from the previous node. This functionality facilitates the continuation of the workflow despite errors, promoting greater flexibility and resilience in managing workflows by allowing for potential error handling at later stages of the process.