Skip to content

Commit 8209bae

Browse files
committed
support priority override for sub workflows
1 parent a28e0e9 commit 8209bae

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

common/src/main/java/com/netflix/conductor/common/metadata/workflow/SubWorkflowParams.java

+11
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public class SubWorkflowParams {
4545

4646
private IdempotencyStrategy idempotencyStrategy;
4747

48+
//Priority of the sub workflow, not set inherits from the parent
49+
private Integer priority;
50+
4851
public String getIdempotencyKey() {
4952
return idempotencyKey;
5053
}
@@ -61,6 +64,14 @@ public void setIdempotencyStrategy(IdempotencyStrategy idempotencyStrategy) {
6164
this.idempotencyStrategy = idempotencyStrategy;
6265
}
6366

67+
public Integer getPriority() {
68+
return priority;
69+
}
70+
71+
public void setPriority(Integer priority) {
72+
this.priority = priority;
73+
}
74+
6475
/**
6576
* @return the name
6677
*/

core/src/main/java/com/netflix/conductor/core/execution/mapper/SubWorkflowTaskMapper.java

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext) {
8383
subWorkflowTask.addInput("workflowInput", taskMapperContext.getTaskInput());
8484
subWorkflowTask.setStatus(TaskModel.Status.SCHEDULED);
8585
subWorkflowTask.setCallbackAfterSeconds(workflowTask.getStartDelay());
86+
subWorkflowTask.setWorkflowPriority(subWorkflowParams.getPriority());
8687
LOGGER.debug("SubWorkflowTask {} created to be Scheduled", subWorkflowTask);
8788
return List.of(subWorkflowTask);
8889
}

0 commit comments

Comments
 (0)