0 Replies Latest reply on Dec 12, 2013 2:50 AM by Zahid Ahmed Prs

    Rules Trigger Issue

    Zahid Ahmed Prs Newbie

      Hi,

       

      I am new to Rules and having following issues in different rules.

       

       

      Rule 1 :

           Issue

                I have a process definition in which I create and insert into Session a REQUEST.java object before the rule-flow node. Insert is done using script node. In rule condition section I am filtering  the same request object but my rule is not firing. My rule FIRES if I REMOVE this == $process.getVariable("piRequest").

               

               

                rule "Go to President"

                ruleflow-group "DesigSkip"

                dialect "java"

                     when

                          $process: WorkflowProcessInstance()

                          $r: Request(this == $process.getVariable("piRequest"), VD == "N", UB == "N", CC not in ( "A", "B") , DP not in (  "X", "Y", "Z") );

                     then

                          $process.setVariable("piToPres","y");

                end

       

      Rule 2 :

          I am getting error for eval statement.

       

      globa Request $r;

       

      rule "Go to President"

      ruleflow-group "DesigSkip"

      dialect "java"

          when

          $process: WorkflowProcessInstance($request:getVariable("piRequest"))

          $r : $request

          $r(eval(ADV == "N"))

       

          then

                  System.out.println("--------------------*******************--------IN GUIDED     RULE--------**********************---------------");

       

                  $process.setVariable("piToPres","y");

       

      end


      globa Request $r;

       

      rule "Go to President"

      ruleflow-group "DesigSkip"

      dialect "java"

          when

          $process: WorkflowProcessInstance($request:getVariable("piRequest"))

          $r : $request

       

          eval($r.getADV() == "N")

       

          then

                  System.out.println("--------------------*******************--------IN GUIDED     RULE--------**********************---------------");

       

                  $process.setVariable("piToPres","y");

       

      end