This topic describes how to modify a flow by using the Serverless Workflow console or Alibaba Cloud CLI.
Background information
If you execute a flow after you modify it, the new execution is based on the new flow information. The modified flow definition doe not affect the completed and ongoing executions.
Modify a flow by using the console
- Log on to the Serverless Workflow console.
- On the Flows page, click the name of the flow that you want to modify.
- On the Details page, click Edit to modify the flow.
- On the Edit Flow page, modify the definition, description, and executions RAM role of the flow.
version: v1 type: flow steps: - type: pass name: pass1 - type: pass name: pass2
- Click Save.
Modify a flow by using Alibaba Cloud CLI
- Replace the local definition of the flow that you want to modify with the following code. The modified flow contains two steps.
version: v1 type: flow steps: - type: pass name: pass1 - type: pass name: pass2
- Run the following command to update the flow:
aliyun fnf UpdateFlow --Description "update demo" --Type FDL --RoleArn acs:ram::xxx:xxx --Name cli_guide_1 --Definition "$(<./flow.yaml)"
Expected output:
# The execution result of the command { "Name": "cli_guide_1", "Description": "update demo", "Definition": "version: v1\ntype: flow\nsteps:\n - type: pass\n name: pass1\n - type: pass\n name: pass2", "Id": "78c68342-d63b-4cb5-9207-4e44eeb7e632", "Type": "FDL", "RoleArn": "acs:ram::xxx:xxx", "CreatedTime": "2019-05-13T05:59:51.762Z", "LastModifiedTime": "2019-05-13T05:59:51.762Z", "RequestId": "xxxx" }