All Products
Search
Document Center

DataWorks:HTTP trigger node

Last Updated:Jun 25, 2026

DataWorks provides an HTTP trigger node that allows you to trigger the node and its downstream nodes in a workflow from an external environment, such as a local system or a cross-tenant environment, by calling an OpenAPI operation. This allows you to trigger tasks from your local system or handle cross-tenant task dependencies.

Product overview

An HTTP trigger node is a special virtual node that lets you use the DataWorks OpenAPI operation TriggerSchedulerTaskInstance to trigger scheduling for this node and its downstream nodes.

Triggering mechanism

image

An HTTP trigger node triggers its downstream nodes only after its upstream nodes succeed and an external system sends a scheduling command. For a diagram illustrating the use of the HTTP trigger node, see Usage diagram.

Usage diagram

The HTTP trigger node is commonly used for communication between external environments and the DataWorks scheduling system.

image

Diagram description:

  1. In Data Studio, create a workflow that contains an HTTP trigger node, configure the dependencies for each node, and deploy the workflow to Operation Center.

  2. The system automatically generates scheduled instances based on the scheduling time. You can obtain information about the HTTP trigger node, such as its task ID and trigger time, from these instances.

  3. Use this information in Java or Python code, or on the API debugging page, to call the OpenAPI operation and trigger the node. To trigger a specific instance and its subsequent workflow, you can set the TriggerTime parameter to a fixed value. To dynamically trigger all instances, set TriggerTime to a dynamic variable. After the HTTP trigger node receives and validates the trigger command, it executes the downstream nodes in sequence.

Trigger conditions

An HTTP trigger node can be triggered only if the following conditions are met:

  • A scheduled instance of the HTTP trigger node must exist. You can find this instance on the Cycle Examples page in Operation Center. Before the instance is successfully triggered by the TriggerSchedulerTaskInstance API, it remains in the Waiting for Trigger state. Its downstream nodes remain blocked until the TriggerSchedulerTaskInstance API is successfully called to trigger the HTTP trigger node, at which point the downstream nodes run in sequence.

  • All upstream nodes that the HTTP trigger node depends on have run successfully, meaning their instances are in a successful state.

  • The scheduled time for the scheduled instance of the HTTP trigger node has arrived.

  • The scheduling resource group used by the HTTP trigger node has sufficient resources at the time of the trigger.

  • The HTTP trigger node is not in a frozen state.

  • Only HTTP trigger node instances in the Waiting for Trigger state can be triggered. Instances that have already been successfully triggered cannot be triggered again.

Common scenarios

  • External file-driven scheduling: Use an external script (such as Python) to read date or condition information from files such as Excel or CSV files. When the trigger conditions are met, call the DataWorks OpenAPI operation TriggerSchedulerTaskInstance to trigger the HTTP trigger node and implement automated scheduling based on external data.

  • Cross-tenant task dependency: When task dependencies exist between DataWorks instances of different tenants, you can use the HTTP trigger node to trigger tasks across tenants. For more information, see Use the HTTP trigger node to trigger node execution across tenants.

If you use DataWorks Professional Edition or a higher edition, you can also use the Check node to implement similar external condition checking.

Notes

  • An HTTP trigger node triggers its downstream nodes only after its upstream nodes have run successfully and the external environment sends a scheduling command.

  • If the external environment sends a scheduling command before the upstream nodes have finished running, the HTTP trigger node does not trigger the downstream nodes. The system retains the scheduling command from the external environment and triggers the downstream nodes through the HTTP trigger node after the upstream nodes finish running.

    Note

    The trigger command from the external environment is retained for only 24 hours. If the upstream nodes do not finish running within 24 hours, the trigger command is lost and the scheduling command sent by the external environment becomes invalid.

  • After the current HTTP trigger node instance is successfully triggered, it cannot be triggered again.

Prerequisites

  • The RAM user that you want to use is added to your workspace.

    If you want to use a RAM user to develop tasks, you must add the RAM user to your workspace as a member and assign the Develop or Workspace Administrator role to the RAM user. The Workspace Administrator role has more permissions than necessary. Exercise caution when you assign the Workspace Administrator role. For more information about how to add a member and assign roles to the member, see Add members to a workspace.

  • A serverless resource group is associated with your workspace. For more information, see the topics in the Use serverless resource groups directory.

  • Before you develop an HTTP trigger node, you must create the corresponding HTTP trigger node. For more information, see Create an HTTP trigger node.

