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 flow continues through the 'Approve' output to trigger further processing.
- If a user rejects a request, the flow is routed through the 'Reject' output to handle rejection logic.
- If a user returns a task for revision, the flow goes through the 'Return' output to allow rework.
- If the action is none of the above, the flow proceeds through 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
- If the input data does not contain a JSON object with an 'action' property, the node will route the data to the 'NoOp' output, which might be unexpected. Ensure the input data includes the 'action' field.
- If the 'action' property contains a value other than 'Approve', 'Reject', or 'Return', the node will also route the data to the 'NoOp' output. Verify that the action values are correctly set upstream.