How durable-workflow/workflow works
Durable Workflow is a Laravel-embedded engine for authoring and running durable PHP workflows. The main path is application code starting a workflow, runtime coordination through activities, timers and other commands, task delivery by Laravel queues, and durable history that supports replay after failures. The package also exposes scheduling, webhook interactions, payload codecs/storage, and operator visibility/repair surfaces. The graph uses README statements and shown source-index references; unsampled runtime links are omitted rather than inferred.
Main entry points: V2 Workflow runtime · DatabaseTaskDelivery.php Task delivery · WorkflowRun.php Run state · WorkflowTask.php Task state
Components 20
Workflow authoring
- Workflow code
src/V2/AsyncWorkflow.php - Activity handlers
src/V2/Activity.php
Runtime execution
- Workflow runtime
src/V2 - Activity execution
src/V2/ActivityTaskBridge.php - Workflow task jobs
src/V2/Jobs/RunWorkflowTask.php - Workflow schedules
src/V2/Support/ScheduleManager.php
Durable state
- Execution history
src/V2/Models/WorkflowHistoryEvent.php - Run state
src/V2/Models/WorkflowRun.php - Task state
src/V2/Models/WorkflowTask.php - Payload codecs
src/Serializers/Avro.php - External payload storage
src/V2/Contracts/ExternalPayloadStorageDriver.php
Laravel integrations
- Task delivery
src/Queue/DatabaseTaskDelivery.php - Webhook interface
src/V2/Webhooks.php - Webhook authentication
src/Auth/WebhookAuthenticator.php
Operations
- Monitoring and repair
src/V2/Support/WaterlineEngineSource.php - Operator commands
src/Commands/V2DoctorCommand.php
Other components
- Application developer
- Laravel queue worker
- Laravel services
- Application database
Connections 22
- Application developer → Workflow code: authors
README.md - Workflow code → Workflow runtime: starts
README.md - Workflow runtime → Activity execution: coordinates
README.md - Activity execution → Activity handlers: runs
README.md - Workflow runtime → Task state: records tasks
README.md - Task delivery → Task state: inspects
src/Queue/DatabaseTaskDelivery.php - Task delivery → Workflow task jobs: dispatches
src/Queue/DatabaseTaskDelivery.php - Laravel queue worker → Workflow task jobs: executes
README.md - Workflow runtime → Execution history: persists history
README.md - Execution history → Run state: records run events
src/V2/Models/WorkflowHistoryEvent.php - Run state → Application database: stores runs
README.md - Task state → Application database: stores tasks
README.md - Application developer → Workflow schedules: configures
README.md - Workflow schedules → Workflow runtime: starts occurrences
README.md - Application developer → Webhook interface: uses endpoints
src/V2/Webhooks.php - Webhook interface → Webhook authentication: validates requests
src/V2/Webhooks.php - Workflow runtime → Payload codecs: encodes payloads
src/V2/Models/WorkflowRun.php - Workflow runtime → External payload storage: stores payloads
src/V2/Contracts/ExternalPayloadStorageDriver.php - Monitoring and repair → Run state: inspects models
src/V2/Support/WaterlineEngineSource.php - Operator commands → Monitoring and repair: reports status
- Laravel services → Task delivery: provides queues
README.md - Laravel services → Application database: provides storage
README.md