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 API, passing in an ActionLogIdSubmitted value, to retrieve diagnostic information for the last submitted action by the task.

Using the Workflow REST API

  1. Obtain an API access token.

  2. Call the GetTask API, passing in your API access token and task ID to retrieve the action log ID. For example:

    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:

    {
      "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 API, passing in your API access token and action log ID. For example:

    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:

    {
      "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.

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.