Overview
This node routes the workflow execution based on the 'action' property of the input data's JSON. It directs the flow into one of four outputs: Approve, Reject, Return, or NoOp, depending on the user's previous task response. This is useful in scenarios where different processing paths are needed based on user decisions or task outcomes, such as approval workflows or decision trees.
Use Case Examples
- In an approval process, if a user approves a request, the workflow continues down the 'Approve' path.
- If a user rejects a request, the workflow follows the 'Reject' path.
- If a user returns a task for revision, the workflow takes the 'Return' path.
- If none of these actions match, the workflow proceeds via the 'NoOp' path.
Output
JSON
jsonaction- The action string determining the routing path (Approve, Reject, Return, or other leading to NoOp)
Troubleshooting
- Ensure the input data contains a JSON object with an 'action' property; otherwise, the node will route to the 'NoOp' output by default.
- If the 'action' value is misspelled or not one of the expected strings ('Approve', 'Reject', 'Return'), the node will send the data to the 'NoOp' output, which might cause unexpected workflow behavior.