Create and manage workflows

Updated at:

A workflow is the core automation and orchestration engine in the data intelligence platform. It connects discrete data processing, AI parsing, and model inference tasks into executable and observable production-grade pipelines. This topic describes how to create and manage workflows.

Prerequisites

  • You can use offline workflows only after you purchase the unstructured data feature for your instance.

  • You can use real-time workflows and online workflows only after you purchase the Unstructured Data Feature - Standard Edition + Advanced Extension Package for your instance.

Limitations

  • You can create workflows only in Basic projects.

  • Hot upgrades are not supported for real-time workflows.

  • Hot upgrades are not supported for online workflows. During an upgrade, the workflow API is unavailable for about 10 minutes. After you update an online workflow, it can take up to 3 minutes for the changes to take effect in the production environment.

Permissions

In addition to Project Admin and Developer roles, members with the Data Processing - Edit permission can create, edit, delete, and move workflows, and acquire locks in the project. Members with the Data Processing - Execute permission can run, submit, take offline, and take offline and delete workflows in the project.

Workflow creation methods

  • Dataphin supports three methods for creating a workflow: you can create a workflow conventionally, , create a workflow by uploading a development script, , or use the CreateWorkFolwByJson OpenAPI operation.

  • Starting from Dataphin V6.4.0, the offline workflow architecture was upgraded for a better user experience. Workflows created with the previous architecture can still run but cannot be edited. To make changes, you must create a new task to migrate the workflow. We apologize for any inconvenience.

  • After the offline workflow upgrade, the system automatically creates a read dataset operator that serves as the sole, non-deletable data source. You must also configure at least one write dataset operator to close the data loop. If the output contains a URL field, the system enables file copy by default to ensure asset persistence. During test runs, to ensure the context is consistent with the production environment, you cannot test a single operator in isolation. Instead, the system provides a full-link run mode that executes from the top node to the current node, to help you accurately debug logic issues.

Create a workflow

  1. In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.

  2. On the Development page, select a project from the top menu bar.

  3. In the left navigation bar, select Data Processing > Workflow. In the Workflow list, click the image icon to open the New Workflow dialog box and configure the following parameters.

    Parameter

    Description

    Name

    Enter a name for the workflow. The name can contain any characters and be up to 256 characters long.

    Scheduling type

    Select the scheduling type for the workflow. The scheduling type options are:

    • Periodic node: A task that runs at scheduled intervals.

    • Manual node: A task that has no dependencies and must be triggered manually.

    • Real-time node: An event-driven task.

    • Online node: A task that provides synchronous or asynchronous online services through an HTTP API.

    Description

    Enter a brief description of the workflow, up to 512 characters.

    Select directory

    Select the directory to store the task.

    If a required directory does not exist, click New Folder to create one:

    1. Above the workflow list on the left side of the page, click the image icon to open the New Folder dialog box.

    2. In the New Folder dialog box, enter a folder Name and optionally select its location in Select Directory.

    3. Click OK.

  4. Click OK to create the workflow.

    After the workflow is created, you can use various operators on the workflow canvas to process different types of data in the dataset.

Create a workflow by uploading a development script

  1. In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.

  2. On the Development page, select a project from the top menu bar.

  3. In the left navigation bar, select Data Processing > Workflow, and above the Workflow list, click the image icon to open the Upload Workflow Development Script dialog box.

  4. In the Upload Workflow Development Script dialog box, in addition to uploading the required JSON file for the workflow, the other parameters are the same as for the standard creation method. For more information, see Create a workflow.

Manage workflows

  1. In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.

  2. On the Development page, select a project from the top menu bar.

  3. In the left-side navigation pane, choose Data Processing > Workflow. In the Workflow list, click a workflow to view and edit it on the canvas. The following table describes other supported operations.

    Actions

    Description

    Run

    • Offline workflow: When you click Run, the workflow run might fail if the remaining Credit balance is 100 or less. We recommend that you first purchase a resource package. If the remaining Credit balance is 0 or less, the workflow run fails. If the Credit balance becomes insufficient during the run, the workflow does not stop immediately. To prevent losing previously generated computation records, the system allows an overdraft of 4,000 Credits for the current task.

    • Real-time workflow: After you click Run, you can set the Maximum Runtime, which is 10 minutes by default. When running, bounded streams automatically terminate after all data is consumed. Unbounded streams must be stopped manually, or they will stop automatically when the maximum runtime is reached. Only one instance of a workflow can run at a time.

      A real-time workflow continuously consumes Credit (including resource Credit and operator Credit) during its run. If the remaining Credit balance is 0 or less, the system sends an alert, but the workflow continues to run. If the negative Credit balance reaches between -4,000 and -5,000, the workflow stops immediately. The system commits the current Kafka offset. To resume consumption from the committed offset, you must purchase a resource package and then manually restart the workflow.

    • Online workflow: You can trigger a debug run by using actual request parameters. These parameters are automatically synchronized from the bound API dataset version. In the top toolbar of the canvas, click Run. In the Parameter Entry dialog box, enter the actual values for each parameter to start the run. After the run, you can view the run information in the Run Result panel at the bottom of the canvas. Only one debug instance of a workflow can run at a time. A debug run consumes Credit, with consumption details identical to those of a real-time workflow.

      Note
      • If you do not enter a value for a required parameter, the run is blocked.

      • When entering actual values for parameters, you can save them as a preset to facilitate repeated debugging. Each workflow can have up to 10 presets.

    Submit

    In the top toolbar of the canvas, click Submit. Review the objects to be submitted and the pre-check results, and enter a commit message. After all checks pass, click Confirm and Submit. For more information about each check item, see Workflow submission notes.

    After an online workflow is submitted, the system automatically registers it as the backend for the bound API dataset version. You can then test the call in the development environment.

    Go to O&M

    After a workflow task is submitted to the production environment, click Go to O&M to navigate to the task list in the O&M Center. The system automatically searches for the task by its ID to help you quickly find the corresponding O&M task.

    Note

    The Go to O&M operation is not supported for online workflows.

    Call (online workflows only)

    An online workflow can provide HTTP API services only after it is published to the production environment. A workflow can be published only after the API dataset to which it is bound is published. After publication, business services can call the bound API over HTTP, similar to how they call a data service API. In synchronous call mode, the system returns the business response directly after the workflow execution is complete. In asynchronous call mode, the system first returns a task_id, and the caller must poll the task status and retrieve the result by using the asynchronous status query API of data services.

    Take offline and delete

    You can take offline and delete workflows that have been submitted.

    After an online workflow is taken offline, its status changes to taken offline. The API dataset to which it is bound remains in the Published state, but the binding status of that version changes to Binding Invalid. Calls to this API version will return an HTTP 503 error. You can restore the service by resubmitting and republishing the workflow.

    Delete

    You can delete draft workflows directly. You must take submitted workflows offline before deleting them. This operation is irreversible.

    After an online workflow is deleted, the binding status of its bound API dataset version reverts to Unbound, and you can bind a new online workflow to it.