All Products
Search
Document Center

DataWorks:HTTP trigger node

Last Updated:Mar 26, 2026

An HTTP trigger node lets you trigger a DataWorks workflow node and its downstream nodes from an external environment — such as a local system or a cross-tenant environment — by calling the TriggerSchedulerTaskInstance OpenAPI operation. This is useful when your orchestration logic lives outside DataWorks and you need DataWorks scheduling to wait for an external signal before proceeding.

How it works

An HTTP trigger node is a zero-load node: it carries no compute logic and exists solely as a gating point in your workflow. DataWorks generates recurring instances for the node on schedule. Each instance waits in the Waiting for Trigger state until your external system calls TriggerSchedulerTaskInstance. Once triggered, the node releases its downstream nodes, which then run in sequence.

image

Two conditions must both be satisfied before the HTTP trigger node releases its downstream nodes:

  1. All upstream nodes that the HTTP trigger node depends on have run successfully.

  2. Your external system has called TriggerSchedulerTaskInstance for that specific instance.

The order in which these two conditions are met does not matter. If the trigger call arrives before the upstream nodes finish, DataWorks holds the instruction and proceeds once the upstream nodes complete.

Important

The trigger instruction is retained for only 24 hours. If the upstream nodes do not finish within 24 hours, the instruction is discarded and the trigger call must be repeated.

Each instance can be triggered only once. Calling TriggerSchedulerTaskInstance on an already-triggered instance has no effect.

Limitations

  • HTTP trigger nodes are available in DataWorks Enterprise Edition and higher. For a version comparison, see Editions of DataWorks.

  • HTTP trigger nodes are zero-load nodes and cannot perform compute tasks. Place the actual compute node downstream of the HTTP trigger node.

  • A recurring instance for the HTTP trigger node must have been generated and must be in the Waiting for Trigger state. You can verify this on the Auto Triggered Instances page in Operation Center.

  • The scheduled time for the recurring instance must have arrived.

  • The HTTP trigger node must not be in a frozen state when the trigger call is made.

  • The scheduling resource group must have sufficient resources at trigger time.

Prerequisites

Before you begin, make sure you have:

  • A RAM user with the Develop or Workspace Administrator role in your workspace. For details, see Add members to a workspace.

    The Workspace Administrator role grants broader permissions than required for this task. Assign it only when necessary.
  • A serverless resource group associated with your workspace. See Use serverless resource groups.

Create and publish an HTTP trigger node

Create the node

For step-by-step creation instructions, see Create a recurring task.

Configure scheduling

After creating the node, open the Scheduling panel on the right side of the node editing page and configure the following parameters. For all other scheduling options, see Node scheduling.

ParameterDescription
Resource groupSelect the serverless resource group associated with your workspace.
Instance generation modeT+1 Next Day: instances are generated the following day. Generate Immediately After Publishing: instances are generated right after the node is published.
When no upstream node is configured, the root node of the business flow is used as the default upstream node.

Publish the node

Submit and publish the node to the production environment. For details, see Publish nodes/workflows.

After publishing, the node runs on its configured schedule. To monitor it, go to Operation Center > Node O&M > Auto Triggered Node O&M > Auto Triggered Nodes. For an overview of Operation Center, see Get started with Operation Center.

Trigger the node from an external environment

Use the following workflow to call TriggerSchedulerTaskInstance from your external system:

image
  1. Create a workflow in Data Development that contains an HTTP trigger node, configure node dependencies, and publish to Operation Center.

  2. The system generates recurring instances on schedule. Retrieve the instance's task ID and scheduled time from Operation Center.

  3. Pass those values to TriggerSchedulerTaskInstance using Java, Python, or the API debugging tool. The node releases its downstream nodes, which run in sequence.

For TriggerTime: use a fixed value to trigger only that specific instance; use a dynamic variable to trigger all matching instances.

Step 1: Get the instance task ID and scheduled time

When you can view instances depends on the instance generation mode:
T+1 Next Day: go to Operation Center the next day.
Generate Immediately After Publishing: instances are available right away.
  1. Log on to the DataWorks console. In the top navigation bar, select your region. In the left-side navigation pane, choose Data Development and O&M > Operation Center, select your workspace, and click Go to Operation Center.

  2. In the left navigation bar, click Auto Triggered Node O&M > Auto Triggered Instances.

  3. Find your HTTP trigger node instance and record its Task ID and Scheduled Time.

    Hover over the instance name to see the Task ID.

Step 2: Call TriggerSchedulerTaskInstance

Call the API using one of the following methods.

