---
title: "Fix 25s Sync Orchestration LLM Timeout in Workday Extend"
description: "Why Synchronous Orchestrations triggered from an Extend PMD page time out at 25 seconds during OCR and LLM API calls, and how to refactor to Async Orchestrate."
url: https://kiweely.com/guides/workday-extend-async-orchestration-llm-timeout
---

# Avoiding the 25-Second Synchronous Timeout When an Extend Page Calls External LLM APIs Through Orchestrate

Although Synchronous Orchestrations support up to 5 minutes of execution when called externally, Presentation Components enforce a strict 25-second timeout when a PMD page triggers a Synchronous Orchestration. Refactor multi-step OCR and LLM pipelines to an Asynchronous Orchestration with a BO.

-   **Checked** against Workday on November 6
-   Applies to **Workday Extend**
-   3 min read
-   Published November 6
-   By Kiweely

## Why a Synchronous Orchestration times out at 25 seconds on a PMD page

In Workday Orchestrate, a **Synchronous Orchestration** has a general runtime limit of **5 minutes**. However, when a Synchronous Orchestration is invoked from an Extend presentation (`.pmd`) page—either as an inbound/deferred endpoint or as an `outboundDataURI` on page submit—Workday Presentation Components enforce a hard **25-second** ceiling (*Reference: Orchestration Runtime Limits* — *Synchronous orchestration triggered by a presentation page: 25 seconds*), alongside a 24-second per-endpoint timeout and a 60-second total page request limit.

This 25-second presentation limit overrides any higher **Overall Timeout** or **Response Timeout** configured inside the orchestration’s **Settings** tab. When a user uploads a document on an Extend page and clicks **OK** to run a multi-stage AI pipeline (for example, OCR text extraction followed by an external LLM JSON structuring call, a WQL lookup, and a second LLM validation call), total execution routinely takes 30 to 90 seconds. The PMD page times out at 25 seconds, disables the **Submit** button, and blocks navigation to the next page.

## Refactoring to an Asynchronous Orchestration with a tracking Business Object

Because an **Asynchronous Orchestration** runs in the background for up to **48 hours** (with a 45-minute non-production and 60-minute production per-process limit) and returns immediately upon launch, you can decouple the PMD page transition from the LLM processing time by storing the intermediate and final state in an Extend Model Business Object (MBO).

### 1\. Create a tracking Business Object (`equipmentExtractionJob`)

In App Builder, define a Model Business Object named `equipmentExtractionJob` with:

-   `processingStatus` (`Text`): holds `"Processing"`, `"Completed"`, or `"Failed"`
-   `sourceAttachment` (`Single-Instance` reference to your Attachment Business Object)
-   `extractedPayloadJson` (`Text`): stores the structured JSON returned by the LLM
-   `errorMessage` (`Text`): stores any downstream OCR or LLM failure details

### 2\. Create the tracking record and launch the Async Orchestration on submit

On your upload PMD page, configure `outboundEndPoints` so clicking **OK** first creates the `equipmentExtractionJob` record with `processingStatus: "Processing"`, and then launches the **Asynchronous Orchestration**, passing the newly created record’s `id` (`wid`) and the uploaded attachment `id`:

json

```
"outboundData": {
  "outboundEndPoints": [
    {
      "name": "createExtractionJob",
      "baseUrlType": "app",
      "url": "equipmentExtractionJobs",
      "httpMethod": "POST",
      "authType": "sso",
      "onSend": "<%
        return {
          'processingStatus': 'Processing',
          'sourceAttachment': { 'id': documentUploader.children[0].value }
        };
      %>"
    },
    {
      "name": "launchAsyncLlmPipeline",
      "baseUrlType": "orchestrate",
      "url": "equipmentLlmValidationAsync/launch",
      "httpMethod": "POST",
      "authType": "sso",
      "onSend": "<%
        return {
          'jobWid': createExtractionJob.data.id,
          'attachmentWid': documentUploader.children[0].value
        };
      %>"
    },
    {
      "type": "outboundVariable",
      "name": "passJobWid",
      "variableScope": "flow",
      "values": [
        {
          "outboundPath": "jobWid",
          "value": "<% createExtractionJob.data.id %>"
        }
      ]
    }
  ]
}
```

