> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/types/workflowexecutioninfo.md).

# WorkflowExecutionInfo

WorkflowExecutionInfo Type - Temporal workflow execution details

Represents detailed information about a Temporal workflow execution. This type provides comprehensive data about running and completed workflows, including execution status, timing, and associated metadata.

History is NOT included in this type for performance reasons. To retrieve workflow history events, use the dedicated `workflowHistory` query.

## Fields

| Field                          | Type                   | Description                                                                                  |
| ------------------------------ | ---------------------- | -------------------------------------------------------------------------------------------- |
| `execution`                    | `WorkflowExecution!`   | The workflow execution identifier containing workflowId and runId                            |
| `type`                         | `WorkflowType!`        | The type/name of the workflow                                                                |
| `startTime`                    | `String!`              | ISO 8601 timestamp when the workflow started                                                 |
| `closeTime`                    | `String`               | ISO 8601 timestamp when the workflow completed (null if still running)                       |
| `status`                       | `String!`              | Current workflow status (e.g., RUNNING, COMPLETED, FAILED, CANCELED, TERMINATED, TIMED\_OUT) |
| `historyLength`                | `Int!`                 | Number of events in the workflow history                                                     |
| `parentNamespaceId`            | `String`               | Namespace ID of the parent workflow (if this is a child workflow)                            |
| `parentExecution`              | `WorkflowExecution`    | Parent workflow execution details (if this is a child workflow)                              |
| `executionTime`                | `String`               | ISO 8601 timestamp of execution time                                                         |
| `searchAttributes`             | `[TemporalMetadata!]!` | Searchable attributes for workflow filtering (includes `pyck_title` and `pyck_group_title`)  |
| `autoResetPoints`              | `Map`                  | Auto-reset points for workflow recovery                                                      |
| `taskQueue`                    | `String!`              | The task queue this workflow is running on                                                   |
| `stateTransitionCount`         | `Int!`                 | Number of state transitions in the workflow                                                  |
| `historySizeBytes`             | `Int!`                 | Size of the workflow history in bytes                                                        |
| `mostRecentWorkerVersionStamp` | `Map`                  | Version stamp of the most recent worker                                                      |
| `executionDuration`            | `String`               | Duration of the workflow execution                                                           |
| `rootExecution`                | `WorkflowExecution`    | Root workflow execution (for nested child workflows)                                         |

## Related Types

### WorkflowExecution

| Field        | Type      | Description                            |
| ------------ | --------- | -------------------------------------- |
| `workflowId` | `String!` | The unique workflow identifier         |
| `id`         | `String!` | The run ID for this specific execution |

### WorkflowType

| Field  | Type      | Description                   |
| ------ | --------- | ----------------------------- |
| `name` | `String!` | The name of the workflow type |

## Service

This type is defined in the **Workflow** service.

## Breaking Changes

### Memo Field Removed (Replaced by Search Attributes)

The `memo` field and the `WorkflowMemo` type have been **removed** from `WorkflowExecutionInfo`. Per-workflow titles and group titles are now stored as first-class Temporal search attributes (`pyck_title` and `pyck_group_title`) instead of memo fields. This change enables server-side filtering, ordering, and indexing — Temporal Visibility cannot index memo fields, but keyword search attributes are fully queryable.

**Before:**

```graphql
query {
  workflowExecutions(where: { ... }) {
    edges {
      node {
        memo {       # NO LONGER AVAILABLE
          title
          subtitle
          data
        }
      }
    }
  }
}
```

**After:**

Read the title and group title from `searchAttributes` (look up the `pyck_title` and `pyck_group_title` keys):

```graphql
query {
  workflowExecutions(where: { ... }) {
    edges {
      node {
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

You can also filter and sort directly on these attributes — see the [workflowExecutions](/graphql-api/queries/workflowexecutions.md) query for `title`/`groupTitle` predicates and the `TITLE`/`GROUP_TITLE` order fields.

**SDK migration (workflow authors):** Calls to `workflowsdk.SetWorkflowMemo(ctx, ...)` must be replaced with `workflowsdk.SetWorkflowTitle(ctx, title)` and `workflowsdk.SetGroupTitle(ctx, groupTitle)`. Passing an empty string to either function clears the attribute so the UI falls back to its default label. See [Workflows in pyck](/development/workflows.md) for details.

### History Field Removed

The `history` field has been **removed** from `WorkflowExecutionInfo` for performance reasons. Clients must now use the dedicated `workflowHistory` query to fetch workflow history events.

**Before:**

```graphql
query {
  workflowExecutions(where: { workflowID: "my-workflow" }) {
    execution {
      workflowId
    }
    history {        # NO LONGER AVAILABLE
      eventId
      eventType
    }
  }
}
```

**After:**

```graphql
# Step 1: Get execution metadata
query {
  workflowExecutions(where: { workflowID: "my-workflow" }) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        status
        historyLength
      }
    }
  }
}

