<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Edson<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for your reply. I guess we’ll try
and code in a work around for now. It would be great to have this feature
though! :-)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I’ve created a feature request in Jira. <a
href="http://jira.jboss.com/jira/browse/JBRULES-1199">http://jira.jboss..com/jira/browse/JBRULES-1199</a><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regards,</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>_____________________________________________________<br>
<br>
Arsalan Zaidi / <strong><b><font face=Arial><span style='font-family:Arial'>Capgemini
- <st1:country-region w:st="on"><st1:place w:st="on">India</st1:place></st1:country-region></span></font></b></strong>
<strong><b><font face=Arial><span style='font-family:Arial'>(FS SBU) /</span></font></b></strong>
Mumbai<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-GB
style='font-size:8.0pt;font-family:Arial;color:navy'>Technical Architect<br>
Mobile Phone: +91 – 9892 8970 03 / </span></font><font size=1 color="#333399"
face=Arial><span lang=EN-GB style='font-size:8.0pt;font-family:Arial;
color:#333399'><a href="http://www.capgemini.com/"
title="http://www.capgemini.com/"><font color="#333399"><span style='color:
#333399'>www.capgemini.com</span></font></a></span></font><font size=1
color=navy face=Arial><span lang=EN-GB style='font-size:8.0pt;font-family:Arial;
color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><br>
</span></font><strong><b><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Together: the
Collaborative Business Experience</span></font></b></strong><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><br>
_____________________________________________________</span></font><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> 14 September 2007 18:42<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Rules
 Users List</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-users] How to
use not operator in drool.</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
    Arsalan,<br>
<br>
    Unfortunately Drools does not have a field constraint
negation operator, mostly because when writing rules, it was not needed, since
you can always negate the constraint itself. <br>
    Although, I understand a agree with your use case. My
suggestion is for you to open a JIRA feature request and we will include that
as soon as possible in the product. <br>
    Although, meanwhile, the only workaround I can see for your
case is to translate the expression you are using directly into a java or mvel
expression and write it inside an in-line eval.<br>
<br>
    []s<br>
    Edson <o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>2007/9/14, Arsalan S. Zaidi <<a
href="mailto:arsalan.zaidi@capgemini.com">arsalan.zaidi@capgemini.com</a>>:</span></font></span><o:p></o:p></p>
<div link=blue vlink=blue>
<div>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Hi </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>I'll try to explain the situation that Gaurav finds himself
in. We're working on this problem together and so far, we haven't been able to
crack it.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>We're using drools to handle the business rules for an
application. The rules however, are not provided to us in a .drl file, rather,
we get an XLS sheet from the analysts with rules in a different grammar.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>We're using ANTLR to read and parse these rules to generate
the drools rules programmatically. However, we're running into problems with
NOT.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>The input rules (in the non-drools business language) have a
NOT operator which works like '!' in Java. It flips the Boolean around, so to
speak. So:</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>NOT((some sub expression which evaluates to TRUE)) == FALSE</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>MVEL doesn't seem to support this. So how do we simulate it?</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>If it were only being used with NOT IN, we could manage, but
its use is completely arbitrary. Changes to the input rules or to the input
rules grammar have been (ha ha) ruled out.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Any help would be appreciated.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<div>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Regards,</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>_____________________________________________________<br>
<br>
Arsalan Zaidi / <strong><b><font face=Arial><span style='font-family:Arial'>Capgemini
- <st1:country-region w:st="on"><st1:place w:st="on">India</st1:place></st1:country-region></span></font></b></strong>
<strong><b><font face=Arial><span style='font-family:Arial'>(FS SBU) /</span></font></b></strong>
Mumbai</span></font><o:p></o:p></p>
<p><font size=1 color=navy face=Arial><span lang=EN-GB style='font-size:8.0pt;
font-family:Arial;color:navy'>Technical Architect<br>
Mobile Phone: +91 – 9892 8970 03 / </span></font><font size=1 color="#333399"
face=Arial><span lang=EN-GB style='font-size:8.0pt;font-family:Arial;
color:#333399'><a href="http://www.capgemini.com/" target="_blank"
title="http://www.capgemini.com/"><font color="#333399"><span style='color:
#333399'>www.capgemini.com</span></font></a></span></font><font size=1
color=navy face=Arial><span lang=EN-GB style='font-size:8.0pt;font-family:Arial;
color:navy'> </span></font><o:p></o:p></p>
<p><font size=3 color=navy face="Times New Roman"><span style='font-size:12.0pt;
color:navy'><br>
</span></font><strong><b><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Together: the Collaborative
Business Experience</span></font></b></strong><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'><br>
_____________________________________________________</span></font><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Anstis, Michael (M.)<br>
<b><span style='font-weight:bold'>Sent:</span></b> 13 September 2007 13:31<br>
<span class=q><b><span style='font-weight:bold'>To:</span></b> <st1:PersonName
w:st="on">Rules Users List</st1:PersonName></span><br>
<span class=q><b><span style='font-weight:bold'>Subject:</span></b> RE:
[rules-users] How to use not operator in drool.</span></span></font><o:p></o:p></p>
</div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>What dialect do your rules use?</span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>You could also simplify the logic using DeMorgans
Theorem (which might be troublesome to accomplish programmatically)</span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>I don't know whether your example is flawed as the brackets
don't match, but assuming you mean something like this:-</span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 color=black face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:black'>(NOT (G13.1 IN
("1","2","3") OR (G250.8 = Y)))</span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>You can re-write this as</span></font><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=black face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:black'>(G13.1NOT IN
("1","2","3") AND G250.8 != Y)</span></font><o:p></o:p></p>
<div><span id="q_11502f21246e5bca_5">
<p><font size=3 color=navy face="Times New Roman"><span style='font-size:12.0pt;
color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>With kind regards,</span></font><o:p></o:p></p>
<p><font size=3 color=navy face="Times New Roman"><span style='font-size:12.0pt;
color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:blue'>Mike</span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<blockquote style='margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>JOSHI, GAURAV<br>
<b><span style='font-weight:bold'>Sent:</span></b> 13 September 2007 08:20<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Rules
 Users List</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [rules-users] How to