Java

  1. Add the DataWorks SDK dependency to your Project Object Model (POM):

    <dependency>
      <groupId>com.aliyun</groupId>
      <artifactId>dataworks_public20240518</artifactId>
      <version>6.2.0</version>
    </dependency>

    For SDK installation instructions, see Use Alibaba Cloud SDK for Java in an IDE.

  2. Call the API with the following sample code. Replace the placeholder values with your actual parameters (see the parameter table below).

    PlaceholderDescription
    <task-id>

    The Task ID retrieved in step 1 Step 1: Get the instance task ID and scheduled time.

    <Prod-or-Dev>Prod for the production environment; Dev for the development environment.
    <scheduled-time>

    The Scheduled Time retrieved in step 1 Step 1: Get the instance task ID and scheduled time. The time must be in the yyyy-MM-dd HH:mm:ss format.

    <workspace-endpoint>The endpoint of the workspace where the HTTP trigger node is located. See Alibaba Cloud OpenAPI Developer Service Endpoints.
    ALIBABA_CLOUD_ACCESS_KEY_IDSet this environment variable to the AccessKey ID of the Alibaba Cloud account that owns the HTTP trigger node. To get your AccessKey pair, go to AccessKey Management in the DataWorks console. For secure credential configuration, see Manage access credentials.
    ALIBABA_CLOUD_ACCESS_KEY_SECRETSet this environment variable to the AccessKey secret of the same account.
    package com.example.demo;
    
    import com.aliyun.dataworks_public20240518.Client;
    import com.aliyun.dataworks_public20240518.models.TriggerSchedulerTaskInstanceRequest;
    import com.aliyun.dataworks_public20240518.models.TriggerSchedulerTaskInstanceResponse;
    import com.aliyun.teaopenapi.models.Config;
    import com.aliyun.teautil.models.RuntimeOptions;
    
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    
    public class CrossTenantTriggerSchedulerTaskTo {
        public static TriggerSchedulerTaskInstanceResponse runTriggerScheduler(
                com.aliyun.dataworks_public20240518.Client client,
                Long nodeId,
                String EnvType,
                Long TriggerTime) throws Exception {
            TriggerSchedulerTaskInstanceRequest request = new TriggerSchedulerTaskInstanceRequest();
            request.setTaskId(nodeId);       // Task ID of the HTTP trigger node instance
            request.setEnvType(EnvType);     // Environment: "Prod" or "Dev"
            request.setTriggerTime(TriggerTime); // Scheduled time as a millisecond timestamp
            RuntimeOptions runtime = new RuntimeOptions();
            return client.triggerSchedulerTaskInstanceWithOptions(request, runtime);
        }
    
        public static void main(String[] args) throws Exception {
            String nodeId = "<task-id>";
            String EnvTypeStr = "<Prod-or-Dev>";
            String cycTimeStr = "<scheduled-time>";   // Format: yyyy-MM-dd HH:mm:ss
            String endpoint = "<workspace-endpoint>";
    
            Long nodeId1 = Long.parseLong(nodeId);
    
            // Convert the scheduled time string to a millisecond timestamp
            SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(sdft.parse(cycTimeStr));
            Long cycTime = calendar.getTimeInMillis();
    
            // Initialize the client using AccessKey credentials from environment variables
            Config config = new Config();
            config.setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"));
            config.setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"));
            config.setEndpoint(endpoint);
    
            Client client = new Client(config);
            TriggerSchedulerTaskInstanceResponse response =
                runTriggerScheduler(client, nodeId1, EnvTypeStr, cycTime);
            System.out.println(com.aliyun.teautil.Common.toJSONString(
                com.aliyun.teautil.Common.toMap(response)));
        }
    }

    Replace the following placeholders with your actual values: For a complete Java example, see the TriggerSchedulerTaskInstance debugging pageTriggerSchedulerTaskInstance debugging pageTriggerSchedulerTaskInstance debugging pageSDK Sample tab on the TriggerSchedulerTaskInstance debugging page.

Python

  1. Install the Alibaba Cloud SDK for Python:

    pip install alibabacloud_dataworks_public20240518==6.2.0

    For SDK installation instructions, see Integrate SDK.

  2. For a complete Python example, see the SDK Sample tab on the TriggerSchedulerTaskInstance debugging page.

image

API debugging tool

Use the TriggerSchedulerTaskInstance debugging page to call the API directly without writing code. Set the following parameters and click Call API.

ParameterDescription
TaskId

The Task ID retrieved in step 1 Step 1: Get the instance task ID and scheduled time.

EnvTypeProd for the production environment; Dev for the development environment.
TriggerTime

The Scheduled Time retrieved in step 1 Step 1: Get the instance task ID and scheduled time. The time format needs to be converted to a millisecond timestamp.

image

Step 3: Verify that the trigger succeeded

After calling TriggerSchedulerTaskInstance, confirm that the node was triggered successfully:

  1. In Operation Center, go to Auto Triggered Node O&M > Auto Triggered Instances.

  2. Find your HTTP trigger node instance. If the trigger succeeded, its state changes from Waiting for Trigger to a running or success state, and its downstream nodes begin running in sequence.

What's next

For a complete walkthrough of using HTTP trigger nodes in cross-tenant scenarios, see Use HTTP trigger nodes to trigger node execution across tenants.