This topic describes how to modify a workflow by using the Serverless Workflow console or Alibaba Cloud CLI.
Background information
If you execute a workflow after you modify it, the new execution is based on the new workflow information. The modified workflow definition doe not affect the completed and ongoing executions.
Modify a workflow by using the console
Log on to the Serverless Workflow console.
On the Flows page, click the name of the workflow that you want to modify.
-
On the Details page, click Edit to modify the workflow.
-
On the Edit Flow page, modify the definition, description, and executions RAM role of the workflow.
version: v1 type: flow steps: - type: pass name: pass1 - type: pass name: pass2 Click Save.
Modify a workflow by using Alibaba Cloud CLI
Replace the local definition of the workflow that you want to modify with the following code. The modified workflow contains two steps.
version: v1 type: flow steps: - type: pass name: pass1 - type: pass name: pass2Run the following command to update the workflow:
aliyun fnf UpdateFlow --Description "update demo" --Type FDL --RoleArn acs:ram::xxx:xxx --Name cli_guide_1 --Definition "$(<./flow.yaml)"Expected output:
# The output of the command { "Name": "cli_guide_1", "Description": "demo", "Definition": "version: v1\ntype: flow\nsteps:\n - type: pass\n name: pass1\n - type: pass\n name: pass2 ", "Id": "47ced55d-590b-482a-975f-915ac2365ad6", "Type": "FDL", "RoleArn": "acs:ram::xxx:xxx", "CreatedTime": "2024-06-24T02:31:43.359Z", "LastModifiedTime": "2024-06-24T02:56:19.758Z", "ExecutionMode": "Standard", "RequestId": "4534dec7-98ae-28be-bd52-741c3dd399a6" }