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 state view, workflow 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.
② Workflow 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 workflow on the workflow 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.
Workflow 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.
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 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 task-type state node is configured. 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 | The name of the state node. The name describes the feature of the state. | InvokeFunction |
Invocation Parameters | The name, version or alias, and invocation method of the function that you want to invoke, and payloads that trigger the function. You can also click Switch to YAML Editing next to Invocation Parameters to specify the name, version or alias, and invocation method of the function in a YAML script. | A sample YAML script:
| |
Function | The name of the function that you want to invoke. | myfunction | |
Version or Alias | The version or alias of the function that you want to invoke. | LATEST | |
Function Invocation Method | The method that you want to use to invoke the function. Valid values: Sync Invocation and Async Invocation. For more information about function invocation methods, see Function invocation. | Sync Invocation | |
Request Load | The payloads that trigger the function. You can enter payloads in the YAML or JSON format. |
| |
Next State | The next state to which you want the flow to transition. The setting takes effect in real time. | Parallel | |
Input Settings | The filtering method of inputs. Valid values:
| ||
Output Settings | The filtering method of outputs. Valid values:
| ||
Troubleshooting | Retry upon Error: The retry policy when an error is caught. Click Add Retry to add retry policies. | ||
Error Type | The error types that can be hit. You can select one or more error types. | FC.BadResponse | |
Maximum Retries | The allowed maximum number of retries. | 5 | |
Retry Interval Seconds | The retry interval. Maximum value: 86400. Unit: seconds. | 3 | |
Backoff Multiplication Factor | The multiplier by which the retry interval increases. | 1 | |
Maximum Backoff Seconds | The maximum period of time within which retries must be performed in exponential fallback mode. Unit: seconds. | 5 | |
Capture errors and exceptions: The capture rule that restores the flow to an expected state when an error or exception is caught. Click Add Capture Rule to add capture rules. | |||
Error Type | The error types that can be hit. You can select one or more error types. | FC.EntitvToolLarge | |
Fallback Status | The state to which the flow returns when a specified error is caught. | Hello World | |
Response | The result that is returned when a specified error is caught. The result contains the error and the error is added to the input of the fallback node. You can configure a response in the YAML or JSON format. |
|