Limitations

  • The HTTP trigger node feature is available only in Dataworks Enterprise Edition and higher editions. For more information about DataWorks editions, see DataWorks editions.

  • The HTTP trigger node is used only to trigger tasks and cannot be used as a compute task. You must set the task nodes that you want to run as downstream nodes of the HTTP trigger node to trigger and execute the tasks.

Create an HTTP trigger node

Create an HTTP trigger node

For information about how to create a node, see Create an HTTP trigger node.

Configure the HTTP trigger node

After you create an HTTP trigger node, configure the following parameters in Scheduling Settings on the right side of the node editing page. For more information about other parameters, see Schedule settings.

Parameter

Description

Resource Group for Scheduling

Select the serverless resource group that you have associated.

Instance generation method

You can select T +1 generated next day or Instant generation after publishing.

Note
  • The HTTP trigger node is a zero-load node. You do not need to write any node content.

  • If the HTTP trigger node has no upstream node, the root node of the workflow is used as the default upstream node.

Deploy the HTTP trigger node

  1. After you complete the schedule settings, submit and deploy the HTTP trigger node to the production environment. For more information, see Deploy nodes.

  2. After a task is deployed, it runs periodically based on your schedule settings. You can view the deployed scheduled tasks in Operation and Maintenance Center > Node O&M > Auto Triggered Task O&M > Auto Triggered Task and perform O&M operations on the tasks. For more information, see Manage scheduled tasks.

Trigger configuration in external scheduling environments

When you configure trigger settings in an external scheduling environment, you must configure the HTTP trigger node instance parameters obtained earlier in one of the following methods and call the TriggerSchedulerTaskInstance operation to trigger the HTTP trigger node.

Obtain HTTP trigger node instance parameters

Based on the instance generation method you selected when you configured the HTTP trigger node, view and record the HTTP trigger node instance parameters in Operation Center.

Note
  • T+1 next day generation: You must go to Operation Center the next day to view and record the HTTP instance parameters.

  • Instant generation after deployment: You can go to Operation Center immediately to view and record the HTTP instance parameters.

  1. Log on to the DataWorks console. In the target region, click Data Development and O&M > Operation Center in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Operation Center.

  2. In the left-side navigation pane, click Auto Triggered Task O&M > Cycle Examples to go to the Cycle Examples page.

  3. In the list, find the HTTP trigger node instance that you created and record the Task ID and Scheduled Time of the instance.

    Note

    Hover over the name of the HTTP trigger node instance to view the Task ID of the instance.

