Skip to content

docs(java-sdk): document WorkflowInstanceAlreadyExistsException - #5374

Merged
marcduiker merged 4 commits into
dapr:v1.19from
nelson-parente:java-workflow-instance-exists-exception
Oct 15, 2026
Merged

marcduiker merged 4 commits into
dapr:v1.19from
nelson-parente:java-workflow-instance-exists-exception

Conversation

@nelson-parente

Copy link
Copy Markdown
Contributor

Summary

  • DaprWorkflowClient.scheduleNewWorkflow now throws WorkflowInstanceAlreadyExistsException when the runtime rejects a duplicate instance ID.
  • Which existing instances cause the rejection depends on NewWorkflowOptions.setEnforceUniqueInstanceId(boolean): disabled (default) only rejects an active instance's ID; enabled rejects the ID in any status, including terminal ones.
  • Adds a short "Handling duplicate workflow instance IDs" subsection with a code example under Advanced features.

Code reference

sdk-workflows/src/main/java/io/dapr/workflows/client/{WorkflowInstanceAlreadyExistsException,NewWorkflowOptions}.java on dapr/java-sdk release-1.19

🤖 Generated with Claude Code

https://claude.ai/code/session_017JhKUDV9dbs5JDz2uwZqz5

DaprWorkflowClient.scheduleNewWorkflow now throws
WorkflowInstanceAlreadyExistsException when the runtime rejects a
duplicate instance ID, and NewWorkflowOptions.setEnforceUniqueInstanceId
controls whether a completed instance's ID can be reused. Documents
both with a short example under Advanced features.

Ref: dapr/java-sdk (sdk-workflows client, release-1.19)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017JhKUDV9dbs5JDz2uwZqz5
Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
@nelson-parente
nelson-parente requested review from a team as code owners October 9, 2026 11:24
@CasperGN CasperGN assigned CasperGN and unassigned CasperGN Oct 12, 2026

@marcduiker marcduiker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CasperGN CasperGN self-assigned this Oct 13, 2026

@CasperGN CasperGN left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 2 of 3: follow-up on the changes since 3cb0de9.

Every earlier blocker is resolved and the new changes add none.

Nits, not blocking:

  • F1: Version reference 'From Dapr 1.19' is ambiguous between runtime and Java SDK version (sdkdocs/java/content/en/java-sdk-docs/java-workflow/java-workflow-howto.md)

Drafted with AI assistance and reviewed by me.

@marcduiker
marcduiker merged commit b809fd7 into dapr:v1.19 Oct 15, 2026
6 checks passed
@nelson-parente nelson-parente added this to the v1.19 milestone Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants