flow - Workflow Runtime Toolchain
flow is the command-line tool for executing, managing, and debugging JOEL workflows.
Installation
flow is included with JOEL:
flow --versionQuick Start
# Execute workflow
flow run workflow.joel
# Start workflow server
flow server
# Monitor workflow execution
flow monitor workflow-idExecute Workflows
Run workflow files:
# Execute workflow
flow run workflow.joel
# Execute with parameters
flow run workflow.joel --param input=data.json
# Execute with environment variables
flow run workflow.joel --env
# Execute in background
flow run workflow.joel --background
# Execute with timeout
flow run workflow.joel --timeout 300Workflow Server
Start workflow execution server:
# Start server
flow server
# Start on specific port
flow server --port 8080
# Start with specific backend
flow server --backend redis
# Start in cluster mode
flow server --clusterWorkflow Management
Manage workflow executions:
# List running workflows
flow list
# Show workflow status
flow status workflow-id
# Stop workflow
flow stop workflow-id
# Resume workflow
flow resume workflow-id
# Cancel workflow
flow cancel workflow-idMonitoring
Monitor workflow execution:
# Monitor workflow
flow monitor workflow-id
# Show workflow logs
flow logs workflow-id
# Show workflow metrics
flow metrics workflow-id
# Show workflow graph
flow graph workflow-idWorkflow Debugging
Debug workflow execution:
# Debug workflow
flow debug workflow.joel
# Step through workflow
flow step workflow-id
# Set breakpoints
flow breakpoint workflow.joel --line 10
# Inspect workflow state
flow inspect workflow-idWorkflow Scheduling
Schedule workflow execution:
# Schedule workflow
flow schedule workflow.joel --cron "0 0 * * *"
# List scheduled workflows
flow schedule list
# Remove schedule
flow schedule remove schedule-idExamples
Execute Workflow
flow run data-pipeline.joelInput (data-pipeline.joel):
[Compiled]
flow data_pipeline {
node fetch {
fn execute() {
# Fetch data
}
}
node process {
depends: [fetch],
fn execute() {
# Process data
}
}
node store {
depends: [process],
fn execute() {
# Store results
}
}
}Monitor Execution
# Start workflow
flow run workflow.joel --background
# Monitor in real-time
flow monitor <workflow-id>Command Reference
Execution Commands
flow run <file>- Execute workflowflow server- Start workflow serverflow list- List workflowsflow status <id>- Show status
Management Commands
flow stop <id>- Stop workflowflow resume <id>- Resume workflowflow cancel <id>- Cancel workflow
Monitoring Commands
flow monitor <id>- Monitor workflowflow logs <id>- Show logsflow metrics <id>- Show metricsflow graph <id>- Show graph