Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-869

Control Loop Drools Rules should not have exceptions as well as die upon an exception

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Done
    • Beijing Release, Casablanca Release
    • Casablanca Release
    • None
    • None

    Description

      During testing of VOLTE Use Case, the entry in the properties file for vfc.username was removed. This resulted in the following exception:

      [2018-05-24T17:17:39.897+00:00|ERROR|PolicySession|Session org.onap.policy-engine.drools.amsterdam:policy-amsterdam-rules:0.4.0:closedloop-amsterdam] startThread error in kieSession1.fireUntilHalt

      org.kie.api.runtime.rule.ConsequenceException: Exception executing consequence for rule "com.Config_BRMS_Param_BRMSParamVOLTE.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED" in org.onap.policy.controlloop: java.lang.IllegalArgumentException: The value of policy engine manager environment property "vfc.username" may not be null

              at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)

              at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1063)

              at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:121)

              at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)

              at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:970)

              at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1312)

              at org.drools.core.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1232)

              at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1398)

              at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:1377)

              at org.onap.policy.drools.core.PolicySession$DefaultThreadModel.run(PolicySession.java:563)

              at java.lang.Thread.run(Thread.java:748)

      Caused by: java.lang.IllegalArgumentException: The value of policy engine manager environment property "vfc.username" may not be null

              at org.onap.policy.vfc.VFCManager.getPEManagerEnvProperty(VFCManager.java:165)

              at org.onap.policy.vfc.VFCManager.<init>(VFCManager.java:57)

              at org.onap.policy.controlloop.Rule_com$u46$Config_BRMS_Param_BRMSParamVOLTE$u46$EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1759920610.defaultConsequence(Rule_com$u46$Config_BRMS_Param_BRM

      SParamVOLTE$u46$EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1759920610.java:72)

              at org.onap.policy.controlloop.Rule_com$u46$Config_BRMS_Param_BRMSParamVOLTE$u46$EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1759920610DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)

              at org.onap.policy.controlloop.Rule_com$u46$Config_BRMS_Param_BRMSParamVOLTE$u46$EVENT$u46$MANAGER$u46$OPERATION$u46$LOCKED$u46$GUARD_PERMITTED1759920610DefaultConsequenceInvoker.evaluate(Unknown Source)

              at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1052)

              ... 9 common frames omitted

       

      This in turn killed the control loop and left the control loop session in an unresolved state.

      This fix should address both capturing the exception and allowing the session to close out in at least a FINAL: FAILURE EXCEPTION being generated. And then fixing the rule to not throw the exception in the first place.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            pdragosh Pamela Dragosh
            pdragosh Pamela Dragosh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: