Class Overview
BaseWorkflowAgent Properties
| Property | Type | Default | Description |
|---|---|---|---|
$steps | array | [] | Array of workflow steps |
$results | array | [] | Step execution results |
$timeout | int | 300 | Workflow timeout (seconds) |
$retryAttempts | int | 0 | Default retry attempts |
$retryDelay | int | 1000 | Retry delay (milliseconds) |
Key Methods
executeWorkflow()
addAgent()
Workflow Methods
Configuration Methods
Result Access Methods
Workflow Types
Sequential Workflow
Parallel Workflow
Conditional Workflow
Loop Workflow
Step Parameters
Dynamic Parameters
Creating Custom Workflows
Running Workflows
Basic Execution
Using the Workflow Facade
Workflow Results
Sequential Workflow Results
Parallel Workflow Results
Error Handling
Complete Example
OrderProcessingWorkflow.php
Workflow Best Practices:
- Workflows are agents - they extend BaseWorkflowAgent
- Use the appropriate workflow type for your use case
- Set reasonable timeouts and retry limits
- Leverage callbacks for monitoring and debugging
- Pass results between steps using closures
- Handle errors at both step and workflow levels
- Test workflows with various input scenarios