use not operator in drool.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Thank's for your sugession of using "not in"
instead of "not" but my problem is that "not" can also come
without "in".</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Actually I am making a generator of rule file from expression
like</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> (</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>(NOT (ENDS WITH (G10.2,
",")))</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> <font
color=black><span style='color:black'>((NOT (G13.1 IN
("1","2","3"))) OR (G250.8 = Y))</span></font><font
color=navy><span style='color:navy'>)</span></font></span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Where G13.2, G250.8, G10.2 are variables coming from a map
inserted in working memory.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>I am accessing these variables from map.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>My rules are as follows</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>This rule is working fine.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>rule "Editable_G10.3"</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>when</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><b><font size=2 color=navy face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:navy;font-weight:bold'> ((Map(
this["G10.3"] !=8))||(Map( this["G10.2"] ==19)))</span></font></b><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>then</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>System.out.println("comming
here----------------------------------------------------->");</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>End</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><b><font size=2 color=navy face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:navy;font-weight:bold'>This is not working</span></font></b><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>rule "Mandatory_G10.3"</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>when</span></font><o:p></o:p></p>
<p><b><font size=2 color=navy face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:navy;font-weight:bold'> (not((Map(
this["G10.3"] !=8))||(Map( this["G10.2"] ==19)))) </span></font></b><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Then</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>System.out.println("comming
here----------------------------------------------------->");</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>End</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>In also
tried following approaches:<o:p></o:p></span></font></p>
<p style='margin-left:.5in;text-indent:-.25in'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>1)</span></font><font
size=1><span style='font-size:7.0pt'>      </span></font><b><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy;font-weight:bold'>eval(not((Map( this["G10.3"]
!=8))||(Map( this["G10.2"] ==19)))) </span></font></b><o:p></o:p></p>
<p><b><font size=2 color=navy face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:navy;font-weight:bold'> </span></font></b><o:p></o:p></p>
<p style='text-indent:.25in'><b><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy;font-weight:bold'>2)
eval(!((Map( this["G10.3"] !=8))||(Map( this["G10.2"]
==19)))) </span></font></b><o:p></o:p></p>
<p style='margin-left:.25in'><b><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy;font-weight:bold'> </span></font></b><o:p></o:p></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>But in
both cases it is giving same error:<o:p></o:p></span></font></p>
<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>org.drools.rule.InvalidRulePackage: Rule
Compilation error : [Rule name=ValidationRuleExp_G10.3, agendaGroup=MAIN,
salience=0, no-loop=false]</span></font><o:p></o:p></p>
<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>     
com/telekurs/nva/mde/fe/ak/validation/Rule_ValidationRuleExp_G10_3_0.java
(11:495) : Cannot use this in a static context </span></font><o:p></o:p></p>
<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>     
com/telekurs/nva/mde/fe/ak/validation/Rule_ValidationRuleExp_G10_3_0.java
(11:500) : Type mismatch: cannot convert from String to int</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>I am trying to find out some general concept so that I can
change just achieve the functionality of not.</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Thanks</span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Gaurav </span></font><o:p></o:p></p>
<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'> </span></font><o:p></o:p></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, September 12,
2007 10:20 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Rules
 Users List</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-users] How to
