---
title: "Sub-orchestration shows Completed on API error — Kiweely"
description: "Why Send Workday API Request validation errors leave sub-orchestrations and BP orchestrations Completed, and how to surface SOAP faults and HTTP 500s."
url: https://kiweely.com/guides/workday-orchestrate-sub-orchestration-completed-on-api-error
---

# Why Workday sub-orchestrations and BP orchestrations show Completed when an API call fails

By default, Send Workday API Request sets isSuccess to true whenever Workday returns a response, even a SOAP fault or validation error. Use a custom HTTP retry policy, Continue on Conditions with isSoapFault(), or an Integration System orchestration with Add Integration Message to surface failures.

-   **Checked** against Workday on November 6
-   Applies to **Workday Orchestrate**
-   5 min read
-   Published November 6
-   By Kiweely

## Why `Send Workday API Request` reports `isSuccess = true` on validation errors

When a **Send Workday API Request** step inside a sub-orchestration receives a Workday business validation error—such as `Validation error occurred. Invalid ID value. '00AT3L' is not a valid ID value for type = 'Deduction_Code'`—both the sub-orchestration and the parent orchestration often finish with a status of **Completed** in **Orchestration Activity**. Neither the local error handler attached to the API step nor the **Global Error Handler** runs.

Two separate platform rules cause this behavior:

1.  **No custom HTTP retry policy means non-2xx responses do not fail the step.** Workday’s **Define HTTP Retry Policies** reference states explicitly: *If you want an unsuccessful HTTP response to cause your orchestration to fail, you must create a custom HTTP retry policy with a defined success range. In the absence of such a policy, an unsuccessful HTTP response doesn’t cause an orchestration to fail.*
2.  **`isSuccess` only measures transport delivery unless a retry policy fails the step.** When Workday returns a SOAP Fault or a validation payload over HTTP without an active success-range check, the step completes normally and sets `isSuccess` to `true` because the request was sent and a response was received. Because the step itself does not throw a runtime exception, Orchestration Builder never enters the step’s local error handler or the **Global Error Handler**.

## Failing the step or asserting response validity

You have two ways to make a SOAP fault or HTTP 4xx/5xx validation error raise an actual step failure inside a sub-orchestration.

### Option 1: Configure a custom HTTP retry policy with a 200–299 success range

1.  Click the gear icon above the orchestration canvas to open **Orchestration Settings** and select **HTTP Retries**.
2.  Create a retry policy (for example, `Strict2xxPolicy`) and set **Successful Response Code Ranges** from `200` to `299`.
3.  Select your **Send Workday API Request** step, open the **Settings** tab, and choose `Strict2xxPolicy` under **Retry Settings**.

With a `200`–`299` range enforced, an HTTP `400` or `500` response (such as `Response status code 500 is outside of defined success ranges (200,299)`) immediately throws a step exception and triggers the attached local error handler.

### Option 2: Assert `isSoapFault().not()` and `is2xxStatusCode()` in `Continue on Conditions`

When calling Workday SOAP web services or when you want to inspect the payload before throwing an error, place a **Continue on Conditions** step immediately after **Send Workday API Request**.

For a Workday SOAP call, combine `isSuccess` with `.isSoapFault().not()` on the `Data` response:

javascript

```
data.SendWorkdayAPIRequest.isSuccess.and(
  data.SendWorkdayAPIRequest.response.isSoapFault().not()
)
```

For a Workday REST call, combine `isSuccess` with `.is2xxStatusCode()` on `responseStatusCode`:

javascript

```
data.SendWorkdayAPIRequest.isSuccess.and(
  data.SendWorkdayAPIRequest.responseStatusCode.is2xxStatusCode()
)
```

If the assertion evaluates to `false`, **Continue on Conditions** halts execution and throws an exception with your configured error message, which then routes to your local or global error handler.

## Continuing a loop while still recording per-worker validation errors

