All Products
Search
Document Center

DataWorks:Enable message subscription

Last Updated:Jun 20, 2026

The OpenEvent module in DataWorks uses EventBridge for event message subscription and sending. After you create a custom event bus in EventBridge, you must configure an event distribution channel in DataWorks to publish events. You can then create rules in EventBridge to manage these events. This topic explains how to enable event message subscription and configure a custom event bus.

Usage notes

  • Edition: DataWorks Enterprise Edition only.

  • Regions: Supported in China (Beijing), China (Hangzhou), China (Shenzhen), China (Shanghai), China (Zhangjiakou), China (Chengdu), US (Silicon Valley), US (Virginia), Germany (Frankfurt), Japan (Tokyo), China (Hong Kong), and Singapore.

  • Access control: Only Open Platform Administrator, Tenant Administrator, Alibaba Cloud accounts, or RAM users with Aliyundataworksfullaccess have read and write permissions for the developer console. Open Platform administrator. Grant the AliyunDataWorksFullAccess permission to a RAM user.

  • Dependency: OpenEvent uses EventBridge for message subscription and consumption. Activate EventBridge before you begin.

Precautions

If your DataWorks Enterprise Edition subscription expires, all extensions become invalid and can no longer trigger event checks. The system automatically passes any triggered checks that have not reached a terminal state.

How it works

DataWorks exposes status change messages for core processes. In the OpenEvent module of the DataWorks Open Platform, you can map a DataWorks workspace to an EventBridge event bus. This configuration pushes all published messages from the workspace to the specified event bus. You can then manage these messages in EventBridge. For example, you can filter the messages sent from DataWorks to find those required by a downstream system and define how and where those messages are delivered.

image
Important

Messages generated by operations in tenant-level modules are automatically pushed to the default event bus, named Default, in EventBridge. For a list of supported tenant-level events, see Tenant-level events.

DataWorks configuration

You must configure an event distribution channel in DataWorks to push event messages to an EventBridge event bus. Follow these steps to authorize DataWorks to access EventBridge and specify the event bus where DataWorks can push published messages.

Step 1: Grant service authorization

If you are using the OpenEvent service for the first time, use your Alibaba Cloud account or a RAM user that has the AliyunDataWorksFullAccess permission to authorize DataWorks to access EventBridge.

  1. Log on to the DataWorks console. In the target region, click More > Open Platform in the left-side navigation pane. Click Go to Open Platform to open the Developer Backend page.

  2. On the Developer Backend page, click OpenEvent in the left-side navigation pane to go to the OpenEvent page.

  3. Authorize DataWorks to access EventBridge resources.

    If this is your first time using the service, an Authorize button appears. Follow the on-screen instructions to grant DataWorks permission to access EventBridge resources. This action automatically creates a service-linked role named AliyunServiceRoleForDataWorksOpenPlatform in the RAM console under Identities > > Roles.

Step 2: Configure event distribution channel

An event distribution channel maps a DataWorks workspace to an EventBridge event bus. This ensures that all published messages from the workspace are pushed to that specific bus.

  1. Click Add Event Distribution Channel. In the dialog box that appears, configure the Workspace for Event Distribution and Distribute to Custom Event Bus in EventBridge parameters.

  2. If no event bus is available in EventBridge, you can click Create Custom Event Bus to go to the EventBridge console and create one. Alternatively, click Quickly Create Custom Event Bus with Same Name as Your Workspace to immediately generate an event bus.

    In the Add Event Distribution Channel dialog box, select a workspace for the Workspace for Event Distribution parameter and a custom event bus for the Distribute to Custom Event Bus in EventBridge parameter, and then click OK.

Step 3: Enable event distribution channel

After you configure the event distribution channel, you can view it on the OpenEvent page. In the Actions column, you can Delete, Enable, or Disable the channel.

  • Enable: After you enable the channel, event messages from the workspace are pushed to the corresponding event bus.

    You can then go to the EventBridge console to view all event messages pushed from DataWorks, filter for the messages that a downstream consumer needs, and define how and to which services those messages are delivered.

  • Disable/Delete: If you disable or delete the channel, DataWorks stops pushing event messages from the workspace to the corresponding event bus. You can no longer receive these event messages through EventBridge.

