<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: blue; TEXT-DECORATION: underline
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"
}
SPAN.EmailStyle19 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=blue link=blue>
<DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT face=Arial 
color=#0000ff size=2>Or what about having a rule that creates the 
substring?</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>Class&nbsp;SupplierCode 
  {</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; private String 
  code;</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT face=Arial 
  color=#0000ff size=2>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; 
  private&nbsp;SupplierView parent;</FONT></SPAN></DIV></FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; public 
  SubString(SupplierView parent, String code) {</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New"><FONT size=2>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New"><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <FONT color=#0000ff>this.code = 
  code;</FONT></FONT></FONT></SPAN></DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <FONT color=#0000ff>this.parent = parent;</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; 
  }</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; public String 
  getCode() {</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
  this.code;</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; 
  }</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; 
  public&nbsp;SupplierView getParent() {</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
  this.parent;</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; 
  }</FONT></SPAN></DIV></FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>}</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>rule 
"suppliercode"</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>when</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; $sv : SupplierView( 
  $sc : suppCode )</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>then</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; insert(new 
  SupplierCode($sv, $sc.substring(4, 6)));</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>end</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>rule "main"</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>when</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; $sv : 
  SupplierView(corporate == true)</FONT></SPAN></DIV>
  <DIV><SPAN class=856470208-13072007></SPAN><FONT color=#0000ff><FONT 
  face="Courier New" size=2>
  <DIV dir=ltr align=left><SPAN class=856470208-13072007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; $sc : 
  SupplierCode(&nbsp;code in ('25, '30'), parent == 
  $cs&nbsp;)</FONT></SPAN></DIV>then</FONT></FONT></DIV>
  <DIV><FONT face="Courier New"><FONT color=#0000ff><FONT size=2><SPAN 
  class=856470208-13072007>&nbsp;&nbsp;&nbsp; 
  </SPAN>ValidationErrorFacade.getInstance().registerError($cs, new 
  ValidationError("Headquarter Supplier Code should end on 25 or 
  30."));</FONT></FONT></FONT></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2><SPAN 
  class=856470208-13072007>end</SPAN></FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=856470208-13072007>This 
way you are also making the business rule as to what supplier codes to accept a 
Drools rule (and no use of eval!)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=856470208-13072007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=856470208-13072007>(Sorry, a boring day at work and I felt an urge to 
contribute!)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=856470208-13072007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=856470208-13072007>Mike</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
  [mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Manukyan, 
  Sergey<BR><B>Sent:</B> 12 July 2007 21:40<BR><B>To:</B> Rules Users 
  List<BR><B>Subject:</B> RE: [rules-users] how to create local 
  variable<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thank you 
  Edson,</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I liked the solution 
  with matches, it is much cleaner&#8230;. </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">-Sergey</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <DIV>
  <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
  face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
  <HR tabIndex=-1 align=center width="100%" SIZE=2>
  </SPAN></FONT></DIV>
  <P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
  face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; 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> Thursday, July 12, 2007 4:19 
  PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Rules Users 
  List<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: 
  [rules-users] how to create local variable</SPAN></FONT></P></DIV>
  <P class=MsoNormal><FONT face=Arial color=#0000ff size=2><SPAN 
  style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"><FONT face=Arial color=#0000ff 
  size=2></FONT><BR>&nbsp;&nbsp;&nbsp; It is not possible to assign the result 
  of an arbitrary method call to a variable right now. So, your best option is 
  probably to do (please note the use of inline-eval):</SPAN></FONT></P>
  <P><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">rule</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> 
  </SPAN></FONT><FONT face="Courier New" color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"SupplierView: 
  Headquarter Supplier Code should end on 25 or 30."</SPAN></FONT></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">when</SPAN></FONT></B></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $cs : SupplierView(corporate == </SPAN></FONT><B><FONT face="Courier New" 
  color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">true,</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> eval( 
  suppCode.substring(4, 6).equals( </SPAN></FONT><FONT face="Courier New" 
  color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"25" 
  )</SPAN></FONT><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> || 
  suppCode.substring(4, 6).equals( </SPAN></FONT><FONT face="Courier New" 
  color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"30" ) ) 
  )</SPAN></FONT></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">then</SPAN></FONT></B></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  ValidationErrorFacade.getInstance().registerError($cs, </SPAN></FONT><B><FONT 
  face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">new</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> 
  ValidationError(</SPAN></FONT><FONT face="Courier New" color=green 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"Headquarter 
  Supplier Code should end on 25 or 30."</SPAN></FONT><FONT face="Courier New" 
  color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">));</SPAN></FONT></P>
  <P><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">end</SPAN></FONT></B></P>
  <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"><FONT face=Arial color=#0000ff 
  size=2></FONT><FONT face=Arial color=#0000ff 
  size=2></FONT><BR>&nbsp;&nbsp;&nbsp; A more clean solution is to use "matches" 
  operator. If your rule states that Supplier Code must END with 25 or 30, you 
  can do: </SPAN></FONT></P>
  <P><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">rule</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> 
  </SPAN></FONT><FONT face="Courier New" color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"SupplierView: 
  Headquarter Supplier Code should end on 25 or 30."</SPAN></FONT></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">when</SPAN></FONT></B></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $cs : SupplierView(corporate == </SPAN></FONT><B><FONT face="Courier New" 
  color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">true,</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> suppCode 
  matches </SPAN></FONT><FONT face="Courier New" color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">".*25" 
  </SPAN></FONT><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">|| matches 
  </SPAN></FONT><FONT face="Courier New" color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">".*30" 
  )</SPAN></FONT></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">then</SPAN></FONT></B></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  ValidationErrorFacade.getInstance().registerError($cs, </SPAN></FONT><B><FONT 
  face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">new</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> 
  ValidationError(</SPAN></FONT><FONT face="Courier New" color=green 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"Headquarter 
  Supplier Code should end on 25 or 30."</SPAN></FONT><FONT face="Courier New" 
  color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">));</SPAN></FONT></P>
  <P><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">end</SPAN></FONT></B></P>
  <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"><BR>&nbsp;&nbsp;&nbsp; Hope it 
  helps.<BR><BR>&nbsp;&nbsp;&nbsp; []s<BR>&nbsp;&nbsp;&nbsp; 
  Edson<BR><BR></SPAN></FONT></P>
  <DIV>
  <P class=MsoNormal><SPAN class=gmailquote><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt">2007/7/12, Manukyan, Sergey &lt; <A 
  href="mailto:SManukyan@lear.com">SManukyan@lear.com</A>&gt;:</SPAN></FONT></SPAN></P>
  <DIV vlink="blue" link="blue">
  <DIV>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Folks,</SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I 
  have a rule where I am repeating part of it twice : (</SPAN></FONT><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">$cs.getSuppCode().substring(4, 
  6)</SPAN></FONT><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">), and I would like to replace it 
  with variable&#8230; how can I do that? The solution with "in" doesn't worl because 
  it is a java code needed to perform calculations for 
  variable&#8230;..</SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Please see the rule 
  below:</SPAN></FONT></P>
  <P><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'"></SPAN></FONT></B>&nbsp;</P>
  <P><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">rule</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> 
  </SPAN></FONT><FONT face="Courier New" color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"SupplierView: 
  Headquarter Supplier Code should end on 25 or 30."</SPAN></FONT></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">when</SPAN></FONT></B></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $cs : SupplierView(corporate == </SPAN></FONT><B><FONT face="Courier New" 
  color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">true</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">)</SPAN></FONT></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">eval</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">($cs.getSuppCode().substring(4, 
  6) == </SPAN></FONT><FONT face="Courier New" color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"25"</SPAN></FONT><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> || 
  $cs.getSuppCode().substring(4, 6) == </SPAN></FONT><FONT face="Courier New" 
  color=green size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"30"</SPAN></FONT><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">) 
  </SPAN></FONT></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">then</SPAN></FONT></B></P>
  <P><FONT face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  ValidationErrorFacade.getInstance().registerError($cs, </SPAN></FONT><B><FONT 
  face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">new</SPAN></FONT></B><FONT 
  face="Courier New" color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"> 
  ValidationError(</SPAN></FONT><FONT face="Courier New" color=green 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">"Headquarter 
  Supplier Code should end on 25 or 30."</SPAN></FONT><FONT face="Courier New" 
  color=black size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">));</SPAN></FONT></P>
  <P><B><FONT face="Courier New" color=#960000 size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #960000; FONT-FAMILY: 'Courier New'">end</SPAN></FONT></B></P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks,</SPAN></FONT></P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">-Sergey</SPAN></FONT></P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P></DIV></DIV>
  <TABLE class=MsoNormalTable cellPadding=0 border=0>
    <TBODY>
    <TR>
      <TD 
      style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; BACKGROUND: white; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" 
      bgColor=white>
        <P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN 
        style="FONT-SIZE: 12pt; COLOR: black">**********************<BR>** LEGAL 
        DISCLAIMER **<BR>**********************<BR><BR>This E-mail message and 
        any attachments may contain <BR>legally privileged, confidential or 
        proprietary <BR>information. If you are not the intended 
        recipient(s),<BR>or the employee or agent responsible for delivery of 
        <BR>this message to the intended recipient(s), you are <BR>hereby 
        notified that any dissemination, distribution <BR>or copying of this 
        E-mail message is strictly <BR>prohibited. If you have received this 
        message in <BR>error, please immediately notify the sender and 
        <BR>delete this E-mail message from your 
    computer.</SPAN></FONT></P></TD></TR></TBODY></TABLE>
  <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT face="Times New Roman" 
  size=3><SPAN 
  style="FONT-SIZE: 12pt"><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></SPAN></FONT></P></DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><BR><BR clear=all><BR>-- <BR>&nbsp;&nbsp;Edson 
  Tirelli<BR>&nbsp;&nbsp;Software Engineer - JBoss Rules Core 
  Developer<BR>&nbsp;&nbsp;Office: +55 11 3529-6000<BR>&nbsp;&nbsp;Mobile: +55 
  11 9287-5646<BR>&nbsp;&nbsp;JBoss, a division of Red Hat @ <A 
  href="http://www.jboss.com">www.jboss.com</A> 
</SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>