Configuration
Publish config/workflowengine.php:
php artisan vendor:publish --tag=workflowengine::config
Keys
defaults
'defaults' => [
'logger' => 'storage',
'repository' => 'storage',
],
Default backend names. Currently informational — the active storage backend is
chosen by the storage block below.
enable_logger
'enable_logger' => true,
Whether per-node execution logging is written. Turn off to skip the log rows
($execution->logs and timeline() will be empty).
sync_wait_timeout
'sync_wait_timeout' => env('WORKFLOW_SYNC_WAIT_TIMEOUT', 30),
Seconds. When a sync-mode execution hits a Wait shorter than this, the process sleeps in place and continues, instead of suspending and queueing a delayed resume. Longer waits (and all waits in async mode) always suspend.
Keep this small if sync mode is reachable from an HTTP request —
max_execution_time and gateway timeouts will kill the process well before a
couple of minutes.
webhook_middleware
'webhook_middleware' => ['api'],
Middleware applied to the routes registered by the Webhook trigger.
resume_webhook
'resume_webhook' => [
'path' => 'workflowengine/resume/{token}',
'middleware' => ['api'],
],
A single fixed route (not tied to any one workflow) that resumes an execution
suspended on a Wait node in webhook mode. The
{token} segment identifies which suspended execution to resume. See
Resuming a webhook wait.
storage
'storage' => [
'workflow' => [
'driver' => env('WORKFLOW_STORAGE_DRIVER', 'file'), // 'file' | 'database'
'path' => storage_path('workflows'), // file driver
'connection' => null, // database driver; null = default
'table' => 'workflows',
],
'execution' => [
'driver' => 'file', // 'file' | 'database' | 'memory'
'path' => storage_path('workflow/executions'),
'connection' => null,
'table' => 'workflow_executions',
'logs_table' => 'workflow_execution_logs',
],
],
Workflow definitions and execution records are configured independently.
| Driver | workflow | execution | Notes |
|---|---|---|---|
file | ✓ | ✓ | JSON files under path. Zero setup; git-friendly for definitions. |
database | ✓ | ✓ | Requires the published migrations. Queryable, purgeable. |
memory | — | ✓ | In-process only, nothing persists. For tests / one-off CLI use. |
Recommended: file for both in local dev; database for both in production;
or definitions on file and executions on database for a mixed setup.
See Storage for the repository contracts and writing a custom driver.
Expression delimiters
Not published by default, but honoured if you add them:
'variable_open' => '{{',
'variable_close' => '}}',
Change the markers the expression engine looks for.