Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal from signal-with-start must be processed before Workflow Handler initialization #457

Closed
roxblnfk opened this issue Jun 14, 2024 · 0 comments · Fixed by #483
Closed
Labels
Bug Something isn't working
Milestone

Comments

@roxblnfk
Copy link
Collaborator

roxblnfk commented Jun 14, 2024

There is a bug with startWithSignal() method.

The Workflow method is initialized before signal call.
But signal must be executed before Workflow Handler.

This feature is useful in scenarios where you want to ensure that a Workflow is running and that it receives specific information right from the beginning.
https://docs.temporal.io/develop/typescript/message-passing#signal-with-start

To be more precise, it is not even about knowing if the signal was received before the workflow execution. It is needed to ensure that signals are not lost if the main method decides to return. The most basic scenario is the main method returning a counter and a signal handler incrementing it.
https://community.temporal.io/t/will-workflow-method-be-processed-first-or-signal/1564/2

Test case in Harness: temporalio/features@9352318

Caution

Might be breaking change

@roxblnfk roxblnfk changed the title Signal with start flow Signal from signal-with-start must be processed before Workflow Handler initialization Jun 14, 2024
@roxblnfk roxblnfk added the Bug Something isn't working label Jun 14, 2024
@roxblnfk roxblnfk added this to the 3.0.0 milestone Jun 14, 2024
@roxblnfk roxblnfk modified the milestones: 3.0.0, 2.11.0 Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant