sergehuber commented on a change in pull request #264:
URL: https://github.com/apache/unomi/pull/264#discussion_r595965634



##########
File path: 
services/src/main/java/org/apache/unomi/services/impl/rules/RulesServiceImpl.java
##########
@@ -142,13 +142,8 @@ private void loadPredefinedRules(BundleContext 
bundleContext) {
 
             try {
                 Rule rule = 
CustomObjectMapper.getObjectMapper().readValue(predefinedRuleURL, Rule.class);
-                // Register only if rule does not exist yet
-                if (getRule(rule.getMetadata().getId()) == null) {
-                    setRule(rule);
-                    logger.info("Predefined rule with id {} registered", 
rule.getMetadata().getId());
-                } else {
-                    logger.info("The predefined rule with id {} is already 
registered, this rule will be skipped", rule.getMetadata().getId());
-                }
+                setRule(rule);

Review comment:
       I think we should have a consistent behavior for all deployed objects 
(conditions, actions, value types, etc...). 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to