IBM Support

RS03247: NPE EXCEPTION RAISED IN RULE CONDITION WHEN AN UPDATE IS PERFORMED BY THE RETE ENGINE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following exception is raised during an instance  update
    instruction of a rule body
    
    Caused by : java.lang.NullPointerException
    
    in the conditions of rule 'xyz_rule_name', at offset 234,
    length 90
    
    Caused by : java.lang.NullPointerException
    
       at
    com.ibm.rules.generated.ruleflow.tarification.prev_prado.RF_010_
    PREV_PRADO$003etc.CondExecEnv.test31(Unknown Source)
       at
    com.ibm.rules.generated.ruleflow.tarification.prev_prado.RF_010_
    PREV_PRADO$003etc.CondExecEnv.$sMethod$5(Unknown Source)
       at
    com.ibm.rules.generated.ruleflow.tarification.prev_prado.RF_010_
    PREV_PRADO$003etc.CondExecEnv.evaluateBooleanMethodHook(Unknown
    Source)
       at
    com.ibm.rules.engine.rete.runtime.state.AbstractConditionExecEnv
    .evaluateBooleanMethod(AbstractConditionExecEnv.java:63)
       at
    com.ibm.rules.engine.rete.runtime.network.impl.IlrAbstractGenera
    torJoinNode.evaluateDiscTest(IlrAbstractGeneratorJoinNode.java:4
    32)
       at
    com.ibm.rules.engine.rete.runtime.network.impl.IlrAbstractGenera
    torJoinNode.updateGeneratorElement(IlrAbstractGeneratorJoinNode.
    java:310)
       at
    com.ibm.rules.engine.rete.runtime.network.impl.IlrStandardWorkin
    gMemoryNode.updateGeneratorsElement(IlrStandardWorkingMemoryNode
    .java:78)
       at
    com.ibm.rules.engine.rete.runtime.network.impl.IlrStandardWorkin
    gMemoryNode.update(IlrStandardWorkingMemoryNode.java:69)
       at
    com.ibm.rules.engine.rete.runtime.AbstractReteEngine.updateInter
    nal(AbstractReteEngine.java:377)
    
    The issue is reproduced by the following reduced ruleset:
    
    rule ´p2.a3´ {
      ilog.rules.business_name = "a3"
      ilog.rules.dt = ""
      ilog.rules.package_name = "p2"
      status = "new"
      when {
        xom.A() from $EngineData.this.A;
        variable1 : xom.B(this.name != null) in
    $EngineData.this.A.listOfB;
        variable2 : xom.C(this.name.contains("a")) in
    variable1.listOfC;
        evaluate ( variable2.value >= 5);
      }
      then {
    
    ilog.rules.brl.System.printMessage((com.ibm.rules.engine.ruledef
    .runtime.RuleInstance.this.getRuleName() + "> ") +
    variable2.name);
      }
    }
    
    rule ´p2.a4´ {
      ilog.rules.business_name = "a4"
      ilog.rules.dt = ""
      ilog.rules.package_name = "p2"
      status = "new"
      when {
        xom.A() from $EngineData.this.A;
        ´the b´ : xom.B() in $EngineData.this.A.listOfB;
        ´the c´ : xom.C() in ´the b´.listOfC;
        evaluate ( ! xom.Utils.´exists´(´the b´.name));
      }
      then {
        ´the c´.value = 0;
    
    ilog.rules.brl.System.printMessage((com.ibm.rules.engine.ruledef
    .runtime.RuleInstance.this.getRuleName() + "> ") + ´the
    c´.name);
        update (´the c´);
      }
    }
    
    The graph of instance that leads to the NPE is set to:
    a: A (  listOfB: [b] )
    b: B ( name: null, listOfC: [c] )
    c: C ( name: null )
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users using RETE algorithm                                   *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The propagation of the update instruction inside the RETE    *
    * network was incorrect.                                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • The code was fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS03247

  • Reported component name

    WDS FOR RULES

  • Reported component ID

    5725B6903

  • Reported release

    891

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-11-30

  • Closed date

    2018-11-30

  • Last modified date

    2018-11-30

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WDS FOR RULES

  • Fixed component ID

    5725B6903

Applicable component levels

  • R891 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSQP76","label":"IBM Decision Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"891","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022