use not operator in drool.</span></font><o:p></o:p></p>
</div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
   Remove your "eval" and use "or" instead of
"||" for the OR CE.<br>
<br>
   Although, I feel that this is not what you want... what you want
is simply:<br>
<br>
when<br>
    Map( this['city'] not in ( "mumbai", "<st1:City
w:st="on"><st1:place w:st="on">delhi</st1:place></st1:City>" ) ) <br>
then<br>
    //...<br>
end<br>
 <br>
    []s<br>
    Edson<o:p></o:p></span></font></p>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>2007/9/12,
Gaurav2007 <<a href="mailto:gaurav.a.joshi@capgemini.com" target="_blank">
gaurav.a.joshi@capgemini.com</a>>:<o:p></o:p></span></font></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
Hi ALL,<br>
<br>
I am using drool4.0.1 in my application i am able to use IN,OR,AND operator<br>
but i am facing problem in using not operator.<br>
<br>
my requirement of not operator is just like a not gate.<br>
<br>
the way i am using it is : <br>
<br>
eval(not((Map( this["city"] !="mumbai"))||(Map(
this["city"] =="<st1:City w:st="on"><st1:place w:st="on">delhi</st1:place></st1:City>"))))<br>
<br>
<br>
so can you please help me out to solve this problem:<br>
should i use not operator or some thing else in drool. <br>
<br>
Thanks,<br>
<br>
<br>
--<br>
View this message in context: <a
href="http://www.nabble.com/How-to-use-not-operator-in-drool.-tf4430240....html#a12638430"
target="_blank">http://www.nabble.com/How-to-use-not-operator-in-drool.-tf4430240.html#a12638430
</a><br>
Sent from the drools - user mailing list archive at <a href="http://Nabble.com"
target="_blank">Nabble.com</a>.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></span></font></p>
</div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
<br clear=all>
<br>
-- <br>
  Edson Tirelli <br>
  Software Engineer - JBoss Rules Core Developer<br>
  Office: +55 11 3529-6000<br>
  <st1:City w:st="on"><st1:place w:st="on">Mobile</st1:place></st1:City>:
+55 11 9287-5646<br>
  JBoss, a division of Red Hat @ <a href="http://www.jboss.com"
target="_blank">www.jboss.com</a> <o:p></o:p></span></font></p>
<table class=MsoNormalTable border=0 cellpadding=0>
 <tr>
  <td bgcolor=white style='background:white;padding:0in 0in 0in 0in;-moz-background-clip: -moz-initial;
  -moz-background-origin: -moz-initial;-moz-background-inline-policy: -moz-initial;
  background-attachment:scroll;background-position-x:0%;background-position-y:
  50%'>
  <p style='margin-bottom:12.0pt'><font size=3 color=black
  face="Times New Roman"><span style='font-size:12.0pt;color:black'>This
  message contains information that may be privileged or confidential and is
  the property of the Capgemini Group. It is intended only for the person to
  whom it is addressed. If you are not the intended recipient, you are not
  authorized to read, print, retain, copy, disseminate, distribute, or use this
  message or any part thereof. If you receive this message in error, please
  notify the sender immediately and delete all copies of this message.</span></font><o:p></o:p></p>
  </td>
 </tr>
</table>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</blockquote>
</div>
</div>
</div>
</span>
<div><span id="q_11502f21246e5bca_7">
<table class=MsoNormalTable border=0 cellpadding=0>
 <tr>
  <td bgcolor=white style='background:white;padding:.75pt .75pt ..75pt .75pt'>
  <p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 color=black
  face="Times New Roman"><span style='font-size:12.0pt;color:black'>This
  message contains information that may be privileged or confidential and is
  the property of the Capgemini Group. It is intended only for the person to
  whom it is addressed. If you are not the intended recipient, you are not
  authorized to read, print, retain, copy, disseminate, distribute, or use this
  message or any part thereof. If you receive this message in error, please
  notify the sender immediately and delete all copies of this message. </span></font><o:p></o:p></p>
  </td>
 </tr>
</table>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'></span><br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users
</a><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
  Edson Tirelli<br>
  Software Engineer - JBoss Rules Core Developer<br>
  Office: +55 11 3529-6000<br>
  <st1:City w:st="on"><st1:place w:st="on">Mobile</st1:place></st1:City>:
+55 11 9287-5646<br>
  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>
<o:p></o:p></span></font></p>
</div>
</body>
</html>
<table><tr><td bgcolor=#ffffff><font color=#000000>This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.<br>
<br>
</font></td></tr></table>