Skip to main content

# WorkflowExecution

A workflow execution.

    type WorkflowExecution {
      id: ID!
      workflow: Workflow
      root: WorkflowExecutionNode!
      lifeCycleStatus: WorkflowLifeCycleStatus!
      executionStatus: WorkflowExecutionStatus!
      variant: WorkflowVariant
      startedBy: User
      stoppedBy: User
      message: String
    }

### Fields​

#### `WorkflowExecution.id` ● `ID!` non-null scalar​

This execution's ID.

#### `WorkflowExecution.workflow` ● `Workflow` object​

The associated workflow.

#### `WorkflowExecution.root` ● `WorkflowExecutionNode!` non-null object​

The root node of this execution.

#### `WorkflowExecution.lifeCycleStatus` ● `WorkflowLifeCycleStatus!` non-null enum​

Here are the possible state transitions:

| RUNNING | WAITING | FINISHED
--- | --- | --- | ---
RUNNING | - | Y | Y
WAITING | Y | - | Y
FINISHED | N | N | -

#### `WorkflowExecution.executionStatus` ● `WorkflowExecutionStatus!` non-null enum​

Here are the possible state transitions (X = possible, N = not possible):

| INITIALIZED | EXECUTING_STEP | CANCEL_REQUESTED | WAITING_ON_PURPOSE | WAITING_ON_ERROR | FINISHED_SUCCESS | FINISHED_FAILED | FINISHED_CANCELLED
--- | --- | --- | --- | --- | --- | --- | --- | ---
INITIALIZED | - | Y | N | N | N | N | N | N
EXECUTING_STEP | N | - | Y | Y | Y | Y | Y | N
CANCEL_REQUESTED | N | N | - | N | N | N | Y | Y
WAITING_ON_PURPOSE | N | Y | Y | - | N | N | Y | Y
WAITING_ON_ERROR | N | Y | Y | N | - | N | Y | Y
FINISHED_SUCCESS | N | N | N | N | N | - | N | N
FINISHED_FAILED | N | N | N | N | N | N | - | N
FINISHED_CANCELLED | N | N | N | N | N | N | N | -

#### `WorkflowExecution.variant` ● `WorkflowVariant` object​

The associated variant if this execution was started with a variant.

#### `WorkflowExecution.startedBy` ● `User` object​

The user that started this execution if there was any.

#### `WorkflowExecution.stoppedBy` ● `User` object​

The user that stopped this execution if there was any.

#### `WorkflowExecution.message` ● `String` scalar​

The message output of the workflow execution.

### Returned By​

`workflowExecution` query ● `workflowExecutionsByWorkflowId` query ● `workflowExecutionsByWorkflowName` query ● `workflowExecutionsByWorkflowVariant` query

### Member Of​

`ActiveStep` object ● `ExecuteWorkflowFromStartDialogExecutionPayload` object ● `ExecuteWorkflowPayload` object ● `Workflow` object ● `WorkflowExecutionPage` object ● `WorkflowVariant` object