sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

Provide WorkflowStatus in WorkflowNotFoundException when signing a workflow

Open longquanzheng opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. Currently signaling a closed workflow will throw this exception, but there are several cases:

  • Workflow really doesn't exist (or deleted after retention)
  • Workflow is completed/terminated/etc (closed)

As an application, we sometimes need to handle the two cases differently(error handling).

Describe the solution you'd like The exception should just return "WorkflowStatus" inside.

Describe alternatives you've considered Currently we have to make a DescribeWorkflowExecution API call to achieve this. This requires more code, more error handling, and higher latency .

Additional context Add any other context or screenshots about the feature request here.

longquanzheng avatar Jan 11 '24 20:01 longquanzheng

Currently the server does not send back this information on a signal to a not running workflow. So to clarify, is the ask that the Temporal server sends back the WorkflowExecutionStatus on a signal to a not running workflow?

Quinn-With-Two-Ns avatar Jan 13 '24 00:01 Quinn-With-Two-Ns

Yes 👍 it needs server support

Thanks, Quanzheng

On Fri, Jan 12, 2024 at 4:50 PM Quinn Klassen @.***> wrote:

Currently the server does not send back this information on a signal to a not running workflow. So to clarify, is the ask that the Temporal server sends back the WorkflowExecutionStatus on a signal to a not running workflow?

— Reply to this email directly, view it on GitHub https://github.com/temporalio/sdk-java/issues/1969#issuecomment-1890198939, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCQPM3DURANKBM4NOAMTLTYOHK6HAVCNFSM6AAAAABBXCIIUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGE4TQOJTHE . You are receiving this because you authored the thread.Message ID: @.***>

longquanzheng avatar Jan 13 '24 01:01 longquanzheng

I could transfer this issue to the https://github.com/temporalio/temporal repo, but its title and description are very Java SDK specific. Rather, can you open an issue there asking for this information to be present on the not-found details of workflow calls?

cretz avatar Jan 16 '24 14:01 cretz

I could transfer this issue to the https://github.com/temporalio/temporal repo, but its title and description are very Java SDK specific. Rather, can you open an issue there asking for this information to be present on the not-found details of workflow calls?

yeah: https://github.com/temporalio/temporal/issues/5303

longquanzheng avatar Jan 16 '24 19:01 longquanzheng