---
title: "Workday Orchestration JSON: Avoid the 25-Second Sync Trap"
description: "Synchronous Workday orchestrations called from Extend PMD pages time out at 25 seconds. Learn how to audit orchestration JSON and refactor slow LLM/OCR calls…"
url: https://kiweely.com/blog/ai-agent-orchestration-json-25-second-sync-trap
---

# AI Agents Editing Workday Orchestration JSON: Catching the 25-Second Sync Trap Before Deploy

Synchronous Workday orchestrations invoked from Extend pages hit a hard 25-second timeout. Before any AI coding agent deploys orchestration JSON, audit for synchronous PMD triggers calling slow external LLM, OCR, or HTTP APIs and refactor them to an asynchronous pattern.

-   By Kiweely
-   November 15
-   Updated November 27
-   5 min read

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) |
| --- | --- | --- |
|  **Best suited for** | Sub-second Workday lookups, lightweight validations, fast deterministic calculations | External LLM/OCR calls, document generation, multi-item loops, third-party APIs with retries |
|  **User experience on slow external API** | Page hangs, then throws hard timeout error at 25 seconds | Page saves record immediately (`Status = Processing`) and confirms submission |
|  **HTTP retry safety** | Retries eat into the 25-second wall clock and trigger timeouts | Retries run cleanly in background without blocking the UI |
|  **Partial-failure recovery** | External side effect may succeed after Workday aborts the UI transaction | Orchestration writes explicit `Completed` or `Failed` status + error detail back to the custom BO |
|  **Auditability** | Thin error trail if UI call aborts | 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:

1.  **Is this orchestration invoked synchronously from a PMD page?** Inspect every PMD `outboundEndpoints` or page action calling an orchestration and verify whether the UI awaits the orchestration’s final result.
2.  **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.
3.  **Does the orchestration contain a `Loop` / `Batch Loop` or `HTTP 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.
4.  **What happens if the external call times out or returns HTTP 500?** Verify an explicit **`Handle Errors`** path 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:

1.  **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.
2.  **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.
3.  **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`**.
4.  **Write the outcome back to the custom BO:** Update the custom business object with extracted fields and `processingStatus = "Completed"` (or `processingStatus = "Failed"` plus a human-readable error message and a Retry button for the user or support admin).
5.  **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](https://kiweely.com/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](https://kiweely.com/pricing) or [download Vine](https://kiweely.com/download).

## 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.

## Read next

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

-   [November 15 ### Offboarding a Contractor Who Used a Personal AI Coding Agent on Your Workday Tenant](https://kiweely.com/blog/offboard-contractor-personal-ai-agent-workday)
-   [November 27 ### Workday Contract Renewal Playbook (2027): FSE Audits, Price Caps, Flex Credits, and Shelfware Pruning](https://kiweely.com/blog/workday-contract-renewal-fse-sizing-flex-credits-negotiation-2027)
-   [November 27 ### CIO and CISO Evaluation Guide: Desktop Workday AI Agents vs. Cloud Bots and Shared-ISU MCP Servers](https://kiweely.com/blog/cio-ciso-evaluation-guide-desktop-workday-ai-agents)

### More guides on Custom agents and Workday AI

[All 105 guides](https://kiweely.com/guides#custom-agents)

-   [Deployment Agent Configuration Catalog Support for Implementers](https://kiweely.com/guides/deployment-agent-configuration-catalog)
-   [Workday Developer Agent and Agent-Ready Tools for Implementers](https://kiweely.com/guides/workday-developer-agent-and-agent-ready-tools)
-   [Workday First-Party Agent Tenant Prerequisites for Implementers](https://kiweely.com/guides/workday-first-party-agent-tenant-prerequisites)
-   [Workday Custom Agent First POC Checklist for Implementers](https://kiweely.com/guides/workday-custom-agent-first-poc-checklist)
-   [Ask skill on but answers feel generic: use CRAFT and “in my tenant”](https://kiweely.com/guides/ask-skill-enabled-still-generic)
-   [Deployment Agent missing? Register it from Unregistered Workday Agent](https://kiweely.com/guides/deployment-agent-not-registered)
-   [Deployment Agent in Customer Central vs Implementation tenants](https://kiweely.com/guides/workday-deployment-agent-customer-central-vs-implementation-tenant)
-   [Keep Deployment Agent Ask alive across Sandbox refreshes](https://kiweely.com/guides/workday-deployment-agent-ask-after-sandbox-refresh)

## Your Workday work, done by AI.

Kiweely Vine is the AI agent that builds, deploys and tests Extend apps as real people, makes changes in any Workday task screen, answers from your real tenant and builds reports.

[Start for free](https://kiweely.com/download) [Book a demo](https://kiweely.com/demo)

## Get the next one in your inbox.

One email a month for Workday teams: what’s changing in Workday and what to retest, one tip tried in a real tenant, and what’s new at Kiweely.
