-
Notifications
You must be signed in to change notification settings - Fork 213
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
allow client to request keep scheduled workflow id as is. #1393
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -363,6 +363,10 @@ type ( | |
// | ||
// [Visibility]: https://docs.temporal.io/visibility | ||
TypedSearchAttributes SearchAttributes | ||
|
||
// KeepOriginalWorkflowID - If true, and the action would start a workflow, a timestamp will not be | ||
// appended to the scheduled workflow id. | ||
KeepOriginalWorkflowID bool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What would happen if users try to set this to true and call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you are right. Protobuf allows us to ignore fields which we do not recognize. So server will just ignore the new field. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably document this option may not apply depending on the server version, ideally say what server version this option will be respected |
||
} | ||
|
||
// ScheduleWorkflowExecution contains details on a workflows execution stared by a schedule. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this only applies if the action is
ScheduleWorkflowAction
is there a reason you didn't put the field on the action?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially it was in ScheduleAction. Then @dnr pointed out that Policy is the more logical place for this field. There is no Policy in the SDK ScheduleOptions. So I left the field at the options top level.
How can users set Policy from the workflow code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why policy is more logical if this only applies to one type of action. @dnr do you expect this option to apply to other type of actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really have a distinct type for the start workflow action. Maybe we should have. I think "policies" make sense as general configuration that can affect schedule execution.
For other actions: suppose we had an action to start a top-level activity. I think top-level activities would still have names, so it could apply there too. Same for starting a nexus operation, though I'm not sure about naming there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm if this option is meant to apply to other future actions like top level activity of nexus operation then I think we should change the name to not include
Workflow
since that is specific to one type of action.