Skip to Content

Error in calling action strategy

Hi Expert,

in custom promotion Strategies are not getting called.

     <property name="key" value="defaultRuleProductPriceQuantityRAOAction" />
     <property name="value" ref="defaultpriceQuantityActionStrategy" />
 </bean>

getting below error

suggest way to handle this

Stack Trace : ERROR [hybrisHTTP38] [DefaultCommerceRuleEngineService] Possible rule-loop detected. Maximum allowed rule matches has been exceeded. Current Limit:10 11:986d721a-ce92-41bf-81c8-ad9c9d82dab6 You can adjust or disable the limit for rule matches by changing the ruleFiringLimit field in the 'Drools Engine Context' object (see the 'Rule Firing Limit' attribute).

ERROR [hybrisHTTP38] [DefaultPromotionEngineService] Possible rule-loop detected. Maximum allowed rule matches has been exceeded. Current Limit:10 11:986d721a-ce92-41bf-81c8-ad9c9d82dab6 You can adjust or disable the limit for rule matches by changing the ruleFiringLimit field in the 'Drools Engine Context' object (see the 'Rule Firing Limit' attribute).

de.hybris.platform.ruleengine.exception.DroolsRuleLoopException: Possible rule-loop detected. Maximum allowed rule matches has been exceeded. Current Limit:10 11:986d721a-ce92-41bf-81c8-ad9c9d82dab6 You can adjust or disable the limit for rule matches by changing the ruleFiringLimit field in the 'Drools Engine Context' object (see the 'Rule Firing Limit' attribute).

     at de.hybris.platform.ruleengine.impl.RuleMatchCountListener.afterMatchFired(RuleMatchCountListener.java:44) ~[ruleengineserver.jar:?]
     at org.drools.core.event.AgendaEventSupport.fireAfterActivationFired(AgendaEventSupport.java:98) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
     at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1114) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
     at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
     at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74) ~[drools-core-6.3.0.Final.jar:6.3.0.Final]
     at org.drools.core.common.Default
Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 14, 2017 at 05:45 PM

    The error you are getting is a safety mechanism provided by the hybris ruleengine to prevent endless loops which can happen quite easily in drools (and cannot be prevented or predicted by just analyzing the rules). It must have been modified to "10" as the default value (in the impex files provided out of the box) is usually 200.

    This just means that as soon as more than 10 rules have fired during the course of one rule evaluation (e.g. an evaluation of a cart for applicable promotions), the rule engine will abort assuming that there is an endless loop. So if your use case allows for more than 10 rules to be fired, you should increase the ruleFiringLimit to a higher value (it is defined on the DroolsRuleContext.ruleFiringLimit property).

    If you continue getting this error, there is a good chance that one (or more) of your drools rules keep triggering itself (or each other) endlessly. In the simple case it could just be one rule that keeps on triggering itself again. In a more complex scenario it could be e.g. that the action of rule1 triggers rule2, rule2 action triggers rule3, rule3 action triggers rule1 again which will then trigger rule 2 again etc.

    Do you have many rules in your system?

    Are they manually written drools rules or are you using the rule builder?

    Could you provide the drl content (the drools code) here to help analyze what is going on? You should find the drl in the backoffice under Rule Engine -> Drools Rules in the Rule Content field.

    Hope this helps,

    Sebastian

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 04, 2017 at 03:31 AM

    HI ,

    Thanks for your reply. We have few Drools Rule present in the system but one is not calling the other rule. We have noticed that the moment, we make any changes in the promotion Rule and publish it, the rule stops working on storefront. The Drool content has a heading which says the rule needs deployment after changes. What does it mean? How do we deploy the changes on the fly? If we restart the server, the promotions starts working. Any pointers would be highly appreciated. Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 02, 2019 at 10:55 AM

    We are facing the same issue. Please let us know a resolution

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 05, 2019 at 12:37 PM

    Met such error message: "[DefaultCommerceRuleEngineService] Possible rule-loop detected. Maximum allowed rule matches has been exceeded." after Hybris upgrade from version 6.7 -> 18.08.

    As a solution in this case - all currently active rules must be recompiled (i.e. publish all Published rules).

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.