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.
① 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.
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.
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.
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 icon on the right of the state node to debug the workflow. After the workflow is debugged, click the icon to view the debugging result.
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.
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.
Enter a name for the state node. The name describes the feature of the state.
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:
Select the name of the service to which the function that you want to invoke belongs.
Version or Alias
Select the version or alias of the function that you want to invoke.
Select the name of the function that you want to invoke.
Enter the payloads that trigger the function. You can enter the payloads in the YAML or JSON format.
Additional Parameters: Click to unfold additional parameters. Then, configure the additional parameters.
Select the next state that you want the flow to transit to. The setting takes effect in real time.
Configure the filtering methods of inputs. Valid values:
Configure the filtering method of outputs. Valid values:
Retry upon Error: Configure the retry policy when an error occurs. Click Add Retry to add one or more retry policies.
Select one or more error types.
Set the maximum number of retries.
Specify the retry interval. Unit: seconds.
Specify the maximum duration of retries in exponential fallback mode. Unit: minutes.
Fallback upon Error: Configure a fallback policy when an error occurs. Click Add Fallback to add one or more fallback policies.
Select one or more error types.
Specify the state that the flow falls back when a specified error is captured.
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.