本文介绍如何通过控制台和命令行工具查看执行历史。
背景信息
历史事件详细的记录了步骤的执行状态。您可以通过这些事件了解一个流程当前的执行步骤、输入、输出、流程执行持续时长和失败原因等信息。同时,Serverless 工作流服务利用这些状态数据跟踪流程执行,确保系统的高可用性。
使用控制台查看执行历史
登录云工作流控制台。
在流程页面,选择要查看的流程。
在流程详情页面,选择要查看的执行。
在执行详情页面,查看执行的历史记录。
使用命令行工具查看执行历史
您可以执行以下命令查看执行的历史记录。
aliyun fnf GetExecutionHistory --FlowName cli_guide_1 --ExecutionName run1
预期输出:
{
"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"
}
文档内容是否对您有帮助?