All Products
Search
Document Center

CloudFlow:Stop an execution

Last Updated:Oct 30, 2023

This topic describes how to stop an execution by using the Serverless Workflow console or Alibaba Cloud CLI.

Stop an execution by using the Serverless Workflow console

  1. Log on to the Serverless Workflow console.
  2. On the Flows page, click the name of the flow whose execution you want to stop.
  3. On the Details page, click the name of the execution that you want to stop.
  4. On the Details page, click Stop Execution. In the Stop Execution dialog box, click OK to stop the execution.
    stop-exec-1
    When the execution is stopped, it enters the Aborted state.
Note If the execution has already been completed, an error is returned when you attempt to stop the execution.
stop-exec-2

Stop an execution by using Alibaba Cloud CLI

  • You can run the following command to stop an execution:
    aliyun fnf StopExecution --FlowName cli_guide_1 --ExecutionName run2 --Error Cancel --Cause "execution is not needed"

    Expected output:

    {
        "Name": "run2",
        "FlowName": "cli_guide_1",
        "FlowDefinition": "version: v1\ntype: flow\nsteps:\n  - type: pass\n    name: pass1",
        "Input": "",
        "Output": "",
        "Status": "Running",
        "StartedTime": "2019-06-24T22:00:30.365Z",
        "StoppedTime": "2019-06-24T22:00:32.862Z",
        "RequestId": "xxxx"
    }
  • After you stop the execution, you can run the following command to view the execution. The execution is in the Stopped state.
    aliyun fnf DescribeExecution --FlowName cli_guide_1 --ExecutionName run2

    Expected output:

    {
        "Name": "run2",
        "FlowName": "cli_guide_1",
        "FlowDefinition": "version: v1\ntype: flow\nsteps:\n  - type: pass\n    name: pass1",
        "Input": "",
        "Output": "",
        "Status": "Stopped",
        "StartedTime": "2019-06-24T22:00:30.365Z",
        "StoppedTime": "2019-06-24T22:00:32.866Z",
        "RequestId": "xxxx"
    }