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


 Zahid Ahmed
 Senior Software Engineer | Emirates Group IT
 P.O. Box 686 | Dubai, United Arab Emirates
 T +971 4 203 3912 | M +971 55 1249171

[http://cdn.ek.aero/email/e_signatures/ekg2013.jpg]




<<inline: image001.jpg>>

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to