Reputation: 314
I know from the documentation, that when a workflow worker gets a decision task, it executes the whole workflow with replay history by calling the method annotated with @Execute. I am trying to find the answer for the very first time, when the method annotated @Execute is called using the external client. Does it handle the 1st call in async manner (that starting workflow can fail in future) or does it start the workflow in sync manner (so if the call succeeds, I can assume workflow execution has started for sure) ?
Upvotes: 0
Views: 45
Reputation: 6890
When the start call succeeds the workflow state is created inside the service and a workflow task is added to the correspondent workflow task list.
Later the worker is going to receive the task and start executing the method annotated with @Execute.
so if the call succeeds, I can assume workflow execution has started for sure) ?
Yes.
See the following animation that explains how the starter and workflow and activity workers interact. The presentation is about the temporal.io open source project that is based on the same ideas as SWF.
Upvotes: 0