If your parent orchestration calls the sub-orchestration inside a **Loop** over hundreds of workers, throwing an unhandled exception on the first invalid worker will abort the entire loop. When you want the loop to process every remaining worker and still capture each failure:

1.  Attach a local error handler (**Add Error Handler**) to the **Send Workday API Request** step (or to the **Call Suborchestration** step).
2.  In the error handler’s **Properties** panel, select **Conditional Outputs** instead of **Propagate Error**. Note that Workday does not allow **Conditional Outputs** on the very last step of an orchestration or group, so place a **Create Values** or **Branch on Conditions** step after the guarded step.
3.  Inside the error handler canvas, add a **Log** step that records `processingError.locationPath` and `processingError.message` along with the current worker ID.
4.  Downstream of the guarded step, check `data.ErrorHandlerName.isSuccess`. When `isSuccess` is `false`, branch to record the failed worker without attempting to read the primary output of the failed API step (reading the primary output of a failed step causes Orchestration Builder to rethrow the exception).

If you prefer to branch without throwing an exception, evaluate `data.SendWorkdayAPIRequest.response.isSoapFault()` in a **Branch on Conditions** step and extract the SOAP fault text in the `IF` branch using a wildcard XPath:

javascript

```
data.SendWorkdayAPIRequest.response.asXML().stringAtXPath("/*/*/faultstring")
```

## Why Business Process-triggered orchestrations still show Completed on step failure

Even when you attach a `200`–`299` HTTP retry policy, confirm that `SendWorkdayAPIRequest` fails in the run logs, and set the local error handler to **Propagate Error**, an orchestration built on the **Workday Business Process** template still displays **Completed** in **Orchestration Activity** and **Successfully Completed** on the parent Business Process event’s **Orchestrations** tab. This happens regardless of whether **Advance business process step when orchestration completes** is checked on **Configure Orchestration Service**.

The **Workday Business Process** orchestration template cannot update the parent Business Process event status to `Completed With Errors`, and it does not include the **Add Integration Message** or **Store Document** components.

When operations teams need tenant-side visibility into API failures without relying on Developer Site run logs, use one of two patterns:

| Requirement | Recommended Architecture |
| --- | --- |
| Surface `Completed With Errors` and fault details on a tenant Integration Event while letting the Business Process finish | Build the flow on the **Workday Integration System** (O4I) template instead of the Business Process template, or invoke an O4I orchestration from your flow. Inside the O4I error handler or fault branch, add an **Add Integration Message** step with **Severity** set to `ERROR` and **Detail** populated with the API fault string. |
| Track failures inside an Extend app when the **Workday Business Process** template is required (for example, to participate in BP rescind flows) | In the local error handler or **Global Error Handler**, write a record to a dedicated Extend tracking Business Object capturing the Business Process Event WID, `processingError.locationPath`, `processingError.message`, and the target Worker ID. |

When an O4I orchestration executes an **Add Integration Message** step with **Severity** set to `ERROR`, both the tenant **Integration Event** and **Orchestration Activity** transition to **Completed With Errors**, displaying the exact Workday API fault in the tenant UI while still allowing the originating Business Process to complete.

## How to verify error propagation in your tenant

1.  Deploy the updated app and trigger a negative test by passing an invalid reference ID (such as a nonexistent `Worker_ID` or `Deduction_Code`).
2.  Open **Orchestration Builder Logs** (or **Application Logs**) on the Developer Site and confirm that the **Send Workday API Request** step logs an `ERROR` entry (`Response status code 500 is outside of defined success ranges (200,299)` or the **Continue on Conditions** assertion message) and that your local error handler’s **Log** step outputs `processingError.locationPath` and `processingError.message`.
3.  If using the **Workday Integration System** template with **Add Integration Message** (`Severity = ERROR`), open the **Integration Event** in the Workday tenant and verify that the overall status is **Completed With Errors** and that the **Messages** tab displays the captured SOAP fault or REST validation message.

