Troubleshooting
Common Issues
Workflow not triggering
Symptom: Workflowable::dispatch() throws a WorkflowNotFoundException.
Causes:
- No active workflow is bound to the event name. Check
is_activeistrueandevent_namematches. - The event class is not registered in
config/workflowable.phpunderevents. - The event name in your config doesn't match the
event_namecolumn on the workflow.
Fix: Verify with php artisan workflowable:list --active and check the event binding.
Action handler not found
Symptom: StepExecutionException during execution.
Causes:
- Action handler not registered in config or via
ActionRegistry. - Typo in the handler name in the workflow definition.
Fix: Check config/workflowable.php and ensure the handler name matches exactly.
Workflow stuck in "in_progress"
Symptom: Instance never completes or fails.
Causes:
- An infinite loop in transitions (unlikely with
max_stepslimit). - A queued job failed silently.
- A custom step type returned
StepResult::waiting()and nothing resumed execution.
Fix:
- Check
php artisan workflowable:status {id}for the current step. - Check your queue worker logs.
- Use
php artisan workflowable:verify {id}to check state integrity.
Encrypted fields not decrypting
Symptom: Workflow variables contain encrypted strings instead of plain values.
Causes:
- The
APP_KEYchanged between encryption and decryption. - The
encrypted()method on theWorkflowEventdoesn't list the field.
Retry not working
Symptom: Step fails immediately without retrying.
Causes:
- No
retrykey on the step definition and nodefault_retryin config. max_attemptsset to 0 or 1.
Fix: Add a retry block to the step or set execution.default_retry in config.
Exceptions
| Exception | Cause |
|---|---|
WorkflowNotFoundException | No active workflow found for the given name or event |
WorkflowInstanceNotFoundException | Instance ID doesn't exist |
StepExecutionException | Step handler threw an exception |
InvalidWorkflowDefinitionException | Definition JSON is malformed or missing required fields |
InvalidTransitionException | No valid transition for the step's result |
StepTypeNotRegisteredException | Step type name not found in the registry |
Debugging Tips
- Check stored events: The stored events table contains a full audit trail of every action. Use
$instance->storedEvents()to inspect. - Listen to events: Register listeners for
StepFailedandWorkflowFailedto log errors. - Use
workflowable:status: Inspect instance state from the CLI. - Use
workflowable:verify: Replay stored events to verify state integrity. Use--fixto correct drift. - Check step executions: The
step_executionstable tracks each attempt with input, output, and error data.