René's URL Explorer Experiment


Title: Functions - Terminating a running orchestrator throws IllegalStateException · Issue #237 · microsoft/durabletask-java · GitHub

Open Graph Title: Functions - Terminating a running orchestrator throws IllegalStateException · Issue #237 · microsoft/durabletask-java

X Title: Functions - Terminating a running orchestrator throws IllegalStateException · Issue #237 · microsoft/durabletask-java

Description: When using this repo with Azure Functions with the MSSQL backend, and using the client.terminate() API to terminate an orchestraton that is still running, the orchestration will throw an IllegalStateException: [2025-08-22T16:32:56.240Z] ...

Open Graph Description: When using this repo with Azure Functions with the MSSQL backend, and using the client.terminate() API to terminate an orchestraton that is still running, the orchestration will throw an IllegalSta...

X Description: When using this repo with Azure Functions with the MSSQL backend, and using the client.terminate() API to terminate an orchestraton that is still running, the orchestration will throw an IllegalSta...

Opengraph URL: https://github.com/microsoft/durabletask-java/issues/237

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Functions - Terminating a running orchestrator throws IllegalStateException","articleBody":"When using this repo with Azure Functions with the MSSQL backend, and using the client.terminate() API to terminate an orchestraton that is still running, the orchestration will throw an IllegalStateException: \n\n```text\n[2025-08-22T16:32:56.240Z] Executed 'Functions.LongRunningOrchestrator' (Failed, Id=c6d1d1b9-32ee-4849-a841-5902bbbff2c6, Duration=51ms)\n[2025-08-22T16:32:56.241Z] System.Private.CoreLib: Exception while executing function: Functions.LongRunningOrchestrator. System.Private.CoreLib: Result: Failure\nException: IllegalStateException: The orchestrator has already completed\nStack: java.lang.IllegalStateException: The orchestrator has already completed\n[2025-08-22T16:32:56.242Z]      at com.microsoft.durabletask.Helpers.throwIfOrchestratorComplete(Helpers.java:31)\n[2025-08-22T16:32:56.243Z]      at com.microsoft.durabletask.TaskOrchestrationExecutor$ContextImplTask.completeInternal(TaskOrchestrationExecutor.java:799)\n[2025-08-22T16:32:56.244Z]      at com.microsoft.durabletask.TaskOrchestrationExecutor$ContextImplTask.fail(TaskOrchestrationExecutor.java:787)\n[2025-08-22T16:32:56.244Z]      at com.microsoft.durabletask.TaskOrchestrationExecutor.execute(TaskOrchestrationExecutor.java:71)\n[2025-08-22T16:32:56.245Z]      at com.microsoft.durabletask.OrchestrationRunner.loadAndRun(OrchestrationRunner.java:136)\n[2025-08-22T16:32:56.247Z]      at com.microsoft.durabletask.OrchestrationRunner.loadAndRun(OrchestrationRunner.java:69)\n[2025-08-22T16:32:56.249Z]      at com.microsoft.durabletask.OrchestrationRunner.loadAndRun(OrchestrationRunner.java:42)\n[2025-08-22T16:32:56.249Z]      at com.microsoft.durabletask.azurefunctions.internal.middleware.OrchestrationMiddleware.invoke(OrchestrationMiddleware.java:37)\n[2025-08-22T16:32:56.250Z]      at com.microsoft.azure.functions.worker.chain.InvocationChain.doNext(InvocationChain.java:21)\n[2025-08-22T16:32:56.251Z]      at com.microsoft.azure.functions.worker.broker.JavaFunctionBroker.invokeMethod(JavaFunctionBroker.java:125)\n[2025-08-22T16:32:56.252Z]      at com.microsoft.azure.functions.worker.handler.InvocationRequestHandler.execute(InvocationRequestHandler.java:34)\n[2025-08-22T16:32:56.253Z]      at com.microsoft.azure.functions.worker.handler.InvocationRequestHandler.execute(InvocationRequestHandler.java:10)\n[2025-08-22T16:32:56.254Z]      at com.microsoft.azure.functions.worker.handler.MessageHandler.handle(MessageHandler.java:44)\n[2025-08-22T16:32:56.255Z]      at com.microsoft.azure.functions.worker.JavaWorkerClient$StreamingMessagePeer.lambda$onNext$0(JavaWorkerClient.java:94)\n[2025-08-22T16:32:56.256Z]      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)\n[2025-08-22T16:32:56.257Z]      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n[2025-08-22T16:32:56.258Z]      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n[2025-08-22T16:32:56.258Z]      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n[2025-08-22T16:32:56.259Z]      at java.base/java.lang.Thread.run(Thread.java:842)\n[2025-08-22T16:32:56.260Z] .\n[2025-08-22T16:32:56.266Z] d88614d4-5cea-453a-9bbd-0a423a9059da: Function 'LongRunningOrchestrator (Orchestrator)' failed with an error. Reason: Microsoft.Azure.WebJobs.Host.FunctionInvocationException\n```\n\nCode:\n```java\n/**\n * Orchestration and activity functions for simulating long-running orchestration and termination.\n */\npublic class TerminateOrchestration {\n\n    /**\n     * This is the orchestrator function.\n     */\n    @FunctionName(\"LongRunningOrchestrator\")\n    public List\u003cString> longRunningOrchestrator(\n            @DurableOrchestrationTrigger(name = \"ctx\") TaskOrchestrationContext ctx,\n            final ExecutionContext context) {\n        Logger logger = context.getLogger();\n        logger.info(\"Starting long-running orchestration.\");\n        List\u003cString> outputs = new ArrayList\u003c>();\n\n        // Call our fake activity 100,000 times to simulate an orchestration that might run for >= 10,000s (2.7 hours)\n        for (int i = 0; i \u003c 100000; i++) {\n            outputs.add(ctx.callActivity(\"SimulatedWorkActivity\", 100, String.class).await());\n        }\n\n        return outputs;\n    }\n\n    /**\n     * This is the activity function.\n     */\n    @FunctionName(\"SimulatedWorkActivity\")\n    public String simulatedWorkActivity(\n            @DurableActivityTrigger(name = \"sleepMs\") int sleepMs,\n            final ExecutionContext context) {\n        context.getLogger().info(\"Sleeping for \" + sleepMs + \"ms.\");\n        try {\n            Thread.sleep(sleepMs);\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            return \"Sleep interrupted.\";\n        }\n        return \"Slept for \" + sleepMs + \"ms.\";\n    }\n\n    /**\n     * HTTP-triggered function to terminate an orchestration instance.\n     */\n    @FunctionName(\"TerminateInstance\")\n    public HttpResponseMessage run(\n            @HttpTrigger(name = \"req\", methods = {HttpMethod.GET, HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage\u003cOptional\u003cString>> request,\n            @DurableClientInput(name = \"durableContext\") DurableClientContext durableContext,\n            @BindingName(\"instanceId\") String instanceId,\n            final ExecutionContext context) {\n        DurableTaskClient client = durableContext.getClient();\n        String reason = \"Long-running orchestration was terminated early.\";\n        try {\n            client.terminate(instanceId, reason);\n            return request.createResponseBuilder(HttpStatus.OK).build();\n        } catch (Exception ex) {\n            context.getLogger().severe(ex.getMessage());\n            return request.createResponseBuilder(HttpStatus.BAD_REQUEST)\n                    .header(\"Content-Type\", \"text/plain\")\n                    .body(ex.getMessage())\n                    .build();\n        }\n    }\n}\n```","author":{"url":"https://github.com/andystaples","@type":"Person","name":"andystaples"},"datePublished":"2025-08-22T16:35:27Z","url":"https://github.com/microsoft/durabletask-java/issues/237"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2a446320-e1d7-0677-92e3-07349d6dbfbe
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8BE0:2218F3:657E1:89C1B:6AFE31A3
html-safe-nonced2bffa2228598a1268abd50c055dd45e57055a13dcd1fced64fe7b0137eea4b9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkUwOjIyMThGMzo2NTdFMTo4OUMxQjo2QUZFMzFBMyIsInZpc2l0b3JfaWQiOiI4MzUyMTIyODUxNjE1OTc3ODkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdca9f5d8163dce358ee93775000e49a2f78ce4665b304b42414b88014c8dcaee
hovercard-subject-tagissue:3346025606
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-java/237/issue_layout
twitter:imagehttps://opengraph.githubassets.com/83a4d0456893638e66cb92929984562162da8f59a88618ed68af583e1402ec92/microsoft/durabletask-java/issues/237
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/83a4d0456893638e66cb92929984562162da8f59a88618ed68af583e1402ec92/microsoft/durabletask-java/issues/237
og:image:altWhen using this repo with Azure Functions with the MSSQL backend, and using the client.terminate() API to terminate an orchestraton that is still running, the orchestration will throw an IllegalSta...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameandystaples
hostnamegithub.com
expected-hostnamegithub.com
Noned70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2
turbo-cache-controlno-preview
go-importgithub.com/microsoft/durabletask-java git https://github.com/microsoft/durabletask-java.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id452823832
octolytics-dimension-repository_nwomicrosoft/durabletask-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id452823832
octolytics-dimension-repository_network_root_nwomicrosoft/durabletask-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseccb88d9c92abe69245b429398c8a57ae87070c7c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/durabletask-java/issues/237#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-java%2Fissues%2F237
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-java%2Fissues%2F237
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fdurabletask-java
Reloadhttps://github.com/microsoft/durabletask-java/issues/237
Reloadhttps://github.com/microsoft/durabletask-java/issues/237
Reloadhttps://github.com/microsoft/durabletask-java/issues/237
microsofthttps://github.com/microsoft
durabletask-javahttps://github.com/microsoft/durabletask-java
Codehttps://github.com/microsoft/durabletask-java
Issues47 (47)https://github.com/microsoft/durabletask-java/issues
Pull requests4 (4)https://github.com/microsoft/durabletask-java/pulls
Actionshttps://github.com/microsoft/durabletask-java/actions
Projectshttps://github.com/microsoft/durabletask-java/projects
Security and qualityhttps://github.com/microsoft/durabletask-java/security
Insightshttps://github.com/microsoft/durabletask-java/insights
https://github.com/microsoft/durabletask-java
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-java/issues/237
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-java/issues/237
Functions - Terminating a running orchestrator throws IllegalStateExceptionhttps://github.com/microsoft/durabletask-java/issues/237#top
P2Priority 2https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22P2%22
https://github.com/andystaples
andystapleshttps://github.com/andystaples
on Aug 22, 2025https://github.com/microsoft/durabletask-java/issues/237#issue-3346025606
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Needs: Triage 🔍https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22Needs%3A%20Triage%20%3Amag%3A%22
on Aug 22, 2025https://github.com/microsoft/durabletask-java/issues/237#event-19290683528
https://github.com/andystaples
andystapleshttps://github.com/andystaples
on Sep 2, 2025https://github.com/microsoft/durabletask-java/issues/237#issuecomment-3246214147
Anatoli Beliaev (AnatoliB)https://github.com/AnatoliB
P2Priority 2https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22P2%22
Needs: Triage 🔍https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22Needs%3A%20Triage%20%3Amag%3A%22
on Sep 9, 2025https://github.com/microsoft/durabletask-java/issues/237#event-19600320242
andystapleshttps://github.com/andystaples
on Mar 23, 2026https://github.com/microsoft/durabletask-java/issues/237#event-23827517434
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/durabletask-java/issues/237
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/durabletask-java/issues/237
P2Priority 2https://github.com/microsoft/durabletask-java/issues?q=state%3Aopen%20label%3A%22P2%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.