This topic describes how to execute a workflow by using the CloudFlow console or Alibaba Cloud CLI.
Background information
To execute a workflow, you must specify the name of the workflow, and the name and input of the execution. The name and input of the execution are optional. Executing a workflow is an asynchronous operation. You can call DescribeExecution to view the execution result and call GetExecutionHistory to view the execution details.
Take note of the following items when you execute a workflow:
Each execution name must be unique within a workflow.
The input of execution must be in the JSON format.
The CloudFlow console
Log on to the CloudFlow console.
On the Workflows page, click the name of the workflow that you want to manage.
On the Details page of the workflow, click Start Execution. In the dialog box that appears, configure Execution Name (Optional) and Input (Optional).
Click Start Execution. If you do not specify an execution name, Serverless Workflow automatically generates an execution name.
Alibaba Cloud CLI
You can run the following command to execute a workflow. Example:
aliyun fnf StartExecution --FlowName cli_guide_1 --ExecutionName run1
Expected output:
{
"Name": "run4",
"FlowName": "cli_guide_1",
"FlowDefinition": "version: v1\ntype: flow\nsteps:\n - type: pass\n name: pass1\n - type: pass\n name: pass2",
"Input": "{}",
"Output": "",
"Status": "",
"StartedTime": "2024-06-24T03:04:38.614Z",
"StoppedTime": "",
"RequestId": "bf6ec55d-cade-187e-e7f2-a49c010b953a"
}