<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 10"><meta name="Originator" content="Microsoft Word 10"><link rel="File-List" href="file:///C:%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";
        mso-ansi-language:EN-US;
        mso-fareast-language:EN-US;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->

<p class="MsoNormal"><span lang="EN-US">Hi W<br>
<br>
I know about case sensitivity issue. How can I combine both Order and Item in
one condition. I tried all possibilities but getting syntax error.<br>
<br>
For example: <br></span></p><p class="MsoNormal"><span lang="EN-US">Order ($items : items, $discount : discount &gt; 10, Item(grade &gt; 3)
from $items) // gives error<br>
</span></p><p class="MsoNormal"><br><span lang="EN-US"></span></p><p class="MsoNormal"><span lang="EN-US">Can please code this condition correctly for me?</span></p><p class="MsoNormal"><span lang="EN-US"><br></span></p><p class="MsoNormal"><span lang="EN-US">
Dhari</span><span style=""><o:p></o:p></span></p>

<br><br><hr id="stopSpelling">Date: Tue, 23 Feb 2010 13:43:01 +0100<br>From: wolfgang.laun@gmail.com<br>To: rules-users@lists.jboss.org<br>Subject: Re: [rules-users] Using Collections in LHS<br><br>Discount is a field of Order and must not appear in an Item(...).<br>Probably you want:<br>&nbsp;&nbsp; Order &nbsp;( $discount : Discount &gt; 10,...<br><br>Also, most likely, all your fields need to be written with a lower case initial letter,<br>
&nbsp;&nbsp; Order &nbsp;( $discount : discount &gt; 10, $items : items)<br><br>-W<br><br><div class="ecxgmail_quote">On Tue, Feb 23, 2010 at 1:11 PM, dhari <span dir="ltr">&lt;<a href="mailto:sdhari@hotmail.com">sdhari@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="ecxgmail_quote" style="padding-left: 1ex;"><br>
In this scenario I do have typical Order and Items data structure. I want to<br>
implement various business rules where I want to check both Order attributes<br>
and Item attributes together.<br>
<br>
Order [ Date, Discount, Amount, Customer, Type, Items]<br>
Item [ Quantity, Rate, ExpiresDate, Grade ]<br>
<br>
I am trying to implements following rules but all gives me syntax error. I<br>
wondering if someone can help me in.<br>
<br>
<br>
rule “one”<br>
 &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Order &nbsp;( $discount : Discount, $items : Items)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Item ($discount &gt; 10 &amp;&amp; Grade &gt; 3) from $items<br>
 &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp;System.err.print(“Discount is not allowed with items having grade 3 or<br>
higher)<br>
end<br>
<br>
rule “two”<br>
 &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Order &nbsp;( $discount : Discount, $items : Items)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Item ($discount &nbsp;&gt; 20 || Quantity &lt; 5 ) from $items<br>
 &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp;//do some thinge<br>
end<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/Using-Collections-in-LHS-tp386923p386923.html">http://n3.nabble.com/Using-Collections-in-LHS-tp386923p386923.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>
<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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>                                               <br /><hr />Find out now <a href='http://windowslive.ninemsn.com.au/oneinbox?ocid=T162MSN05A0710G' target='_new'> Link all your email accounts and social updates with Hotmail.</a></body>
</html>