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. 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

  1. In an approval process, if a user approves a request, the workflow continues down the 'Approve' path.
  2. If a user rejects a request, the workflow follows the 'Reject' path.
  3. If a user returns a task for revision, the workflow takes the 'Return' path.
  4. If none of these actions match, the workflow proceeds via the 'NoOp' path.

Output

JSON

  • json - The original input 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 unexpected if the input data is incorrect or incomplete.

Discussion