All Products
Search
Document Center

CloudFlow:Interface overview

Last Updated:Dec 12, 2023

CloudFlow provides a low-code, graphical workflow designer Workflow Studio. You can create and edit a workflow in Workflow Studio, configure input and output filtering rules for steps in the workflow, and configure error handling rules. This topic describes the interface overview of Workflow Studio.

Interface glance of Workflow Studio

The interface of Workflow Studio can be divided into status view, flow canvas, and parameter configuration sections from left to right, as shown in the following figure.

image.png

  • State view section

    This section contains the Actions, Flow, and Pattern tabs.

    On the Actions tab, you can view the API operations of other Alibaba Cloud services that can be integrated with CloudFlow, including services in the sectors of elastic computing, Internet middleware, databases, and AI. You can drag and drop the API operations to the flow canvas. Each API operation represents a task state node.

    The flow tab provides the state list. State transitions are displayed on this tab, but specific execution content is not displayed on this tab. Workflow Studio provides the following flow nodes: Choice, Parallel, Map, Pass, Wait, Succeed, and Fail.

    On the Pattern tab, you can view the workflow building modules that are preset by CloudFlow. You can drag and drop the modules to the flow canvas to create a flow.

  • ② Flow canvas section

    You can drag nodes from the Actions, Flow, and Pattern tabs in the state view section to the canvas. You can also drag and drop nodes to adjust the sequence of existing states in a flow and create a custom flow.

  • ③ Parameter configuration section

    You can click a state in the custom flow on the flow canvas and then configure and view the properties of the state in the parameter configuration section.

State view section

In the state view section, you can click the Actions, Flow, or Pattern tab. Then, drag a state node (API operation) or flow node to the canvas. You can also enter a keyword in the search box at the top of the state view section to search for a node.

image.png

Flow canvas section

On the flow canvas, you can drag and drop nodes to create custom flowcharts. You can also online debug workflows to generate executable workflows while you edit the workflows.

Generate a flowchart

You can drag a state node (API operation) or a flow node in the state view section to the flow canvas section. When a horizontal or vertical line appears, release the mouse to place the node in the desired position. This way, you can create a custom flowchart that meets your business requirements. Workflow Studio automatically generates code when it generates a flowchart. You do not need to manually write code.

image.png

You can also click the buttons in the upper-left corner of the flow canvas to zoom in or out of the canvas, center the flowchart, delete the selected state node (API operation) or flow node, and undo the previous action.

image.png

Debug workflows

If you have configured parameters for a state node, you can online debug the workflow while you edit a flowchart. Move the pointer over a state node and click the image.png icon on the right of the state node to debug the workflow. After the workflow is debugged, click the image.png icon to view the debugging result.

image.png

Parameter configuration section

After you drag and drop a state node (API operation) or a flow node from the state view section to the flow canvas, you must configure the node. Click the node that you want to configure on the canvas. Then, configure the Basic Settings, Input Settings, Output Settings, and Troubleshooting parameters in the parameter configuration section.

image.png

In the following example, the InvokeFunction flow node is selected. The following table describes the key parameters that you must configure. For other parameters, use the default values.

Category

Parameter

Description

Example

Basic Settings

State Name

Enter a name for the state node. The name describes the feature of the state.

InvokeFunction

Invocation Parameters

Select the Function that you want to invoke, the Version or Alias of the function, and the Service to which the function belongs. Then, enter the payloads that trigger the function.

You can click Switch to YAML Editing in the upper-right corner to specify the function name, function version, and service name in a YAML script.

A YAML example:

serviceName: test
qualifier: LATEST
functionName: function
body: '{"key": "value"}'

Service

Select the name of the service to which the function that you want to invoke belongs.

service

Version or Alias

Select the version or alias of the function that you want to invoke.

LATEST

Function

Select the name of the function that you want to invoke.

function

Function invocation

Enter the payloads that trigger the function. You can enter the payloads in the YAML or JSON format.

{
  "key1": "value1",
  "key2.$": "$.myStateInput.key",
  "key3": 100
}

Additional Parameters: Click image.png to unfold additional parameters. Then, configure the additional parameters.

Next State

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

Parallel

Input Settings

Configure the filtering methods of inputs. Valid values:

  • Use JSONPath to select some parameters: Enter a filter expression in the code editor. Use JSONPath to filter some parameter objects as the inputs of the node.

  • Take raw inputs as node inputs: Use the original inputs of the node as the inputs of the node.

  • Use parameters filters to construct parameters: Use parameter filters to construct new parameters and use the new parameters as the inputs of the node. You can construct parameters in the YAML or JSON format. Example:

    FieldA: 123
    FieldB: string
    FieldC.$: $Input

Output Settings

Configure the filtering method of outputs. Valid values:

  • Use JSONPath to select some parameters: Enter a filter expression in the code editor. Use JSONPath to filter some parameter objects of the valid outputs and use the parameter objects as the outputs of the node.

  • Pass raw inputs to outputs: Pass the original inputs of the node downstream as outputs.

  • Use parameters filters to construct parameters: Use parameter filters to construct new parameters and use the new parameters as the outputs of the node. You can construct parameters in the YAML or JSON format. Example:

    FieldA: 123
    FieldB: string
    FieldC.$: $Input

Troubleshooting

Retry upon Error: Configure the retry policy when an error occurs. Click Add Retry to add one or more retry policies.

Error Type

Select one or more error types.

FC.BadResponse

Maximum Retries

Set the maximum number of retries.

5

Retry Interval

Specify the retry interval. Unit: seconds.

3

Exponential Fallback

Specify the maximum duration of retries in exponential fallback mode. Unit: minutes.

5

Fallback upon Error: Configure a fallback policy when an error occurs. Click Add Fallback to add one or more fallback policies.

Error Type

Select one or more error types.

FC.EntitvToolLarge

Rollback Status

Specify the state that the flow falls back when a specified error is captured.

Hello World

Response

When a specified error is captured, use the response to add the error to the inputs of the fallback node. You can configure the response in the YAML or JSON format.

{
"key":string"hello world"
}