IBM Support

RS03864: LOCAL RULE VARIABLES MAY HAVE ALWAYS THE SAME VALUE IN DE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • hen using Decision Engine sequential or fastpath algorithm if 2
    local variables are initialized with the same value in the
    condition part of a rule they are seen as the same, so modifying
    the value of one variable lead to the other being modified the
    same way.
    the rule
    when {
    context:IlrContext() from ?context;
    evaluate (a : 0);
    evaluate (b : 0);
    }
    then {
    System.out.println("a = "+a);
    System.out.println("b = "+b);
    System.out.println("*************");
    b = 14 - a;
    System.out.println("a = "+a);
    System.out.println("b = "+b);
    }
    
    prints
    
    a = 0
    b = 0
    *************
    a = 14
    b = 14
    
    where you would expect
    a=0
    b=14
    

Local fix

  • initialize variables with different expression to prevent their
    unification, for example to resolve the problem in the sample
    given use:
    evaluate(a: 1-1);
    evaluate(b:2-2);
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Using Decision Engine sequential or fastpath algorithm with  *
    * initialization of local variables.                           *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * When using Decision Engine sequential or fastpath algorithm  *
    * if 2                                                         *
    * local variables are initialized with the same value in the   *
    * condition part of a rule they are seen as the same, so       *
    * modifying                                                    *
    * the value of one variable lead to the other being modified   *
    * the                                                          *
    * same way.                                                    *
    * the rule                                                     *
    * when {                                                       *
    * context:IlrContext() from ?context;                          *
    * evaluate (a : 0);                                            *
    * evaluate (b : 0);                                            *
    * }                                                            *
    * then {                                                       *
    * System.out.println("a = "+a);                                *
    * System.out.println("b = "+b);                                *
    * System.out.println("*************");                         *
    * b = 14 - a;                                                  *
    * System.out.println("a = "+a);                                *
    * System.out.println("b = "+b);                                *
    * }                                                            *
    *                                                              *
    * prints                                                       *
    *                                                              *
    * a = 0                                                        *
    * b = 0                                                        *
    * *************                                                *
    * a = 14                                                       *
    * b = 14                                                       *
    *                                                              *
    * where you would expect                                       *
    * a=0                                                          *
    * b=14                                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • The code is fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS03864

  • Reported component name

    WDS FOR RULES

  • Reported component ID

    5725B6903

  • Reported release

    892

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-10-25

  • Closed date

    2021-12-13

  • Last modified date

    2021-12-13

  • 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

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

Document Information

Modified date:
02 June 2022