Waits And Signals

Waits & signals

Besides human approvals, Voodflow 0.2 can pause execution for time or external signals, then resume without restarting the whole workflow.

Why waits exist

Long pauses must not block a PHP worker forever. When a wait starts:

  1. The execution is marked waiting.
  2. A WorkflowWait row stores resume metadata.
  3. A queue worker / scheduler later resumes the graph from that node.

Always run a queue worker and the scheduler in production. See Queue worker setup.

Wait for Signal

Type wait_for_signal
Goal Pause until an external signal arrives

Resume from your app or ops tooling:

PHP
use Voodflow\Voodflow\Voodflow;

Voodflow::signal('order-paid-123', payload: ['amount' => 49.00]);

Artisan:

BASH
php artisan voodflow:signal {name} 

Match the signal name configured on the node (supports tags where applicable).

Date reached

Type date_reached_node
Goal Resume when a calendar datetime is reached

Useful for “go live at launch time”, embargos, or delayed follow-ups without busy-waiting.

Scheduler helper:

BASH
php artisan voodflow:date-reached-run

Process waits (scheduler)

The service provider registers:

BASH
php artisan voodflow:process-waits   # typically every minute via schedule

Ensure php artisan schedule:work or system cron runs schedule:run every minute.

Config

config/voodflow.php:

PHP
'ops' => [
    'waits_enabled' => env('VOODFLOW_WAITS_ENABLED', true),
    'versioning_enabled' => env('VOODFLOW_VERSIONING_ENABLED', true),
],

Set VOODFLOW_WAITS_ENABLED=false only if you intentionally disable wait/resume behaviour.