After you register, publish, and enable an extension in the DataWorks Open Platform, DataWorks sends an event message to your extension when an action in the workspace triggers an extension point event. You can then view the results returned by your extension. This topic describes the extension point events that Operation Center supports and shows you how to use them to trigger custom validation.
Prerequisites
-
You have enabled message subscription. For more information, see Enable message subscription.
-
You have developed and deployed the extension. For more information, see Develop and deploy an extension using Function Compute.
Background
DataWorks can send you notifications for extension point events. You can also use extensions to create process checkpoints based on supported extension points. This allows you to run custom logic for specific operations. To use this feature, you must first register your extension in the DataWorks console and then enable it in Administration > Extensions. In the navigation pane of DataWorks Administration, click Extensions to open the extension management page. In the Extension Scope section, select Workspace as the type, choose the target workspace, and then turn on the Enable switch for your extension. In the Extension Data Authorization dialog box that appears, confirm the authorization details, such as the OpenAPI for a file change event: UpdateIDEEventResult. Select I have read and agree to the risks associated with the preceding data authorization. and then click Agree and Authorize.
Only a workspace administrator can enable an extension in Administration > Extensions.
For more information about extensions, see Extension overview.
The preceding procedure is for a workspace-level extension. For more information, see Supported extension point events.
Overview
The Operation Center module enables your services to receive messages for the following extension point events. You can also register a local program as a DataWorks extension to receive these event messages, process them with custom logic, and return the results to the platform by calling the UpdateWorkbenchEventResult API. This mechanism enables you to implement process controls in DataWorks. The Operation Center supports the following extension points:
Event | Description |
node change event |
Note In this context, a node refers to a task in the Scheduled Tasks list in the production Operation Center. |
backfill data event |
|
In this context, a node refers to a task in the production Operation Center Scheduled Tasks list. When you perform the preceding operations on tasks on the Scheduled Tasks page in the production environment, extension validation is triggered. Performing these operations on scheduled tasks in the development environment does not trigger extension validation. Similarly, freezing or unfreezing an instance on the instance page does not trigger extension validation.
Supported extension points
Operation Center: Freeze and unfreeze a node
This example shows how to trigger an extension when you freeze a node. In Operation Center, on the Scheduled Tasks page, right-click a target node, such as xc_demo_start, and select Suspend (Freeze) from the shortcut menu. This action is an extension point. You can also trigger this action by clicking the freeze icon in the toolbar. After the action is triggered, the Operation Check Details panel (the extension) appears on the right. This panel displays the node name, the operation type (Suspend/Freeze), and the status of the validation checkpoint, such as 'Operation check in progress'. You can click View Details or View Documentation to see the validation results, click Recheck to trigger the validation again, or click Close to exit the panel.
Operation Center: Undeploy a node
In the Scheduled Tasks list, right-click a target task, such as test_select, and select Undeploy node from the shortcut menu. After you initiate the undeployment, an Undeployment check in progress message and a status icon appear in the task row, indicating that an extension is validating the operation. Click the status icon to open the Operation Check Details dialog box. This dialog box displays the task name, the operation type (Undeploy), the checkpoints and their status. The Operation column provides links to View Details and View Documentation. The Recheck and Close buttons are at the bottom of the dialog box.
Operation Center: Backfill data
In the left-side navigation pane of Operation Center, select Scheduled Tasks. In the DAG on the right, right-click a target task node and select a backfill data option, such as for the current node, current and downstream nodes, in massive node mode, or in advanced mode. This action triggers a pre-check extension point event. After you submit the task, you can view the check status of the backfill data task by selecting Backfill Instances in the left-side navigation pane. Click the check status to open the Operation Check Details dialog box, which displays the validation results from the extension, including the checkpoint names and their statuses.
References
To enable an extension, see Enable an extension.
For more information about extension point events in Operation Center, see Supported extension point events.
For the message format of a backfill data event, see Backfill data event.
For the message format of a node change event, see Node change event (create, modify, delete, freeze, unfreeze, and undeploy).