---
title: "How do I use action logs to troubleshoot workflow failures?"
slug: "using-action-logs-to-troubleshoot-failures"
updated: 2025-01-31T09:06:06Z
published: 2025-01-31T09:06:06Z
canonical: "support.lusid.com/using-action-logs-to-troubleshoot-failures"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I use action logs to troubleshoot workflow failures?

Workflows often fail when performing actions after a successful state transition. Every task has the following fields that provide the ID of the action that created, last modified, or was last submitted by the task:

- `ActionLogIdCreated`
- `ActionLogIdModified`
- `ActionLogIdSubmitted`

Providing you are a LUSID user with sufficient privileges, you can call the [GetActionLogs](https://www.lusid.com/docs/api/workflow/endpoints/action-logs/GetActionLogs) API, passing in an `ActionLogIdSubmitted` value, to retrieve diagnostic information for the last submitted action by the task.

- Method 1: [Using the Workflow REST API](/v1/docs/using-action-logs-to-troubleshoot-failures#using-the-workflow-rest-api)
- Method 2: Using the LUSID web app (coming soon)

## Using the Workflow REST API

1. [Obtain an API access token.](/v1/docs/how-do-i-obtain-and-use-a-short-lived-api-access-token-from-okta)
2. Call the [GetTask](https://www.lusid.com/docs/api/workflow/endpoints/tasks/GetTask) API, passing in your API access token and task ID to retrieve the action log ID. For example:

```shell
curl -X GET "https://<your-domain>.lusid.com/workflow/api/tasks/3b2eefa9-fa2f-462a-ae61-01d341ee22b8"
  -H "Authorization: Bearer <your-api-access-token>"
```

Part of a response is as follows:

```json
{
  "id": "3b2eefa9-fa2f-462a-ae61-01d341ee22b8",
  "taskDefinitionId": {
    "scope": "approvals",
    "code": "dataApproval"
  },
  ...
  "actionLogIdModified": "d36dc336-cc65-4baf-a974-71a7533534bd",
  "actionLogIdSubmitted": "d36dc336-cc65-4baf-a974-71a7533534bd"
}
```
3. Call the [GetActionLogs](https://www.lusid.com/docs/api/workflow/endpoints/action-logs/GetActionLogs) API, passing in your API access token and action log ID. For example:

```shell
curl -X GET "https://<your-domain>.lusid.com/workflow/api/actionlogs/d36dc336-cc65-4baf-a974-71a7533534bd"
  -H "Authorization: Bearer <your-api-access-token>"
```

Part of a response is as follows:

```json
{
  "id": "d36dc336-cc65-4baf-a974-71a7533534bd",
  "actionType": "RunWorker",
  "loggedItems": [
    {
      "timestamp": "2025-01-30T16:21:34.8328910+00:00",
      "logType": "ActionSubmitted"
    },
    {
      "timestamp": "2025-01-30T16:21:37.2911430+00:00",
      "logType": "ActionStarted"
    },
    {
      "timestamp": "2025-01-30T16:21:41.5407160+00:00",
      "logType": "ActionProgressUpdate",
      "details": "Processing Luminesce query. Query history URL: https://<your-domain>.lusid.com/app/data-virtualisation/history/08cd276f-c866-478f-aaee-2df255cc168d#results"
    },
    {
      "timestamp": "2025-01-30T16:21:42.2718000+00:00",
      "logType": "ActionFailed",
      "details": "Failure reason: Luminesce failure. Details: Unexpected failure on querying view 'Worker.UpsertTransactionPortfolio' Query Execution failed.
        'Worker.Upserttransactionportfolio/<your-domain>.global/client-<your-domain>.sm is not in-process registered.
        The view may not be registered suggesting there may be a systemic issue and this will be investigated."
    },
    {
      "timestamp": "2025-01-30T16:21:43.4481310+00:00",
      "logType": "ActionStarted",
      "details": "This is retry number: 1"
    },
...
  ]
}
```

You can inspect the `details` for log types `ActionFailed` and `ActionProgressUpdate` to investigate failures and monitor progress.

If the `details` value contains `UnknownError`, [contact support](https://www.finbourne.com/contact).

> [!NOTE]
> **Note**
> 
> The Workflow Service retries each action three times in the event of a failure. The example response above shows an action retry has taken place.

An activity to be taken on completion of a state transition within a task definition in the Workflow Service. For example, start a worker, create a child task or trigger a parent task.

A condition a task can exist in, for example **Pending**, **In progress**, or **Complete**. State names are customisable and can be defined in a task definition.