## Sources checked

-   [Handle Errors](https://developer.workday.com/documentation/GUID-13ff2639-de8c-43c4-932a-e109fd3c8567)
-   [Define HTTP Retry Policies](https://developer.workday.com/documentation/GUID-d04cc763-a044-423f-b39e-1348dfd76a87)
-   [Reference: Send Workday API Request](https://developer.workday.com/documentation/GUID-43efaf69-686f-4372-a0a7-5238ead1a2a7)
-   [Reference: Continue on Conditions](https://developer.workday.com/documentation/GUID-cca8cc3e-f013-44b8-bf49-187249b92294)
-   [Reference: Add Integration Message](https://developer.workday.com/documentation/GUID-d31029df-b131-4f00-8d32-dc5773e22e4c)
-   [Trigger an Orchestration from a Business Process](https://developer.workday.com/documentation/kcz1625656998198)

## Related guides

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

-   [### Reusing and versioning sub-orchestrations across Workday Extend and O4I apps Sub-orchestrations cannot be called directly across different Workday Extend or Integration apps. Expose shared cross-app logic through a versioned Synchronous Orchestration REST endpoint, or version shared sub-orchestrations inside a single O4I app using default input parameters and branching.](https://kiweely.com/guides/workday-orchestrate-reuse-sub-orchestrations-across-apps)
-   [### Logging in Workday Orchestrate: Log, Log to File, Add Integration Message and verbose logging The Log step writes to the app logs on the Developer Site, kept 30 days. Add Integration Message writes to the integration event in the tenant. Log to File builds a named CSV log you attach with Store Document. Verbose logging is a time-limited REST switch for troubleshooting.](https://kiweely.com/guides/workday-orchestrate-logging)
-   [### Branch on Conditions outputs must match: fixing Enable outputs, and when to use Continue on Conditions instead With Enable outputs on, every IF and ELSE branch must hand on the same output names and data types, because later steps read one output from the branch step. End each branch with a Create Values step setting the same keys, or use Continue on Conditions when a path should stop.](https://kiweely.com/guides/workday-orchestrate-branch-outputs-must-match)
-   [### How do I debug a Workday Orchestrate orchestration that shows success but some steps failed? A run can look successful because an unsuccessful HTTP response is not a failure unless a retry policy defines a success range, and an error handler set to Conditional Outputs lets the run carry on. Read the run’s per-process stepsFailed, not the status.](https://kiweely.com/guides/orchestrate-errors)

### More guides on Orchestrate

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

-   [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)
-   [Picking up SFTP files from subfolders and reading IDs from PDF filenames in Orchestrate](https://kiweely.com/guides/workday-orchestrate-sftp-subfolders-pdf-files)
-   [Sending email from Orchestrate: the Connect sendMessage API and email connectors](https://kiweely.com/guides/workday-orchestrate-send-email)
-   [How to keep large Workday Orchestrate loads inside the runtime limits: templates, checkpoints, batches and child runs](https://kiweely.com/guides/workday-orchestrate-runtime-limit-large-loads)
-   [How to rebuild an XSLT transformation in Workday Orchestrate](https://kiweely.com/guides/workday-orchestrate-replace-xslt)
-   [RaaS calls in Orchestrate: namespaces, unexpected character errors, 401s and empty reports](https://kiweely.com/guides/workday-orchestrate-raas-errors)

### From the blog on Orchestrate

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

-   [Debugging Workday Extend apps and orchestrations in kiweely](https://kiweely.com/blog/debugging-workday-extend-apps-orchestrations-kiweely)
-   [Kiweely Roots vs Workday EIB, Studio, and Orchestrate](https://kiweely.com/blog/kiweely-roots-vs-workday-eib-studio-orchestrate)
-   [Orchestrate, an iPaaS, or Kiweely Roots](https://kiweely.com/blog/orchestrate-ipaas-or-kiweely-roots)

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