Because `launchAsyncLlmPipeline` only enqueues the asynchronous run and returns HTTP `200` in under a second, the user navigates immediately to the results page (`flowVariables.jobWid`) without ever hitting the 25-second PMD limit.

### 3\. Update the Business Object inside the Asynchronous Orchestration

In Orchestration Builder, build `equipmentLlmValidationAsync` using the **Asynchronous** template:

1.  Read `lp.getSimpleData('jobWid')` and `lp.getSimpleData('attachmentWid')`.
2.  Fetch the uploaded file from your Attachment Business Object and call your OCR endpoint (such as AI Gateway Document Intelligence `/ml/docint/v1/doc`).
3.  Call your external LLM API using **Send HTTP Request** (where you can set **Overall Timeout** and **Response Timeout** on the step’s **Settings** tab to several minutes).
4.  Run your WQL validation query via **Send Workday API Request**.
5.  On completion, execute a `PATCH` via **Send Workday API Request** to `/apps/equipmentRequest_abcdef/v1/equipmentExtractionJobs/{{lp.getSimpleData('jobWid')}}` setting `processingStatus` to `"Completed"` and `extractedPayloadJson` to the validated JSON string.
6.  Attach an **Error Handler** to the orchestration (or individual steps) that sends a `PATCH` setting `processingStatus` to `"Failed"` and `errorMessage` to the step error so the UI never hangs indefinitely in `"Processing"`.

### 4\. Build a Refresh Status action on the results PMD page

On the destination PMD page, load `equipmentExtractionJobs/<% flowVariables.jobWid %>` in an inbound endpoint (`getJobStatus`). While `getJobStatus.processingStatus == 'Processing'`, render a status banner and a `pageActionButton` labeled **Refresh Status** that re-invokes a deferred endpoint or reloads the page; once `processingStatus == 'Completed'`, parse `extractedPayloadJson` with `json:parse(...)` and render the editable review grid.

## Verifying the async handoff in your tenant

Upload a test file on the Extend page and click **OK**. Confirm that the page transitions to the status page in under two seconds and displays `Processing`. Open **Orchestration Activity** on the Developer Site to watch `equipmentLlmValidationAsync` execute the OCR, LLM, and WQL steps beyond the 25-second mark, then click **Refresh Status** on the PMD page to confirm the `Completed` JSON payload renders cleanly.

## Sources checked

