-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Conversation
1. taskToSchedule -> workflowTask 2. workflowInstance -> workflowModel 3. Removed unused WorkflowDefinition. 4. Changed bean name from taskProcessorsMap to taskMappersByTaskType.
4a6eec9
to
4f56879
Compare
@apanicker-nflx @jxu-nflx PR will be easier to review if each commit is reviewed separately. |
…ing to its status.
4d1ba29
to
6e6195b
Compare
long epochMillis = System.currentTimeMillis(); | ||
forkTask.setStartTime(epochMillis); | ||
forkTask.setEndTime(epochMillis); | ||
forkTask.setEndTime(epochMillis); |
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.
duplicate setEndTime
dynamicTask.setTaskDefName(taskToSchedule.getName()); | ||
dynamicTask.setCorrelationId(workflowInstance.getCorrelationId()); | ||
dynamicTask.setScheduledTime(System.currentTimeMillis()); | ||
dynamicTask.setTaskType(workflowTask.getType()); |
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.
dynamicTask.setTaskType(workflowTask.getType());
this line can be removed
* @param joinWorkflowTask: A instance of {@link WorkflowTask} which is of type {@link | ||
* TaskType#JOIN} | ||
* @param joinInput: The input which is set in the {@link TaskModel#setInputData(Map)} | ||
* @return a new instance of {@link TaskModel} representing a {@link TaskType#JOIN} | ||
*/ | ||
@VisibleForTesting | ||
TaskModel createJoinTask( | ||
WorkflowModel workflowInstance, | ||
WorkflowModel workflowModel, | ||
WorkflowTask joinWorkflowTask, | ||
HashMap<String, Object> joinInput) { | ||
TaskModel joinTask = new TaskModel(); |
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.
Should this be replaced with createTaskModel
as well?
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.
This can't be, because the joinWorkflowTask
is not part of the TaskMapperContext
. See https://github.com/Netflix/conductor/blob/main/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java#L212-L225
# Conflicts: # core/src/main/java/com/netflix/conductor/core/execution/mapper/SubWorkflowTaskMapper.java
52b03c8
to
0b6750f
Compare
Pull Request type
./gradlew generateLock saveLock
to refresh dependencies)Changes in this PR
taskToSchedule
->workflowTask
.workflowInstance
->workflowModel
.workflowDefinition
.taskProcessorsMap
totaskMappersByTaskType
.WorkflowTask
andWorkflowModel
.FORK_JOIN_DYNAMIC
now setsstartTime
.TaskMapper
implementations set the time fields inTaskModel
corresponding to its status.start
andexecute
methods fromWait
.