[rules-users] Drools 5.5.0.Final : Rule Trigger Issue
Zahid Ahmed
zahid.ahmed at emirates.com
Thu Dec 12 03:36:31 EST 2013
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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131212/d66a7bd5/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 8518 bytes
Desc: image001.jpg
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131212/d66a7bd5/attachment-0001.jpg
More information about the rules-users
mailing list