-
Notifications
You must be signed in to change notification settings - Fork 752
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
WorkflowContext provides whether the current workflow task is from a reset #5873
Comments
This is a server-side feature. If this information is deemed important, it will have to be provided on each task in history. Transferring to server repo... |
As discussed internally, the SDK has the information already, it uses it to reseed the RNG. @longquanzheng, can you show an example of how you'd expect this to be used? A short sample would be nice so we can understand what you have in mind. Also, what would this flag do if a workflow was reset multiple times? |
Yeah I need to implement a "soft timeout" for a workflow. It will fail the workflow on the timeout. But later on I will let a human to manually restart it by resetting the workflow back to the last workflow task. If I have this boolean, I can just let it create another timer again as an "extended timeout". This also sounds like a workaround of a missing feature of "soft timeout" that Maxim pointed out. #1412
I would expect the flag is only true for the first workflow task after reset. So if a history:
|
I would recommend that you create a timer and cancel the root workflow scope for a soft timeout for now. |
Is your feature request related to a problem? Please describe.
It's not possible to know whether or not the current task is from a reset. It would be much simpler to build a logic in workflow to fail on certain case (to stop all the activities), then I will reset it later to resume.
Describe the solution you'd like
Expose a boolean flag in WorkflowContext to indicate whether the current workflow task is from a reset?(basically if the previous task is workflow task failed with reason of Reset)
The text was updated successfully, but these errors were encountered: