You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workflows need a way to run code before start to setup handlers and anything else they may want. This would accept the same input as the workflow, but can only error not return a value. Right now, especially in our languages that let you predefine handlers, it is tough to have an update/signal handler rely on workflow input.
Not needed in Go but people may like it. Can either be a register option, or maybe we can start accepting structs as workflows that must have a Run() call, but if they also have an Init() call we invoke that. Unsure, may not even be wanted
.NET - Done
[WorkflowInit] already supported in this manner on .NET workflow class constructors
NOTE: This is still conceptual and subject to architectural and value discussions on whether we even want to do this much less how.
The text was updated successfully, but these errors were encountered:
While it technically would work, it is discouraged. I do not believe init should be async in languages that differentiate. This should just be for state. I think PHP should wait for Go and to even see where we want to do this in Go.
Describe the solution you'd like
Workflows need a way to run code before start to setup handlers and anything else they may want. This would accept the same input as the workflow, but can only error not return a value. Right now, especially in our languages that let you predefine handlers, it is tough to have an update/signal handler rely on workflow input.
php Workflow-init support sdk-php#480
typescript Workflow-init support docs sdk-typescript#1483
java Add init method to workflow sdk-java#865
@WorkflowInitMethod
or@WorkflowConstructor
or something on the constructorpython Workflow-init support sdk-python#600
@workflow.init
can be put on__init__
of the workflow classgo Workflow-init support docs sdk-go#1576
Run()
call, but if they also have anInit()
call we invoke that. Unsure, may not even be wanted.NET - Done
[WorkflowInit]
already supported in this manner on .NET workflow class constructorsNOTE: This is still conceptual and subject to architectural and value discussions on whether we even want to do this much less how.
The text was updated successfully, but these errors were encountered: