Overview
This node routes the workflow execution based on the 'action' property of the input data. 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 no recognized action is provided, the workflow proceeds via the 'NoOp' path.
Output
JSON
Approve- Data items where action is 'Approve'Reject- Data items where action is 'Reject'Return- Data items where action is 'Return'NoOp- Data items where action is none of the above
Troubleshooting
- Ensure the input data contains a valid 'action' property with one of the expected values: 'Approve', 'Reject', 'Return'.
- If the 'action' property is missing or has an unexpected value, the data will be routed to the 'NoOp' output, which might not be intended.
- Check that the input data is correctly passed to the node to avoid empty or undefined inputs.