[rules-users] Help Needed in eval

shilpa.raghavendra at wipro.com shilpa.raghavendra at wipro.com
Mon Mar 5 22:48:34 EST 2007


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 at lists.jboss.org
[mailto:rules-users-bounces at 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 at wipro.com <shilpa.raghavendra at 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 



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com


_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org 
https://lists.jboss.org/mailman/listinfo/rules-users

 




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070306/3914aeb4/attachment.html 


More information about the rules-users mailing list