RED-9472: seperation of system rules
working on fixing bug
This commit is contained in:
parent
88155dc211
commit
69ae276c75
@ -63,7 +63,6 @@ public class RuleBuilderController implements RuleBuilderResource {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
var droolsValidation = droolsValidationService.testRules(new RuleValidationModel(RuleFileType.ENTITY.name(), mergingResult.getMergedRules()));
|
var droolsValidation = droolsValidationService.testRules(new RuleValidationModel(RuleFileType.ENTITY.name(), mergingResult.getMergedRules()));
|
||||||
log.info("result of validation: " + droolsValidation);
|
|
||||||
droolsValidationResponse = DroolsValidationResponse.builder()
|
droolsValidationResponse = DroolsValidationResponse.builder()
|
||||||
.syntaxErrorMessages(droolsValidation.getSyntaxErrorMessages()
|
.syntaxErrorMessages(droolsValidation.getSyntaxErrorMessages()
|
||||||
.stream()
|
.stream()
|
||||||
@ -100,7 +99,7 @@ public class RuleBuilderController implements RuleBuilderResource {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RulesValidationException("Could not test rules: " + e.getMessage(), 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);
|
return new ResponseEntity<>(rulesUploadResponse, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,6 @@ public class RuleFileBluePrint {
|
|||||||
.map(line -> line.startsWith(GLOBAL_PREFIX) ? line : GLOBAL_PREFIX + line)
|
.map(line -> line.startsWith(GLOBAL_PREFIX) ? line : GLOBAL_PREFIX + line)
|
||||||
.collect(Collectors.toCollection(LinkedHashSet::new));
|
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||||
|
|
||||||
// Combine globals while maintaining order and format
|
|
||||||
StringBuilder globalsBuilder = new StringBuilder();
|
StringBuilder globalsBuilder = new StringBuilder();
|
||||||
Stream.concat(existingGlobals.stream(), newGlobals.stream())
|
Stream.concat(existingGlobals.stream(), newGlobals.stream())
|
||||||
.distinct()
|
.distinct()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user