Ya correct both are facts, I am checking the values in both facts.
One more question think that I am having StringBuffer Object in working Memory so I will refer the object by $buffer = StringBuffer() but I want to create the new
StringBuffer Object in .drl file so how I can achieve this?
rule "3"
salience 8
no-loop true
when
$a: AntiPassDetails()
$n: SoftAntiDTO(count)
$conf: AntiConfigDTO()
$mail: SoftAntiMailDTO();
eval($a.getBlock().intValue() <($n.getCount().intValue()/($conf.getBlockEmailCnt().intValue())))
then
System.out.println(" *******BLock Reminder Start ********");
System.out.println(obj.getCardNo());
System.out.println(obj.getTidDesc());
System.out.println(obj.getFac());
System.out.println(obj.getEmailId());
System.out.println(" ******* Block Reminder End *********");
end
rule "2"
salience 9
no-loop true
when
$a: AntiPassDetails()
$n: SoftAntiDTO()
$conf: AntiConfigDTO()
$mail: SoftAntiMailDTO()
eval(($a.getSupervisorRem().intValue()) < (($n.getCount().intValue())/($conf.getSupervisorCnt().intValue())))
then
System.out.println(" ******* Supervisor Reminder Start *******");
System.out.println($mail.getCardNo());
System.out.println($mail.getTidDesc());
System.out.println($mail.getFac());
System.out.println($mail.getEmailId());
System.out.println(" ********Supervisor Reminder End ******** ");
end
rule "1"
salience 10
no-loop true
when
$a: AntiPassDetails()
$n: SoftAntiDTO()
$conf: AntiConfigDTO()
$mail: SoftAntiMailDTO();
eval($a.getLastRem().intValue() <($n.getCount().intValue()/($conf.getLastRemainderCnt().intValue())))
then
System.out.println(" ********* Last Reminder Start*********");
System.out.println($mail.getCardNo());
System.out.println($mail.getTidDesc());
System.out.println($mail.getFac());
System.out.println($mail.getEmailId());
System.out.println("Super = "+$a.getSupervisorRem().intValue());
System.out.println("check Cpunt = "+$n.getCount().intValue()/($conf.getSupervisorCnt().intValue()));
System.out.println("Rec Count = "+$n.getCount());
System.out.println("Conf Count ="+$conf.getSupervisorCnt());
System.out.println(" *********** Last Reminder End *********");
end
-----Original Message-----
From:
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Michael Neale
Sent: Tuesday, March 06, 2007 5:19
AM
To: Rules Users List
Subject: Re: [rules-users] Help
Needed in eval
I assume $a and $n are bound to some facts in the rule? paste your rule here.
On 3/5/07, shilpa.raghavendra@wipro.com <shilpa.raghavendra@wipro.com> wrote:
Hi,
My eval condition as follows
eval(($a.getSupervisorRem().intValue()) < (($n.getCount().intValue())/($conf.getSupervisorCnt().intValue())))
(($a.getSupervisorRem().intValue()) = 0
(($n.getCount().intValue())/($conf.getSupervisorCnt().intValue())) = 2
0 < 2 , So condition is satisfied, It has to execute the rule but it's not happening please help me in this.
Regards
Shilpa
|
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users