From 9ff2f1911f6ff0fff16ae44b04abe6fc4b54d6e5 Mon Sep 17 00:00:00 2001 From: James DeMichele Date: Wed, 21 Oct 2020 20:13:35 -0500 Subject: [PATCH] Fix bug in unique task reference name validation --- .../common/constraints/TaskReferenceNameUniqueConstraint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/com/netflix/conductor/common/constraints/TaskReferenceNameUniqueConstraint.java b/common/src/main/java/com/netflix/conductor/common/constraints/TaskReferenceNameUniqueConstraint.java index 4cdecede69..bb143d18c7 100644 --- a/common/src/main/java/com/netflix/conductor/common/constraints/TaskReferenceNameUniqueConstraint.java +++ b/common/src/main/java/com/netflix/conductor/common/constraints/TaskReferenceNameUniqueConstraint.java @@ -64,7 +64,7 @@ public boolean isValid(WorkflowDef workflowDef, ConstraintValidatorContext conte //check if taskReferenceNames are unique across tasks or not HashMap taskReferenceMap = new HashMap<>(); - for (WorkflowTask workflowTask : workflowDef.getTasks()) { + for (WorkflowTask workflowTask : workflowDef.collectTasks()) { if (taskReferenceMap.containsKey(workflowTask.getTaskReferenceName())) { String message = String.format("taskReferenceName: %s should be unique across tasks for a given workflowDefinition: %s", workflowTask.getTaskReferenceName(), workflowDef.getName());