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 through the 'Approve' output for further processing.
- If a user rejects a request, the workflow follows the 'Reject' output to handle rejection logic.
- If a user returns a task for revision, the workflow routes through the 'Return' output.
- If none of these actions match, the workflow proceeds through the 'NoOp' output, indicating no operation or an unrecognized action.
Output
JSON
Approve- Output containing items where action is 'Approve'Reject- Output containing items where action is 'Reject'Return- Output containing items where action is 'Return'NoOp- Output containing items where action is none of the above
Troubleshooting
- Ensure the input data contains a 'json' object with an 'action' property; otherwise, all items will be routed to the 'NoOp' output.
- If the 'action' property has a value other than 'Approve', 'Reject', or 'Return', the item will be routed to the 'NoOp' output, which might be unexpected if the input data is incorrect.