All use cases
Automation

Automate a process that needs a human to sign off

A visual workflow that pauses for a person and then carries on.

The problem

The process is six steps, and step four is "someone senior checks it". So it lives in a checklist, and the automation you wrote covers the three steps before the check and nothing after.

Most workflow tools treat a human as an interruption to route around. What you need is a run that stops, waits as long as it takes, and resumes with the decision recorded — without holding a worker open for three days.

What you are building

Live surfaces, not screenshots — every one composed from the same components you would install.

Workflow with a human gate

The real <FlowViewer> with live run statuses — every step OK until the approval node, which sits pending until a person decides.

Workflowpaused at the gate
  1. Expense filedTriggered by an inbound HTTP request to a host-provided URL.ok
  2. Over £500?ok
  3. Manager approvesPause until a human approves or denies.pending
  4. ReimburseTerminal node — captures the workflow's result.pending

The run stops at the approval node and persists — no worker is held open while it waits.

The code

The approval node pauses the runphp
// `human_approval` does not poll or block a worker -- it PERSISTS the run as
// awaiting_input and returns. The job finishes; the run does not.
$run = Flow::dispatch($workflow, ['expense' => $expense->toArray()]);

// Later, from the approval UI:
Flow::resume($run, ['approved' => true, 'by' => $manager->id]);
Refuse to save a loop before it runsphp
use FancyFlow\Analysis\SubflowCycle;

// The runtime depth cap catches a loop only AFTER every node above the subflow
// has run on each pass, side effects included. This refuses it at the door.
$loop = SubflowCycle::find($graph, $resolver, $name);

abort_if($loop !== [], 422, 'That workflow loops: '.implode(' -> ', $loop));

How to solve it

  1. Model the process as a graph

    The editor is a React surface for designing; the engine that runs the graph is separate and needs no React at all, so the same workflow runs on a server, a worker, or a CLI.

    Run thisbash
    npm install @particle-academy/fancy-flow
  2. Put a human node where the sign-off goes

    Built-in nodes pause the run and present a form. The run holds — not a worker — until someone answers, then continues from that point with the response available downstream.

  3. Add AI steps if you want them, without adopting a vendor

    The core declares an LLM client contract and imports no provider SDK. You register the client you already use; opt-in adapters exist for the common ones. Swapping providers does not touch the workflow.

  4. Run it on your backend

    A PHP runtime twin runs the same graphs on Laravel queues, so a Laravel app does not need a Node service to execute workflows.

    Run thisbash
    composer require particle-academy/fancy-flow-php