[rules-users] problem with drools

Sandhya Sree sandhyachinnaraj at gmail.com
Fri Feb 28 09:11:33 EST 2014


thank you.. that really helped ..
but output appears twice.. what can i do about it?


On Fri, Feb 28, 2014 at 3:07 PM, rjr201 <rich.j.riley at gmail.com> wrote:

> You need to bind your fact to a variable, so that you can call the
> getFileOld
> method from a non static context. Also, I think you'd be better to use !=
> rather than the 'not' keyword ('not' should be read 'doesn't exist' which
> doesn't work if you want to bind a value). So your rule should be something
> like:
>
> rule "files not equal"
>
>   when
>         $file : FileData(fileOld != fileNew)
>     then
>        System.out.println("files are not equal");
>        difference($file.getFileOld(),$file.getFileNew());
>
> end
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-problem-with-drools-tp4028402p4028404.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140228/b538ad1f/attachment.html 


More information about the rules-users mailing list