temporalio / temporalio/sdk-java

Calling workflow method on the workflow stub should always wait for the workflow completion.

Open
#613 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
433
Forks
249
Avg merge
5d 6h
Merged PRs (30d)
26

Description

Is your feature request related to a problem? Please describe.
When a workflow is started synchronously using a typed stub it reconnects to an already running instance if WorkflowIdReusePolicy is not AllowDuplicate.

When a workflow method is called on a stub that was created using a workflowId (see newWorkflowStub(Class workflowInterface, String workflowId)) an exception is returned.

Describe the solution you'd like
When a workflow stub is created by a workflowId and the workflow method is invoked then the call should block waiting for a workflow result if a workflow with the given id is already running. The exception should be returned if no workflow with such id exists.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with WorkflowClient.newWorkflowStub(Class workflowInterface, String workflowId) and trace how a method call on that typed stub is handled. Verify the behavior for an already-running workflow and for an absent workflow: the former should wait for completion, while the latter should return an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.