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 action value. This is useful in scenarios where subsequent workflow steps depend on user task responses or decisions, such as approval processes or conditional branching.
Use Case Examples
- In an approval workflow, if a user approves a request, the node routes the data to the 'Approve' output for further processing.
- If a user rejects a request, the node routes the data to the 'Reject' output to handle rejection logic.
- If a user returns a task for revision, the node routes the data to the 'Return' output.
- If the action is none of the above, the node routes the data to the 'NoOp' output, effectively handling unexpected or no action cases.
Output
JSON
json- The original input JSON data passed through the node, routed according to the 'action' property.
Troubleshooting
- Ensure the input data contains a JSON object with an 'action' property; otherwise, the node will route the data to the 'NoOp' output.
- If the 'action' property value is not one of 'Approve', 'Reject', or 'Return', the node defaults to the 'NoOp' output, which might be unintended if the action value is misspelled or unexpected.