ActionGateway icon

ActionGateway

Route flow depending on previous user task response

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 decision outcomes, such as approval processes or conditional branching.

Use Case Examples

  1. In an approval workflow, if a user approves a request, the flow continues through the 'Approve' output to trigger further processing.
  2. If a user rejects a request, the flow is routed through the 'Reject' output to handle rejection logic.
  3. If a user returns a task for revision, the flow goes through the 'Return' output to manage rework.
  4. If the action is none of the above, the flow proceeds through the 'NoOp' output, effectively handling unexpected or no-operation cases.

Output

JSON

  • json - The original input data JSON, routed according to the 'action' property.

Troubleshooting

  • If the input data does not contain a valid 'action' property, the node will route the data to the 'NoOp' output, which might cause unexpected workflow behavior if not handled.
  • Ensure that the input data JSON includes the 'action' field with one of the expected values ('Approve', 'Reject', 'Return') to properly route the flow.
  • If the node outputs to the 'NoOp' path unexpectedly, verify the correctness and presence of the 'action' property in the input data.

Discussion