private boolean isDynamicTaskValid(
                WorkflowTask workflowTask, ConstraintValidatorContext context) {
            boolean valid = true;
            if (workflowTask.getDynamicTaskNameParam() == null) {
                String message =
                        String.format(
                                PARAM_REQUIRED_STRING_FORMAT,
                                "dynamicTaskNameParam",
                                TaskType.DYNAMIC,
                                workflowTask.getName());
                context.buildConstraintViolationWithTemplate(message).addConstraintViolation();
                valid = false;
            }

            return valid;
        }
This constraint class validates following things. 1. Correct parameters are set depending on task
type.
core/src/main/java/com/netflix/conductor/validations/WorkflowTaskTypeConstraint.java