All Products
Search
Document Center

CloudFlow:Create a workflow

Last Updated:Mar 20, 2025

This topic describes how to create a workflow in the CloudFlow console. In the following example, a workflow that executes an HTTP request is created.

Background information

In CloudFlow, a workflow defines business logic and the general information required for logic execution. For example, an order management workflow may include steps such as order creation, payment processing, goods reservation, shipment, and notification. After you create a workflow, you can execute the workflow multiple times based on different inputs. In the example of order management, the workflow is initiated each time with different order information. CloudFlow provides a variety of control primitives to describe business logic. The control primitives include executing tasks in series, in parallel, selectively, and in parallel for a set of data.

Procedure

  1. Log on to the CloudFlow console. In the top navigation bar, select a region.

  2. On the Workflows page, click Create Workflow.

  3. In the Create Workflow dialog box, select Use Blank Canvas, configure Workflow mode, Workflow Name and Workflow description, and then click Create.

    In the following example, the workflow is created in standard mode. For information about the workflow modes supported by CloudFlow, see Standard workflow and express workflow.

    image

  4. On the CloudFlow Studio tab, select the Request state node in the state view section and drag the state node to the canvas. When a horizontal or vertical line appears, release the mouse to place the state node in the workflow.

    image

  5. Select the Request state node and configure the Basic Settings, Input Settings, Output Settings, and Troubleshooting parameter categories for the state node.

    The following table describes the major parameters that belong to the Basic Settings parameter category. Use default values for other parameters. For more information about the Input Settings, Output Settings, and Troubleshooting parameter categories, see Procedure.

    Section

    Parameter

    Example

    Invocation Parameters

    • Request Method: Select an HTTP request method. Example: GET.

    • Request URL:

      • Enter the URL of the HTTP service that you request for if you select Fixed Value.

      • You can use format to concatenate an expression if you select Expression.

    • Header: Optional. Add an HTTP request header. Examples: Content-Type and Authorization.

    • Body: Enter request body data based on your requirements. This parameter is valid only when the Request Method parameter is set to POST.

    • Query: Optional. Set a query method based on your requirements.

    Note

    You can also click Switch to YAML Editing next to Invocation Parameters to define invocation parameters in a sample YAML script.

    Parameters:
          method: POST
          url.$: format("http://www.{}.com","aliyun") 
          body: {}
          headers:
            Content-Type: multipart/form-data

    Next State

    Select the next state to which you want the flow to transition. The setting takes effect in real time.

    Hello World

  6. (Optional) On the Configure Workflow tab of the Edit Workflow page, configure the execution role of the workflow. Then, click Save and Exit.

    You can select an existing RAM role. The first time you use CloudFlow, you need to create a RAM role. For more information, see Create an execution role.

    Note

    In this example, the workflow executes an HTTP request. You do not need to create a RAM role. If another Alibaba Cloud service is integrated into your workflow, you must configure a RAM role that is attached the required permission policy to access another Alibaba Cloud service.

References

  • You can also use an SDK or call an API operation to create a workflow. For more information, see CreateFlow.

  • CloudFlow provides a variety of state nodes that you can use to conveniently build a workflow framework. For more information, see States.