use of org.activiti.validation.validator.Validator in project Activiti by Activiti.
the class ProcessValidatorImpl method validate.
@Override
public List<ValidationError> validate(BpmnModel bpmnModel) {
List<ValidationError> allErrors = new ArrayList<ValidationError>();
for (ValidatorSet validatorSet : validatorSets) {
for (Validator validator : validatorSet.getValidators()) {
List<ValidationError> validatorErrors = new ArrayList<ValidationError>();
validator.validate(bpmnModel, validatorErrors);
if (!validatorErrors.isEmpty()) {
for (ValidationError error : validatorErrors) {
error.setValidatorSetName(validatorSet.getName());
}
allErrors.addAll(validatorErrors);
}
}
}
return allErrors;
}
Aggregations