Method 1: Java

  1. Install the Java SDK. For more information, see Install the Java SDK.

    Use the following POM configuration for the DataWorks SDK.

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

    You can go to the TriggerSchedulerTaskInstance debugging page and view the complete Java sample on the SDK Sample tab.

    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 {
        // Method to trigger a DataWorks node run
        public static TriggerSchedulerTaskInstanceResponse runTriggerScheduler(com.aliyun.dataworks_public20240518.Client client, Long nodeId, String EnvType, Long TriggerTime) throws Exception {
            TriggerSchedulerTaskInstanceRequest request = new TriggerSchedulerTaskInstanceRequest(); // Create API request object
            request.setTaskId(nodeId); // Set the node ID to trigger
            request.setEnvType(EnvType); // Set the project environment
            request.setTriggerTime(TriggerTime); // Set the scheduled trigger time (millisecond timestamp)
            RuntimeOptions runtime = new RuntimeOptions(); // Initialize runtime options
            return client.triggerSchedulerTaskInstanceWithOptions(request, runtime); // Execute the API call and return the response
        }
        public static void main(String[] args) throws Exception {
            // Initialize node ID (example value)
            String nodeId = "xxx";
            // Initialize project environment (example value)
            String EnvTypeStr = "xxx";
            // Initialize scheduled time (example value)
            String cycTimeStr = "xxx";
            // Set the endpoint
            String endpoint = "xxx";
            // Convert string to Long type node ID
            Long nodeId1 = Long.parseLong(nodeId);
            // Print usage instructions
            System.out.println("Usage: java -jar test-1.0-SNAPSHOT.jar nodeId EnvTypeStr cycTimeParam");
            // Parse the scheduled time and convert to timestamp
            SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(sdft.parse(cycTimeStr)); // Parse the time string
            Long cycTime = calendar.getTimeInMillis(); // Get the millisecond timestamp
            // Print debug info (timestamp)
            System.out.println("Scheduled timestamp: " + cycTime);
            // Initialize OpenAPI config object
            Config config = new Config();
            config.setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")); // Get AccessKey ID from environment variable
            config.setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"));// Get AccessKey Secret from environment variable
            config.setEndpoint(endpoint);
            // Create Alibaba Cloud client instance
            Client client = new Client(config);
            // Execute the trigger node operation
            TriggerSchedulerTaskInstanceResponse response = runTriggerScheduler(client, nodeId1,EnvTypeStr, cycTime);
            // Print the API response (JSON format)
            System.out.println(com.aliyun.teautil.Common.toJSONString(com.aliyun.teautil.Common.toMap(response)));
        }
    }

    Replace the relevant parameters in the preceding code with the actual values required by your business based on the following parameter descriptions.

    Parameter

    Description

    nodeId

    The Task ID of the HTTP trigger node obtained in the Obtain HTTP trigger node instance parameters step.

    EnvTypeStr

    The project environment in which the HTTP trigger node resides.

    Use Prod for the production environment.

    Use Dev for the development environment.

    cycTimeStr

    The Scheduled Time of the HTTP trigger node task obtained in the Obtain HTTP trigger node instance parameters step. The time format is yyyy-MM-dd HH:mm:ss.

    endpoint

    The endpoint of the workspace in which the target HTTP trigger node resides. For more information, see Alibaba Cloud OpenAPI Developer Portal endpoints.

    ALIBABA_CLOUD_ACCESS_KEY_ID

    The AccessKey ID of the Alibaba Cloud account to which the target HTTP trigger node belongs.

    1. Obtain the AccessKey information.

      Log on to the DataWorks console, hover over the profile icon in the upper-right corner of the top navigation bar, and click to go to the Accesskey Management page to obtain the AccessKey ID and AccessKey Secret.

    2. Configure environment variables. Configure the obtained AccessKey ID and AccessKey Secret as environment variables for the current environment. You can dynamically obtain the AccessKey information by reading environment variables in your code to avoid security risks caused by plaintext storage. For more information, see Configure environment variables.

    ALIBABA_CLOUD_ACCESS_KEY_SECRET

    The AccessKey Secret of the Alibaba Cloud account to which the target HTTP trigger node belongs.

Method 2: Python

  1. Install the Python SDK. For more information, see Install the Python SDK.

    Install the DataWorks SDK by running the following command.

    pip install alibabacloud_dataworks_public20240518==6.2.0
  2. Code sample.

    You can go to the TriggerSchedulerTaskInstance debugging page and view the complete Python sample on the SDK Sample tab.

    On the left side of the debugging page, configure the request parameters TaskId (integer), EnvType (string), and TriggerTime (integer). On the right side, select Python as the language to view the complete SDK sample code. Click Run Sample to debug online.

Method 3: API debugging tool

You can go to the TriggerSchedulerTaskInstance debugging page, configure the following parameters in the corresponding sections, and click Submit to initiate the call.

Parameter

Description

TaskId

The Task ID of the HTTP trigger node obtained in the Obtain HTTP trigger node instance parameters step.

EnvType

The project environment in which the HTTP trigger node resides.

Use Prod for the production environment.

Use Dev for the development environment.

TriggerTime

The Scheduled Time of the HTTP trigger node task obtained in the Obtain HTTP trigger node instance parameters step. The time must be converted to a millisecond timestamp.

Reference

DataWorks provides the HTTP trigger node feature to trigger and execute tasks in cross-tenant scenarios. For more information, see Use the HTTP trigger node to trigger node execution across tenants.