-   [Reference: Orchestration Runtime Limits](https://developer.workday.com/documentation/GUID-412c9e62-1ba2-4975-a36b-b794d2b559be)
-   [outboundEndPoints](https://developer.workday.com/documentation/kdd1594147277519)
-   [endPoints](https://developer.workday.com/documentation/ujr1530565661647)
-   [Steps: Create Extend App Orchestrations](https://developer.workday.com/documentation/hib1626197091901)
-   [Reference: Send HTTP Request](https://developer.workday.com/documentation/GUID-f2e319a1-9fb9-42a2-b4c7-648cfef7380d)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### Calling External Glean and Sana Agents From Workday Extend Without Hitting 408 Request Timeouts Direct outbound HTTP calls from a Workday Extend PMD page time out with Status Code 408 when an external Glean agent (/rest/api/v1/agents/runs/wait) or Sana webhook exceeds the presentation timeout. Route external agent runs through Workday Orchestrate and External Client CredStore.](https://kiweely.com/guides/workday-extend-external-agents-glean-sana-408-timeout)
-   [### AI Gateway Document Intelligence (/ml/docint/v1/ids): Converting Workday Drive Base64 to Binary, Resume Layout Pitfalls, and Fixing Opt-In Errors Workday’s Document Intelligence REST APIs (/ml/docint/v1/ids, /doc, and /resume) require raw binary payloads (up to 20 MB) rather than Base64 strings. Learn how to decode Workday Drive Base64 payloads with an explicit MIME type in Orchestrate, handle multi-column resumes, and fix opt-in errors.](https://kiweely.com/guides/workday-document-intelligence-base64-binary-opt-in-errors)
-   [### Passing Large CSV File Attachments From a Workday Custom Agent Flow to Orchestrate Without Hitting Context Limits Passing a multi-thousand-row CSV directly through a Custom Agent Action JSON input forces the LLM to serialize the entire file inside its context window. Store the uploaded CSV in an Extend Attachment Business Object via a PMD fileUploader widget and pass only the Attachment WID to Orchestrate.](https://kiweely.com/guides/workday-custom-agent-csv-file-attachment-orchestrate)
-   [### Why Custom Agent Actions Fail With S22 Permission Denied or Task Not Authorized in Agent Chat Orchestration Builder runs Custom Agent Actions directly as your user, whereas Agent Chat enforces dual ASOR authorization and restricts the Agent System User token to the resources listed in your .agentskill file. Register every REST, SOAP, and WQL resource WID via the Finder API to fix it.](https://kiweely.com/guides/workday-custom-agent-actions-permission-denied-tool-wids)

### More guides on Orchestrate

[All 86 guides](https://kiweely.com/guides#orchestrate)

-   [Why Log to File Turns XML Closing Tags into <// and How to Write #if Conditions in CreateTextTemplate](https://kiweely.com/guides/workday-orchestrate-xml-double-slash-log-to-file-if-conditions)
-   [Waiting for Import\_Payroll\_Input\_Request Background Processes at Scale in Workday Orchestrate](https://kiweely.com/guides/workday-orchestrate-wait-background-process-import-payroll-input)
-   [Why Workday sub-orchestrations and BP orchestrations show Completed when an API call fails](https://kiweely.com/guides/workday-orchestrate-sub-orchestration-completed-on-api-error)
-   [Why stripHtmlTags and htmlToPlainText Leave HTML Tags Over 2,003 Characters in Workday Orchestrate](https://kiweely.com/guides/workday-orchestrate-striphtmltags-2003-character-limit)
-   [Sorting JsonKeyValueIterator Collections and Numeric String Values in Workday Orchestrate Loops](https://kiweely.com/guides/workday-orchestrate-sort-jsonkeyvalueiterator-numeric-sorting)
-   [Why SendWorkdayRaasRequest returns 401 Unauthorized or empty data via the cloud proxy](https://kiweely.com/guides/workday-orchestrate-sendworkdayraasrequest-401-cloud-proxy)
-   [Reusing and versioning sub-orchestrations across Workday Extend and O4I apps](https://kiweely.com/guides/workday-orchestrate-reuse-sub-orchestrations-across-apps)
-   [Picking up SFTP files from subfolders and reading IDs from PDF filenames in Orchestrate](https://kiweely.com/guides/workday-orchestrate-sftp-subfolders-pdf-files)

### From the blog on Orchestrate

[All posts](https://kiweely.com/blog)

-   [Keep in Studio, Move to Orchestrate, or Rebuild as an Extend App? A Practical Triage Matrix](https://kiweely.com/blog/migrating-legacy-workday-studio-integrations-to-orchestrate-decision-matrix)
-   [How Kiweely Vine designs, builds, deploys, tests and monitors a Workday Orchestration for Integration](https://kiweely.com/blog/workday-orchestration-for-integration-with-kiweely)
-   [Why Workday Studio Remains Essential in an Orchestrate World](https://kiweely.com/blog/why-workday-studio-still-matters-with-orchestrate)

## Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.
