private boolean isForkJoinTaskValid(
                WorkflowTask workflowTask, ConstraintValidatorContext context) {
            boolean valid = true;

            if (workflowTask.getForkTasks() != null && (workflowTask.getForkTasks().size() == 0)) {
                String message =
                        String.format(
                                "forkTasks should have atleast one task for taskType: %s taskName: %s",
                                TaskType.FORK_JOIN, 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