Title: What is OrchestratorBlockedException? · Issue #242 · microsoft/durabletask-java · GitHub
Open Graph Title: What is OrchestratorBlockedException? · Issue #242 · microsoft/durabletask-java
X Title: What is OrchestratorBlockedException? · Issue #242 · microsoft/durabletask-java
Description: Creating a pinned issue to help folks who may have questions on this topic which occasionally comes up. This information is available in the JavaDocs, but sometimes gets missed, so I'm putting more context in a GitHub issue in hopes that...
Open Graph Description: Creating a pinned issue to help folks who may have questions on this topic which occasionally comes up. This information is available in the JavaDocs, but sometimes gets missed, so I'm putting more...
X Description: Creating a pinned issue to help folks who may have questions on this topic which occasionally comes up. This information is available in the JavaDocs, but sometimes gets missed, so I'm putting ...
Opengraph URL: https://github.com/microsoft/durabletask-java/issues/242
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"What is OrchestratorBlockedException?","articleBody":"Creating a pinned issue to help folks who may have questions on this topic which occasionally comes up. This information is available in the JavaDocs, but sometimes gets missed, so I'm putting more context in a GitHub issue in hopes that this may be more discoverable. At some point this will be added to a Java-specific developer guide for Durable Task Java SDK.\n\n### What is OrchestratorBlockedException\n\n`OrchestratorBlockedException` is a subclass of `RuntimeException` that is thrown when an orchestrator calls `Task.await()` on a task that isn’t yet completed. \n\nThe reason for this exception _isn't_ that something went wrong in the code execution. Rather, it's part of the mechanism of how orchestrator functions get suspended (“yielded”) so the framework can checkpoint state, schedule further work (like activities or timers), and unload the orchestrator from memory until the next event. In effect, it’s used to block/suspend the orchestrator’s execution until the awaited task finishes.\n\n**It is a control-flow exception**. This exception must never be caught by user code, and the exception message emphasizes this. If you catch it, you may prevent the orchestration from saving its state or scheduling new work, which can lead to the orchestration “getting stuck.” \n\n### Why it is thrown\n\nIn an orchestrator function in Java, when you call something like `ctx.callActivity(“Foo”, input, SomeClass.class).await()`, that returns a `Task\u003cSomeClass>`. If that task is not completed yet, `.await()` needs to pause the orchestrator until that task finishes. This is similar to how coroutines work, particularly in languages that support async/await (which Java does not).\n\nThe mechanism Durable Task uses to implement the coroutine pattern is to throw (under the covers) an `OrchestratorBlockedException`. The orchestration runtime catches that internally, records the current workflow state (all scheduled but not yet completed tasks, etc.), checkpoints, and exits the function invocation (as a success). Later, when the awaited task (activity / timer / external event) completes, the orchestrator is resumed (replayed) from that point. \n\nIn summary: `OrchestratorBlockedException` is not an error. It’s an expected behavior in orchestrator functions to implement durable coroutines.","author":{"url":"https://github.com/cgillum","@type":"Person","name":"cgillum"},"datePublished":"2025-09-17T18:02:58Z","url":"https://github.com/microsoft/durabletask-java/issues/242"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a702f8af-74a5-0e47-8423-c903410ff13b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4E6:DB5A4:5FD3E:7CF65:6AFE31D9 |
| html-safe-nonce | bcdc231f5b3b4a08184607e11a5e2bf76c4b588bb4d0f21c795a21a0ce20f683 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEU2OkRCNUE0OjVGRDNFOjdDRjY1OjZBRkUzMUQ5IiwidmlzaXRvcl9pZCI6Ijg5ODIwOTc0MzYxMzg2ODA3OTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c3781cb6d283a3ce2c6f4cb401b48f8a706d5ab6d014ace5996b54db210bb2ac |
| hovercard-subject-tag | issue:3427282607 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-java/242/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba8649d7f431d71f8fa58d9db8ef4bd9c3e67376ad819f5c25f2f347cc587af0/microsoft/durabletask-java/issues/242 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba8649d7f431d71f8fa58d9db8ef4bd9c3e67376ad819f5c25f2f347cc587af0/microsoft/durabletask-java/issues/242 |
| og:image:alt | Creating a pinned issue to help folks who may have questions on this topic which occasionally comes up. This information is available in the JavaDocs, but sometimes gets missed, so I'm putting more... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cgillum |
| hostname | github.com |
| expected-hostname | github.com |
| None | d70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/durabletask-java git https://github.com/microsoft/durabletask-java.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 452823832 |
| octolytics-dimension-repository_nwo | microsoft/durabletask-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 452823832 |
| octolytics-dimension-repository_network_root_nwo | microsoft/durabletask-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ccb88d9c92abe69245b429398c8a57ae87070c7c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width