EventBridge configuration

After you enable the event distribution channel in DataWorks, published messages are automatically pushed to the specified EventBridge event bus. You must then configure filtering in EventBridge to select specific messages for consumption and define their delivery targets.

Step 1: Create custom event bus

If you created a custom event bus with the same name as your DataWorks workspace in Step 2: Configure an event distribution channel, you can use that bus directly. If you clicked Create Custom Event Bus, follow these steps to create one. For more information, see Event bus overview.

  1. Log on to the EventBridge console and click Event Bus in the left-side navigation pane.

  2. On the Event Buses page, go to the Custom Event Buses tab and click Quickly Create. The following example creates a custom event bus named DataWorks2023. To quickly create the bus, you only need to configure the Name and Description. You can skip the Event Source, Rule, and Target steps.

Step 2: Configure event rule

After you create the event bus, you can manually configure an event rule to route DataWorks event messages to your target services.

  1. In the left navigation bar, click Event Bus. Find the target EventBridge event bus and click Actions > Event Rule to go to the event rule configuration page.

  2. On the Event Rules page, click Create Rule in the upper-left corner.

  3. Configure basic information: Enter a name and description for the event rule. In the Configure basic information step, the Event bus is set to DataWorks2023 by default and cannot be edited. For Name, enter instanceStatusChanges (2 to 127 characters, can contain letters, digits, or hyphens). For Description, enter a description such as "This rule filters for 'instance status change' messages from all event messages in the workspace.".

  4. Configure event pattern : An event pattern filters messages based on their content. Configure the parameters as follows:

    • Event Source Type: Select Custom Event Source.

    • Event Source: Keep the default value.

    • Pattern Content: Use JSON format to specify the event message type. Each DataWorks event message has a fixed type. You can find the message type for each operation in Reference: Event list and message format and use it as the value for the type key in the pattern content.

      {
        "source": [
          "acs.dataworks"
        ],
        "type": [
          "dataworks:InstanceStatusChanges:InstanceStatusChanges"
        ]
      }
  5. Debug event pattern : After you configure the event pattern, you can debug it to verify that it works as expected.

    If you have completed Step 3: Enable the event distribution channel in DataWorks, event messages are being sent to EventBridge. To test your pattern, go to the Event Tracking page, find an event from DataWorks for your bus, and copy its details. Paste the details into the Event Pattern Debugging section and click Test to verify the filter.

    1. If the event types do not match, the message "Match failed" is displayed.

    2. If the event types match, the message "Match succeeded. The event can be triggered as expected." is displayed.

  6. Configure event target: In addition to custom services, you can push events to various other targets for consumption. For more information, see Event targets overview.

    When you configure the event target, set Service Type to HTTPS. For URL, enter the HTTPS service address, such as https://example.com/eventBridge/dataworksEvent. For Body, select Complete Event. For Network Type, select Public Network.

    Note

    The configuration in the figure shows messages being pushed to a specified HTTPS service. To have an extension receive this message, select HTTPS as the service type and enter the deployment address of the extension in the URL field.

  7. After you configure and save the event rule, EventBridge can route DataWorks event messages based on your settings. This configuration also supports extensions.

View pushed event messages

When the DataWorks event distribution channel is enabled and an event is triggered in DataWorks, you can view the pushed event messages on the Event Tracking page for the associated event bus. You can find different event messages based on their type. For a list of event types, see Reference: Event list and message format.

On the Event Tracking page, select Query by Time Range. Set a time range and click Query to view event records triggered by DataWorks, such as events with the type dataworks:FileChange:DeployFile (file deployment) or dataworks:FileChange:CommitFile (file commit). To view more information about a record, check its event trajectory and event details.

Best practices

Subscribing to messages with a local service: Best Practices: Custom Task Deployment Lockdown.