If an AI coding agent helps you build a Workday Extend app that calls an external AI model, document OCR service, ERP webhook, or multi-step enrichment API, there is one architectural trap that passes almost every quick Development test and then breaks in Production: calling a synchronous orchestration from a PMD page and hitting Workday’s 25-second synchronous timeout.
Shipping synchronous LLM, OCR, or slow external HTTP calls inside a page-blocking orchestration is a Production incident scheduled for the very first slow upstream response. Every coding agent—and every human reviewer—editing orchestration JSON should check for this pattern before hitting Save and Deploy.
Why the 25-second sync trap passes Dev and breaks in Prod
Workday’s Reference: Orchestration Runtime Limits enforces tight execution ceilings on synchronous orchestrations because a synchronous call holds the user’s Extend page transaction open while waiting for a response. In Development, the bug hides easily:
- Tiny test payloads: A 1-page sample receipt finishes OCR in 4 seconds in Dev; a real 18-page PDF invoice takes 28 seconds in Production.
- Warm upstream APIs: A single developer test hits an idle external API in 3 seconds; Monday-morning payroll or expense peak traffic adds 12 seconds of queue latency.
- Hidden HTTP retry math: Adding a reasonable HTTP Retry Policy (e.g., 3 retries with exponential backoff on HTTP 429/503) immediately pushes a single flaky upstream call past 25 seconds even when the first attempt would have been fast.
- Chained Workday calls before the external step: Two WQL/REST lookups + document fetch + external LLM call + custom BO write can easily total 15–20 seconds on a good day and cross 25 seconds on a slightly busy day.
When the 25-second limit fires, the user sees an opaque page error—while the external API may have already completed the write or billed the token call, leaving the Workday custom business object out of sync with the outside world.
Sync vs. Async orchestration design in Workday Extend
| Design dimension | Synchronous orchestration (PMD waits) | Asynchronous orchestration (fire, track, poll/notify) |
|---|---|---|
| Design dimensionBest suited for | Synchronous orchestration (PMD waits)Sub-second Workday lookups, lightweight validations, fast deterministic calculations | Asynchronous orchestration (fire, track, poll/notify)External LLM/OCR calls, document generation, multi-item loops, third-party APIs with retries |
| Design dimensionUser experience on slow external API | Synchronous orchestration (PMD waits)Page hangs, then throws hard timeout error at 25 seconds | Asynchronous orchestration (fire, track, poll/notify)Page saves record immediately (Status = Processing) and confirms submission |
| Design dimensionHTTP retry safety | Synchronous orchestration (PMD waits)Retries eat into the 25-second wall clock and trigger timeouts | Asynchronous orchestration (fire, track, poll/notify)Retries run cleanly in background without blocking the UI |
| Design dimensionPartial-failure recovery | Synchronous orchestration (PMD waits)External side effect may succeed after Workday aborts the UI transaction | Asynchronous orchestration (fire, track, poll/notify)Orchestration writes explicit Completed or Failed status + error detail back to the custom BO |
| Design dimensionAuditability | Synchronous orchestration (PMD waits)Thin error trail if UI call aborts | Asynchronous orchestration (fire, track, poll/notify)Full execution log in Orchestration history tied to the custom BO record ID |
The 4-question pre-deploy audit for AI-edited orchestration JSON
Encode these four checks directly into your team’s agent instructions and pull-request review checklist whenever orchestration JSON or PMD endPoints change:
- Is this orchestration invoked synchronously from a PMD page? Inspect every PMD
outboundEndpointsor page action calling an orchestration and verify whether the UI awaits the orchestration’s final result. - Does any step call an external HTTP endpoint, LLM, OCR engine, or variable-latency vendor API? Any network hop leaving Workday’s data center has unbounded tail latency—even if p50 latency is 2 seconds, p99 will eventually cross 25 seconds.
- Does the orchestration contain a
Loop/Batch LooporHTTP Retry Policy? Multiply worst-case retry delay by loop count. If the math can exceed ~10–15 seconds, it does not belong in a synchronous path. - What happens if the external call times out or returns HTTP 500? Verify an explicit
Handle Errorspath logs the failure and leaves the Workday record in a recoverable state rather than abandoning half-written data.
The safe async refactor pattern (before you deploy)
Refactoring a sync Extend flow to async takes far less effort before go-live than patching corrupted Production records afterward:
- Persist intent first on the custom business object: When the user clicks Submit on the PMD page, create (or update) the custom business object instance with
processingStatus = "Pending"and any uploaded attachment reference. - Launch the orchestration asynchronously: Trigger the orchestration in async mode (passing the custom BO instance
id) so the PMD page finishes in under 2 seconds and shows the user a clean confirmation (“Submitted—processing in background”) or routes to a status list page. - Execute external work + retries in the async orchestration: Inside the background orchestration, read the custom BO and attachment, call the external LLM/OCR/vendor API with your configured HTTP Retry Policy, and wrap the step with
Handle Errors. - Write the outcome back to the custom BO: Update the custom business object with extracted fields and
processingStatus = "Completed"(orprocessingStatus = "Failed"plus a human-readable error message and a Retry button for the user or support admin). - Test slow responses deliberately in Development: Point a Development test run at a mock endpoint with a 30-second delay (or simulated HTTP 503 retry) to prove the PMD page stays snappy and the async orchestration finishes cleanly.
Where Kiweely fits
Catching synchronous orchestration traps before deploy requires inspecting PMD endPoints, orchestration JSON, custom business objects, and live Development tenant behavior together—not guessing from a single JSON snippet. Kiweely Vine is a Mac and Windows desktop AI agent for Workday consultants and developers that builds, validates, and deploys Extend apps to your authorized Development tenant, checks orchestration and PMD patterns side by side, and verifies the live flow under Start Proxy—always asking before making tenant changes, with explicit confirmation required on Production. Vine Free is free for your Workday personal developer account and its tenant. Any other tenant needs Vine Personal at $99 a month for one person, or a Vine Team seat at $149 a month. See Pricing or download Vine.
Frequently asked questions
Why does a Workday Extend page fail with a timeout when calling an orchestration that hits an external LLM or OCR API?
Synchronous orchestrations invoked from a Workday Extend PMD page must complete within Workday's 25-second synchronous runtime limit. External AI models, document OCR services, and retried third-party webhooks routinely exceed 25 seconds under load, causing hard user-facing timeouts.
Why do AI coding agents keep introducing synchronous orchestrations in Extend apps?
Synchronous request-response calls look simpler in JSON and pass quick happy-path tests in Development against small payloads or warm external endpoints. The 25-second ceiling only explodes in Production on a large PDF, cold model start, or transient HTTP retry.
How should you redesign a slow external API call out of a synchronous Extend orchestration?
Have the PMD page write a custom business object record (status = Submitted/Pending) and launch the orchestration asynchronously—returning immediately to the user—then let the async orchestration call the external API, handle retries, and update the record status to Completed or Failed.
What static check should run on orchestration JSON before every deploy?
Check every orchestration referenced by a PMD outbound endpoint: if it runs synchronously and contains external HTTP requests, document processing, retries, or loops over external calls, block deployment until it is refactored to asynchronous execution.