# Step 2: Fetch history separately
query {
  workflowHistory(where: { workflowID: "my-workflow" }) {
    edges {
      node {
        execution {
          workflowId
        }
        history {
          eventId
          eventType
          eventTime
        }
      }
    }
  }
}
```

### Query Return Type Changed

The `workflowExecutions` query now returns `WorkflowExecutionInfoConnection!` instead of `[WorkflowExecutionInfo!]!`. This adds pagination support via the Relay connection pattern.

**Before:**

```graphql
query {
  workflowExecutions(where: { ... }) {
    execution { workflowId }
    status
  }
}
```

**After:**

```graphql
query {
  workflowExecutions(where: { ... }, first: 100) {
    edges {
      node {
        execution { workflowId }
        status
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

## Usage Example

### Query Workflow Executions with Pagination

```graphql
query {
  workflowExecutions(
    where: {
      typeName: "PickingWorkflow"
      status: "RUNNING"
    }
    first: 50
    orderBy: { direction: DESC, field: START_TIME }
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        type {
          name
        }
        startTime
        closeTime
        status
        historyLength
        taskQueue
        stateTransitionCount
        historySizeBytes
        searchAttributes {
          key
          value
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}
```

### Query with Multiple Filters

```graphql
query {
  workflowExecutions(
    where: {
      and: [
        { typeNameIn: ["PickingWorkflow", "ReceivingWorkflow"] }
        { statusNotIn: ["COMPLETED", "FAILED"] }
        { startTimeGTE: "2024-01-01T00:00:00Z" }
      ]
    }
    first: 100
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        type {
          name
        }
        status
        startTime
        executionDuration
        searchAttributes {
          key
          value
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

### Query Child Workflows

```graphql
query {
  workflowExecutions(
    where: {
      workflowIDHasPrefix: "child-"
    }
    first: 20
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        parentExecution {
          workflowId
          id
        }
        rootExecution {
          workflowId
          id
        }
        status
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

### Paginating Through Results

```graphql
# Initial query
query FirstPage {
  workflowExecutions(
    where: { status: "RUNNING" }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

# Subsequent pages
query NextPage($cursor: String!) {
  workflowExecutions(
    where: { status: "RUNNING" }
    first: 50
    after: $cursor
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

### Example Response

```json
{
  "data": {
    "workflowExecutions": {
      "edges": [
        {
          "node": {
            "execution": {
              "workflowId": "picking-order-12345",
              "id": "run-abc-123"
            },
            "type": {
              "name": "PickingWorkflow"
            },
            "startTime": "2024-01-15T10:30:00Z",
            "closeTime": null,
            "status": "RUNNING",
            "historyLength": 42,
            "taskQueue": "picking-queue",
            "stateTransitionCount": 15,
            "historySizeBytes": 8192,
            "searchAttributes": [
              { "key": "pyck_service", "value": "picking" },
              { "key": "pyck_data_type", "value": "picking-order" },
              { "key": "pyck_title", "value": "Picking Order #12345" },
              { "key": "pyck_group_title", "value": "Zone A - Priority High" }
            ]
          },
          "cursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9"
      },
      "totalCount": 150
    }
  }
}
```

## Workflow Status Values

| Status             | Description                           |
| ------------------ | ------------------------------------- |
| `RUNNING`          | Workflow is currently executing       |
| `COMPLETED`        | Workflow completed successfully       |
| `FAILED`           | Workflow failed with an error         |
| `CANCELED`         | Workflow was canceled                 |
| `TERMINATED`       | Workflow was forcefully terminated    |
| `TIMED_OUT`        | Workflow exceeded its timeout         |
| `CONTINUED_AS_NEW` | Workflow continued as a new execution |

## Related Documentation

* [workflowExecutions Query](/graphql-api/queries/workflowexecutions.md) - Query workflow executions with pagination
* [workflowHistory Query](/graphql-api/queries/workflowhistory.md) - Query workflow history events
* [WorkflowExecutionInfoConnection](/graphql-api/types/workflowexecutioninfoconnection.md) - Connection type for paginated results
* [WorkflowExecutionHistory](/graphql-api/types/workflowexecutionhistory.md) - Type for history retrieval
* [WorkflowEvent](/graphql-api/types/workflowevent.md) - Individual event in workflow execution history
* [TemporalMetadata](/graphql-api/types/temporalmetadata.md) - Key-value metadata for search attributes
* [Workflow](/graphql-api/types/workflow.md) - Workflow definition type
* [TemporalWorkflow](/graphql-api/types/temporalworkflow.md) - Workflow execution reference type

## Notes

* Use `workflowExecutions` query to retrieve workflow execution information with pagination
* **History is NOT included** - use `workflowHistory` query to fetch history events separately
* Per-workflow display labels and group headers live in the `pyck_title` and `pyck_group_title` search attributes (read them from the `searchAttributes` field)
* Search attributes allow efficient filtering of workflows by custom criteria
* Parent and root execution references help track workflow hierarchies
* History size and length can be used to monitor workflow complexity
* Pagination uses Temporal's NextPageToken directly for efficient cursor-based pagination


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/types/workflowexecutioninfo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
