Getting Started With Workflow Chain Engine
Requirements
PHP 8.1 or newer with the pdo_sqlite and curl extensions, standard almost everywhere, which is exactly what makes this engine at home on cheap shared hosting. There is no database server, no build step, and no dependency install, the SQLite file creates itself in data/.
Step 1: Install and Run the Engine
All three install paths start the same way: copy config.sample.php to config.php and set apiKey and adminPassword to long random strings.
Local development uses PHP's built-in server:
cp config.sample.php config.php
# edit config.php: set apiKey and adminPassword
php -S localhost:8080 -t public
Docker is docker compose up --build after the config edit, and the container also runs the schedule cron loop for you automatically.
Shared hosting means uploading the project and pointing your docroot or a subdomain at the public/ folder. For scheduled workflows, add one line in your hosting panel's cron section: * * * * * php /path/to/Workflow-Chain-Engine/cli/cron.php.
The config settings worth knowing:
| Setting | What it does |
|---|---|
apiKey | The key for the run and workflows API calls |
adminPassword | Password for admin.php |
corsOrigin | Which browser origins may call the API |
dbPath | SQLite file location |
maxSteps | The step budget per run, the loop protection, default 500 |
httpTimeout | Default seconds an HTTP Request node waits, default 30 |
runHistory | How many run records to keep before pruning, default 500 |
Step 2: Create a Workflow and Declare Variables
Log into admin.php and create a workflow. Then declare its variables, the names your flow works with, like customer, email, and total. Variables start each run as empty text and are filled by whatever fields the trigger sends, and every node can read and write them with {name} placeholders. The variables and capture guide covers the whole data model, it is one flat pool per run and very easy to reason about.
Step 3: Draw the Flow
Open the editor. Every flow starts at the Start node. Double click the canvas to add a node, pick its type, fill in its fields, and drag connections between the output and input dots. Right click a node or connection to delete it, and everything saves automatically as you work.
A perfect first flow is three nodes: an HTTP Request that GETs a public API, a Set Variable that builds a message from the response, and a Success End that returns it. The six node types, HTTP Request, If Condition, Switch, Set Variable, For Each Loop, and the Success and Fail enders, are each detailed in the node reference.
Step 4: Run It and Read the Log
Click Run Now. The button shows an input box for each declared variable, so you can test with real-looking values before anything external is wired up. Then open the run history and read the step log: what each node did, which branch each condition took, and every variable's final value. This loop, adjust a node, run, read, is a few seconds long, and the run history guide shows how to get the most from it.
Step 5: Wire Up the Real Trigger
Every workflow has its own webhook URL with its own secret key, shown on its settings page, and any body field posted to it becomes a variable:
POST https://yourserver.com/api.php/webhook/WEBHOOK_KEY
{"customer": "Acme", "email": "billing@acme.com"}
Your own code can trigger runs through the authenticated API instead, and Run Every X Minutes on the settings page schedules the flow. All four triggers are covered in triggers and webhooks.
Before You Go Live
Serve over HTTPS, and treat admin access like the API tokens your flows hold, workflows run with your server's network access and node fields can carry keys. Webhook keys are per-workflow secrets you can regenerate any time from the settings page, the old URL stops working instantly. And build boldly: the step budget guarantees every flow ends, however the loops are wired.
Setup is one config file and one command on almost any host, including shared hosting. Create a workflow, declare its variables, draw the flow with a double click and a few drags, prove it with Run Now, and point a webhook, an API call, or a schedule at it. The run history shows every step of every run from day one.