All Products
Search
Document Center

CloudFlow:Stop an execution

Last Updated:Jul 24, 2024

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 CloudFlow console.

  2. On the Flows page, click the name of the workflow whose execution you want to stop.

  3. On the Executions tab of the Details page of the workflow, click the name of the execution that you want to view.

  4. On the Details page, click Stop Execution. In the Stop Execution dialog box, click OK to stop the execution.

    image

    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": "2024-06-26T02:11:57.1Z",
      "StoppedTime": "2024-06-26T02:12:12.138Z",
      "RequestId": "18a1b2f9-348e-d546-e78a-76b819bd25e0"
    }
  • 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": "2024-06-26T02:15:38.614Z",
      "StoppedTime": "2024-06-26T02:15:59.138Z",
      "RequestId": "1f6ec55d-cade-187e-e7f2-a49c010b953a"
    }