1 ---
2 sidebar_position: 2
3 sidebar_label: "Workflow Executions"
4 tags:
5 - user guide
6 - workflow
7 ---
8
9 import { EllipsisHorizontal, ArrowUpRightOnBox } from "@medusajs/icons"
10 import { Table } from "docs-ui"
11
12 export const metadata = {
13 title: `View Workflow Executions in Medusa Admin`,
14 }
15
16 # {metadata.title}
17
18 In this guide, you'll learn how to view workflow executions in the Medusa Admin.
19
20 <Note>
21
22 This guide is primarily useful for developers and technical teams building and debugging customizations of a Medusa application.
23
24 </Note>
25
26 ## What are Workflow Executions?
27
28 [Workflows](!docs!/learn/fundamentals/workflows) are a series of steps that perform a task. You build workflows in your source code to implement custom commerce flows and features.
29
30 When you execute a workflow, Medusa runs the steps in sequence to complete the task. If you've configured the workflow to store its executions in the database as explained in the [Store Workflow Executions guide](!docs!/learn/fundamentals/workflows/store-executions), you can view the workflow's executions and their details in the Medusa Admin. This is useful for debugging workflows and ensuring they run as expected.
31
32 ---
33
34 ## View Workflow Executions
35
36 To view workflow executions, go to Settings → Workflows. There, you'll find a list of custom and Medusa workflows that have been executed and are stored in the database. You can search through the list to find the one you're looking for.
37
38 ![Workflow executions list](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496862/User%20Guide/Screenshot_2025-02-25_at_5.16.30_PM_fjkbrc.png)
39
40 ### Workflow Execution Status
41
42 In the list, you can view the status of each workflow execution. A workflow execution's status can be:
43
44 <Table>
45 <Table.Header>
46 <Table.Row>
47 <Table.HeaderCell>
48 Status
49 </Table.HeaderCell>
50 <Table.HeaderCell>
51 Description
52 </Table.HeaderCell>
53 </Table.Row>
54 </Table.Header>
55 <Table.Body>
56 <Table.Row>
57 <Table.Cell>
58 Not Started
59 </Table.Cell>
60 <Table.Cell>
61 The workflow has been executed, but its steps haven't been invoked yet.
62 </Table.Cell>
63 </Table.Row>
64 <Table.Row>
65 <Table.Cell>
66 Invoking
67 </Table.Cell>
68 <Table.Cell>
69 The workflow execution is currently running and invoking its steps.
70 </Table.Cell>
71 </Table.Row>
72 <Table.Row>
73 <Table.Cell>
74 Done
75 </Table.Cell>
76 <Table.Cell>
77 The workflow execution has completed successfully.
78 </Table.Cell>
79 </Table.Row>
80 <Table.Row>
81 <Table.Cell>
82 Failed
83 </Table.Cell>
84 <Table.Cell>
85 The workflow execution has failed.
86 </Table.Cell>
87 </Table.Row>
88 <Table.Row>
89 <Table.Cell>
90 Compensating
91 </Table.Cell>
92 <Table.Cell>
93 The workflow execution is compensating its steps after a failure.
94 </Table.Cell>
95 </Table.Row>
96 <Table.Row>
97 <Table.Cell>
98 Reverted
99 </Table.Cell>
100 <Table.Cell>
101 The workflow execution has been reverted, which occurs when the workflow runs as part of another workflow and the parent workflow fails.
102 </Table.Cell>
103 </Table.Row>
104 </Table.Body>
105 </Table>
106
107 ---
108
109 ## View Workflow Execution Details
110
111 To view a workflow execution's details:
112
113 1. Go to Settings → Workflows.
114 2. Click on the workflow execution to view it.
115
116 On the workflow execution's page, you'll find multiple sections containing the execution's details.
117
118 ![Workflow executions details](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496967/User%20Guide/Screenshot_2025-02-25_at_5.22.33_PM_z6al6a.png)
119
120 ### Summary Section
121
122 In the first section, you'll find a summary of the workflow execution, including:
123
124 - A badge at the top end of the section indicating the [execution's status](#workflow-execution-status).
125 - The workflow's unique ID, which you specify when you create the workflow.
126 - The transaction ID, which is a unique identifier for the workflow execution. This is useful for debugging, tracking, and changing step statuses of [long-running workflows](!docs!/learn/fundamentals/workflows/long-running-workflow).
127 - The workflow's progress, which shows a quick overview of the steps that have been executed.
128
129 ### Timeline
130
131 The timeline diagram shows you the step-by-step execution of the workflow. You can zoom in and out, and drag the mouse to view the entire diagram. You can also click on a step to view its execution details in the [History](#history) section.
132
133 #### Step Status
134
135 In the timeline diagram, each step node has a small box whose color indicates the step's status:
136
137 <Table>
138 <Table.Header>
139 <Table.Row>
140 <Table.HeaderCell>
141 Color
142 </Table.HeaderCell>
143 <Table.HeaderCell>
144 Description
145 </Table.HeaderCell>
146 </Table.Row>
147 </Table.Header>
148 <Table.Body>
149 <Table.Row>
150 <Table.Cell>
151 Orange
152 </Table.Cell>
153 <Table.Cell>
154 The step is currently being executed.
155 </Table.Cell>
156 </Table.Row>
157 <Table.Row>
158 <Table.Cell>
159 Green
160 </Table.Cell>
161 <Table.Cell>
162 The step has been executed successfully.
163 </Table.Cell>
164 </Table.Row>
165 <Table.Row>
166 <Table.Cell>
167 Red
168 </Table.Cell>
169 <Table.Cell>
170 The step has failed.
171 </Table.Cell>
172 </Table.Row>
173 <Table.Row>
174 <Table.Cell>
175 Gray
176 </Table.Cell>
177 <Table.Cell>
178 The step hasn't been executed yet, or it has been skipped, which can occur if the step is part of a [when condition](!docs!/learn/fundamentals/workflows/conditions).
179 </Table.Cell>
180 </Table.Row>
181 </Table.Body>
182 </Table>
183
184 ### JSON
185
186 The JSON section allows you to view the execution's details as a raw JSON object by clicking the <InlineIcon Icon={ArrowUpRightOnBox} alt="expand" /> icon. This is useful for advanced debugging to see all the details of the workflow execution.
187
188 ### History
189
190 The History section shows you the execution of the workflow's steps in order of execution. You can see each step's name with a dot reflecting its status as explained in the [Step Status](#step-status) section.
191
192 If you click on any executed step, you'll see its details, including:
193
194 - **Definition**: the step's configurations that can be passed when you create the step. For example, the step's name, whether it has a compensation function, or whether it's asynchronous.
195 - **Output**: the step's output, which is the result of the step's execution.
196 - **Compensation Input**: if the workflow failed and the step has a compensation function, you can see the input that the compensation function received.
197 - **Error**: if the step failed, you can see the error message.
198
199 ![Workflow executions history](https://res.cloudinary.com/dza7lstvk/image/upload/v1740498395/User%20Guide/Screenshot_2025-02-25_at_5.46.20_PM_spnh0j.png)