Principle:Apache Dolphinscheduler Workflow Engine Orchestration
| Knowledge Sources | |
|---|---|
| Domains | Workflow_Orchestration, Distributed_Systems |
| Last Updated | 2026-02-10 00:00 GMT |
Overview
A multi-engine orchestration architecture where the WorkflowEngine coordinates four specialized sub-engines to process commands, manage workflow events, dispatch tasks, and handle logic tasks.
Description
The Workflow Engine Orchestration principle defines how DolphinScheduler's master server orchestrates workflow execution through a coordinated set of sub-engines. The WorkflowEngine is the top-level orchestrator that starts and stops four sub-engines in a specific order: CommandEngine (polls commands from the database), WorkflowEventBusCoordinator (processes workflow lifecycle events), WorkerGroupDispatcherCoordinator (dispatches physical tasks to workers), and LogicTaskEngineDelegator (handles logic tasks locally on the master).
This modular architecture separates concerns and allows each engine to scale and evolve independently while maintaining coordinated lifecycle management.
Usage
The WorkflowEngine is started automatically by the master server during bootstrap. It is not directly invoked by application code but drives the entire workflow execution pipeline.
Theoretical Basis
The engine follows a Coordinator Pattern with ordered lifecycle management:
// Startup order (dependencies flow downward)
WorkflowEngine.start():
commandEngine.start() // 1. Poll commands from DB
workflowEventBusCoordinator.start() // 2. Process workflow events
workerGroupDispatcherCoordinator.start() // 3. Dispatch tasks to workers
logicTaskEngineDelegator.start() // 4. Handle logic tasks locally
// Shutdown order (reverse)
WorkflowEngine.close():
logicTaskEngineDelegator.close()
workerGroupDispatcherCoordinator.close()
workflowEventBusCoordinator.close()
commandEngine.close()