View execution history

Updated at:

You can view the execution history of a flow in the CloudFlow console or by using the Alibaba Cloud CLI.

Background

The execution history records detailed events for each step in a flow execution, including the step status, input, output, duration, and failure causes. Serverless Workflow uses this event data to track executions and ensure high availability.

Using the console

  1. Log in to the CloudFlow console.

  2. On the Flows page, click the name of the target flow.

  3. On the flow's Details page, click the name of the target execution.

  4. On the Execution Details page, view the execution history.

    get-exec-history-1

Using the CLI

Run the following command to view the execution history:

aliyun fnf GetExecutionHistory --FlowName cli_guide_1 --ExecutionName run1

Expected output:

{
  "Events": [
    {
      "StepName": "",
      "Type": "ExecutionStarted",
      "EventId": 1,
      "ScheduleEventId": 0,
      "EventDetail": "{\"input\":{}}",
      "Time": "2024-06-24T02:58:42.043Z"
    },
    {
      "StepName": "pass1",
      "Type": "StepEntered",
      "EventId": 2,
      "ScheduleEventId": 1,
      "EventDetail": "{\"input\":{},\"local\":{}}",
      "Time": "2024-06-24T02:58:42.077Z"
    },
    {
      "StepName": "pass1",
      "Type": "StepStarted",
      "EventId": 3,
      "ScheduleEventId": 2,
      "EventDetail": "{\"input\":{}}",
      "Time": "2024-06-24T02:58:42.091Z"
    },
    {
      "StepName": "pass1",
      "Type": "StepSucceeded",
      "EventId": 4,
      "ScheduleEventId": 3,
      "EventDetail": "{\"output\":{}}",
      "Time": "2024-06-24T02:58:42.109Z"
    },
    {
      "StepName": "pass1",
      "Type": "StepExited",
      "EventId": 5,
      "ScheduleEventId": 4,
      "EventDetail": "{\"local\":{}}",
      "Time": "2024-06-24T02:58:42.127Z"
    },
    {
      "StepName": "pass2",
      "Type": "StepEntered",
      "EventId": 6,
      "ScheduleEventId": 5,
      "EventDetail": "{\"input\":{},\"local\":{}}",
      "Time": "2024-06-24T02:58:42.144Z"
    },
    {
      "StepName": "pass2",
      "Type": "StepStarted",
      "EventId": 7,
      "ScheduleEventId": 6,
      "EventDetail": "{\"input\":{}}",
      "Time": "2024-06-24T02:58:42.156Z"
    },
    {
      "StepName": "pass2",
      "Type": "StepSucceeded",
      "EventId": 8,
      "ScheduleEventId": 7,
      "EventDetail": "{\"output\":{}}",
      "Time": "2024-06-24T02:58:42.169Z"
    },
    {
      "StepName": "pass2",
      "Type": "StepExited",
      "EventId": 9,
      "ScheduleEventId": 8,
      "EventDetail": "{\"local\":{}}",
      "Time": "2024-06-24T02:58:42.181Z"
    },
    {
      "StepName": "",
      "Type": "ExecutionSucceeded",
      "EventId": 10,
      "ScheduleEventId": 9,
      "EventDetail": "{\"output\":{}}",
      "Time": "2024-06-24T02:58:42.194Z"
    }
  ],
  "RequestId": "98802e07-44a2-221a-fbc2-ec167a871259"
}