Task and prerequisites

Let the operator approve or reject a set of requests and return to a shared export after the selected action.

This example uses demonstration data and settings. Validate the expected result in your own environment before connecting production destinations. Identifiers demo_* are illustrative: select your own training connections or sources in the editor. The JSON below shows the block and connection structure, not a ready-to-transfer flow archive.

Training input data

requests.csv

Request;Status
R1;Draft
R2;Draft

Blocks, connections and exact settings

Explanatory diagramEnlarge ↗19. Manual scenario selection and branch merging. Example 19 topology: 6 blocks, 6 connections. Node identifiers and ports from the configured graph are preserved.
Flow diagram 19

Example 19 topology: 6 blocks, 6 connections. Node identifiers and ports from the configured graph are preserved.

Add the listed blocks in the designer, open each block's properties and set these values. Names demo_* identify training sources and connections.

BlockSetting
1
File
src
  • Role: source
  • Source: demo_approval
  • Read settings:
    • Sheet: CSV
    • Range: A1:B3
    • First row is the header: так
    • Delimiter: ;
2
Choice
choice
  • Title: Рішення щодо набору заявок
  • Read settings:
      • Identifier: approve
      • Label: Погодити
      • Identifier: reject
      • Label: Відхилити
  • wizard: так
3
Set field values
approved
  • assignments:
      • Field: Status
      • Source: constant
      • Value type: text
      • Value: Approved
4
Set field values
rejected
  • assignments:
      • Field: Status
      • Source: constant
      • Value type: text
      • Value: Rejected
5
Merge branches
merge
  • Inputs:
      • Identifier: approved
      • Label: Погоджено
      • Identifier: rejected
      • Label: Відхилено
  • Mode: single
6
Data export
out
  • Format: csv
  • File name: decisions
  • Purpose: download
  • Delimiter: ;
  • Time zone: Europe/Kyiv

Port connections

  • src out → choice in
  • choice approve → approved in
  • choice reject → rejected in
  • approved out → merge approved
  • rejected out → merge rejected
  • merge out → out in
Complete graph configuration as JSON
{
  "version": 3,
  "nodes": [
    {
      "id": "src",
      "type": "file",
      "label": "src",
      "config": {
        "role": "source",
        "source_id": "demo_approval",
        "options": {
          "sheet": "CSV",
          "range": "A1:B3",
          "header": true,
          "delimiter": ";"
        }
      }
    },
    {
      "id": "choice",
      "type": "choice",
      "label": "choice",
      "config": {
        "title": "Рішення щодо набору заявок",
        "options": [
          {
            "id": "approve",
            "label": "Погодити"
          },
          {
            "id": "reject",
            "label": "Відхилити"
          }
        ],
        "wizard": true
      }
    },
    {
      "id": "approved",
      "type": "set_fields",
      "label": "approved",
      "config": {
        "assignments": [
          {
            "field": "Status",
            "source": "constant",
            "value_type": "text",
            "value": "Approved"
          }
        ]
      }
    },
    {
      "id": "rejected",
      "type": "set_fields",
      "label": "rejected",
      "config": {
        "assignments": [
          {
            "field": "Status",
            "source": "constant",
            "value_type": "text",
            "value": "Rejected"
          }
        ]
      }
    },
    {
      "id": "merge",
      "type": "merge",
      "label": "merge",
      "config": {
        "inputs": [
          {
            "id": "approved",
            "label": "Погоджено"
          },
          {
            "id": "rejected",
            "label": "Відхилено"
          }
        ],
        "mode": "single"
      }
    },
    {
      "id": "out",
      "type": "export",
      "label": "out",
      "config": {
        "format": "csv",
        "filename": "decisions",
        "destination": "download",
        "delimiter": ";",
        "timezone": "Europe/Kyiv"
      }
    }
  ],
  "edges": [
    {
      "source": "src",
      "target": "choice",
      "source_port": "out",
      "target_port": "in"
    },
    {
      "source": "choice",
      "target": "approved",
      "source_port": "approve",
      "target_port": "in"
    },
    {
      "source": "choice",
      "target": "rejected",
      "source_port": "reject",
      "target_port": "in"
    },
    {
      "source": "approved",
      "target": "merge",
      "source_port": "out",
      "target_port": "approved"
    },
    {
      "source": "rejected",
      "target": "merge",
      "source_port": "out",
      "target_port": "rejected"
    },
    {
      "source": "merge",
      "target": "out",
      "source_port": "out",
      "target_port": "in"
    }
  ]
}

Expected result

After selecting “Approve”, decisions.csv contains R1/Approved and R2/Approved; the rejected branch is skipped. After selecting “Reject”, both statuses are Rejected. This is one decision for the entire input dataset.

Run and verify

  1. Run the flow interactively and select “Approve”.
  2. Verify two updated requests, one active branch and a successful merge.
  3. Run again with “Reject” and verify both Rejected statuses.

Common errors

  • Choice always requires a user response; it is unsuitable for unattended execution.
  • Merge single expects one active branch; use Union to append two tables simultaneously.
  • Do not confuse a manual choice of one scenario with Router, which distributes rows according to conditions.