www/apps/user-guide/app/settings/developer/workflows/page.mdx
import { EllipsisHorizontal, ArrowUpRightOnBox } from "@medusajs/icons" import { Table } from "docs-ui"
export const metadata = {
title: View Workflow Executions in Medusa Admin,
}
In this guide, you'll learn how to view workflow executions in the Medusa Admin.
<Note>This guide is primarily useful for developers and technical teams building and debugging customizations of a Medusa application.
</Note>Workflows are a series of steps that perform a task. You build workflows in your source code to implement custom commerce flows and features.
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, 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.
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.
In the list, you can view the status of each workflow execution. A workflow execution's status can be:
<Table> <Table.Header> <Table.Row> <Table.HeaderCell> Status </Table.HeaderCell> <Table.HeaderCell> Description </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> <Table.Row> <Table.Cell> Not Started </Table.Cell> <Table.Cell> The workflow has been executed, but its steps haven't been invoked yet. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Invoking </Table.Cell> <Table.Cell> The workflow execution is currently running and invoking its steps. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Done </Table.Cell> <Table.Cell> The workflow execution has completed successfully. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Failed </Table.Cell> <Table.Cell> The workflow execution has failed. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Compensating </Table.Cell> <Table.Cell> The workflow execution is compensating its steps after a failure. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Reverted </Table.Cell> <Table.Cell> The workflow execution has been reverted, which occurs when the workflow runs as part of another workflow and the parent workflow fails. </Table.Cell> </Table.Row> </Table.Body> </Table>To view a workflow execution's details:
On the workflow execution's page, you'll find multiple sections containing the execution's details.
In the first section, you'll find a summary of the workflow execution, including:
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 section.
In the timeline diagram, each step node has a small box whose color indicates the step's status:
<Table> <Table.Header> <Table.Row> <Table.HeaderCell> Color </Table.HeaderCell> <Table.HeaderCell> Description </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> <Table.Row> <Table.Cell> Orange </Table.Cell> <Table.Cell> The step is currently being executed. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Green </Table.Cell> <Table.Cell> The step has been executed successfully. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Red </Table.Cell> <Table.Cell> The step has failed. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> Gray </Table.Cell> <Table.Cell> 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). </Table.Cell> </Table.Row> </Table.Body> </Table>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.
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 section.
If you click on any executed step, you'll see its details, including: