RED-9472: seperation of system rules

working on fixing bug
This commit is contained in:
yhampe 2024-12-18 09:49:07 +01:00
parent dfae9e5d1d
commit e55c4e5fda
2 changed files with 1 additions and 3 deletions

View File

@ -63,7 +63,6 @@ public class RuleBuilderController implements RuleBuilderResource {
}
try {
var droolsValidation = droolsValidationService.testRules(new RuleValidationModel(RuleFileType.ENTITY.name(), mergingResult.getMergedRules()));
log.info("result of validation: " + droolsValidation);
droolsValidationResponse = DroolsValidationResponse.builder()
.syntaxErrorMessages(droolsValidation.getSyntaxErrorMessages()
.stream()
@ -100,7 +99,7 @@ public class RuleBuilderController implements RuleBuilderResource {
} catch (Exception e) {
throw new RulesValidationException("Could not test rules: " + e.getMessage(), e);
}
log.info("result after validation: {}", rulesUpdateRequest);
log.info("result after validation: {}", rulesUploadResponse);
return new ResponseEntity<>(rulesUploadResponse, HttpStatus.OK);
}

View File

@ -78,7 +78,6 @@ public class RuleFileBluePrint {
.map(line -> line.startsWith(GLOBAL_PREFIX) ? line : GLOBAL_PREFIX + line)
.collect(Collectors.toCollection(LinkedHashSet::new));
// Combine globals while maintaining order and format
StringBuilder globalsBuilder = new StringBuilder();
Stream.concat(existingGlobals.stream(), newGlobals.stream())
.distinct()