if(supplier == null) {
throw new BusinessLogicException(
"Cannot find the accepted supply for the resource #"+ resource.getId() +"!");
}
AssessmentDescriptor assessmentDescriptor = new AssessmentDescriptor();
assessmentDescriptor.setAssessmentType(BasicAssessmentTypes.BUSINESS_QUALITY);
assessmentDescriptor.setComment(businessQualityComment);
assessmentDescriptor.setSupplier(supplier);
assessmentDescriptor.setResource(resource);
assessmentDescriptor.setContractId(resource.getContract().getId());
assessmentDescriptor.setValue(businessQuality);
//Perform resource auto-movement
eventsDispatcher.publishEvent(new ResourceProvided(evaluator, assessmentDescriptor));
}