@Override
        public boolean isValid(WorkflowTask workflowTask, ConstraintValidatorContext context) {
            context.disableDefaultConstraintViolation();

            boolean valid = true;

            // depending on task type check if required parameters are set or not
            switch (workflowTask.getType()) {
                case TaskType.TASK_TYPE_EVENT:
                    valid = isEventTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_DECISION:
                    valid = isDecisionTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_SWITCH:
                    valid = isSwitchTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_DYNAMIC:
                    valid = isDynamicTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_FORK_JOIN_DYNAMIC:
                    valid = isDynamicForkJoinValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_HTTP:
                    valid = isHttpTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_FORK_JOIN:
                    valid = isForkJoinTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_TERMINATE:
                    valid = isTerminateTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_KAFKA_PUBLISH:
                    valid = isKafkaPublishTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_DO_WHILE:
                    valid = isDoWhileTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_SUB_WORKFLOW:
                    valid = isSubWorkflowTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_JSON_JQ_TRANSFORM:
                    valid = isJSONJQTransformTaskValid(workflowTask, context);
                    break;
                case TaskType.TASK_TYPE_WAIT:
                    valid = isWaitTaskValid(workflowTask, context);
                    break;
            }

            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