-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[Fix-16768] Add scheduleTime
parameter to sub-workflow instance.
#16776
base: dev
Are you sure you want to change the base?
Conversation
scheduleTime
parameter to sub-workflow instance.scheduleTime
parameter to sub-workflow instance.
Quality Gate failedFailed conditions |
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.
Add schedule time to sub workflow is very strange, the parent schedule time doesn't relate to sub workflow, like we don't add a schedule time to task. If we add schedule time to sub workflow, it would be better we also add schedule time in task. This may be a problem with our use of schedule time, we should be able to get the schedule time during workflow runtime, no matter it is a task or sub workflow.
I'll try to set schedule time on task... But, currently schedule time is used for generating global parameters in workflow and calculating dates for dependent task. The execution of a task is entirely dependent on the workflow instance, so it can always got the schedule time. Therefore, what confuses me is what the effect would be if we add schedule time to the task? I'd like to abstract out a execution init parameter entity(like command object) and reference it, instead of add a value field |
@reele Yes, we should avoid add a field value of schedule time in task, since this is only related to runtime info, it's better we can get the scheduler time from runtime info. We can use a built-in parameter to represent the schedule time. Could you please provide a design first, the design is important to help to make the work clearer. |
@ruanwenjun i can have a try |
@ruanwenjun It's always propagated to sub-workflows. At runtime, it will be merged into then refactor some date operations like But there are still a few issues to resolve:
|
Purpose of the pull request
Fix #16768
add
scheduleTime
parameter to sub-workflow instance.Brief change log
refactored
SubWorkflowManualTrigger
toSubWorkflowTrigger
(only for sub-workflow, but it is very similar withWorkflowManualTrigger
)added
SubWorkflowTriggerRequest
,SubWorkflowTriggerResponse
Verify this pull request
This pull request is code cleanup without any test coverage.
I made a test which run a dependent task in sub-workflow to get original schedule-time parameter:
DependentTask_log
SubWorkflow_log
Pull Request Notice
Just fix bug.