Skip to content

Commit

Permalink
adding logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cram-cfa committed Dec 9, 2024
1 parent f34e500 commit 6ce4464
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/formflow/library/ValidationService.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ private Map<String, List<String>> performFieldLevelValidation(String flowName, F

public static Map<String, Map<String, Boolean>> getRequiredInputs(String flowName) {
if (requiredInputs.isEmpty()) {
log.info("getRequiredInputs - requiredInputs is empty");
Class<?> flowClass;

try {
Expand All @@ -180,12 +181,16 @@ public static Map<String, Map<String, Boolean>> getRequiredInputs(String flowNam
if (Arrays.stream(field.getAnnotations())
.anyMatch(annotation -> requiredAnnotationsList.contains(annotation.annotationType().getName()))) {
if (requiredInputs.containsKey(flowName)) {
log.info("getRequiredInputs - requiredInputs." + flowName + " exists");
requiredInputs.get(flowName).put(field.getName(), true);
} else {
log.info("getRequiredInputs - requiredInputs." + flowName + " is empty");
requiredInputs.put(flowName, new ConcurrentHashMap<>(Map.of(field.getName(), true)));
}
}
}
} else {
log.info("getRequiredInputs - requiredInputs is not empty");
}
return requiredInputs;
}
Expand Down

0 comments on commit 6ce4464

Please sign in to comment.