Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Apache Dolphinscheduler Workflow Triggering

From Leeroopedia


Knowledge Sources
Domains Workflow_Orchestration, Scheduling
Last Updated 2026-02-10 00:00 GMT

Overview

A multi-mode workflow triggering mechanism that supports manual, scheduled, and backfill execution through a unified RPC control interface with type-specific request DTOs.

Description

The Workflow Triggering principle defines three distinct ways to start a workflow execution in DolphinScheduler: Manual Trigger (user-initiated via API/UI), Schedule Trigger (cron-based automatic execution), and Backfill Trigger (re-execution for historical time periods). All three modes use the same RPC service interface (IWorkflowControlClient) but with different request DTOs carrying mode-specific parameters.

Each trigger mode creates a command record in the t_ds_command table, which is then picked up by the master's CommandEngine for processing into a workflow instance. This decoupled command-based approach enables asynchronous, reliable workflow initiation.

Usage

Use manual triggering for ad-hoc workflow runs, schedule triggering for recurring automated runs, and backfill triggering for processing historical data periods. The appropriate trigger method is selected by the API layer based on the user's intent.

Theoretical Basis

The triggering mechanism follows the Command Pattern:

  • Commands: Each trigger creates a Command entity in the database
  • Invoker: The API/scheduler creates and persists commands
  • Executor: The master's CommandEngine polls and executes commands
  • Decoupling: Command creation is asynchronous from command execution
// Trigger flow
triggerWorkflow(request):
    validate(request)
    command = createCommand(request.type, request.params)
    commandDao.insert(command)
    return response(workflowInstanceId)

// CommandEngine (separate thread)
while running:
    commands = commandDao.pollPending()
    for command in commands:
        workflowInstance = createWorkflowInstance(command)
        startExecution(workflowInstance)

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment