you are close ;)<br><br>Yes, it is a challenge, thats what the examples are for etc.<br><br>but try this (FYI I think you mean &quot;or&quot;):<br><br><p style=""><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
rule</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"> </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;UCCnet_DVE_Depth_All&quot;</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
when</span></font></b><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catalogObject : CatalogObject(&nbsp;</span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">)</span></font></p><p style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval( <font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">
catalogObject.</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">getElementValue(</span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;depth&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">) == </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
null</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"> || </span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">
catalogObject.</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">getElementValue(</span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;depth&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">) == </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;&quot; )</span></font><br><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"></span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>


<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String depth =
CatalogObject.getElementValue(&quot;depth&quot;)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; depth == null</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font>
</p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; depth == &quot;&quot;</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span>
</font></p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catalogObject : CatalogObject( depth == null)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catalogObject : CatalogObject( depth == &quot;&quot;)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
then</span></font></b><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; # DON&#39;T do this &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logWriter : LogWriter();</span></font></p><p style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # BUT you can pass in a logWriter global variable
<br><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"></span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logWriter.logDebug(</span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;Package Depth is Blank&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">);</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println( </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;Package Depth is Blank&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"> ); </span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">end</span></font></b><br><br><br>Hope that helps.<br>In the up coming BRMS, there will be a GUI which also has a secret purpose of &quot;coaching&quot; what DRL looks like, for those who need to know.
<br><br><div><span class="gmail_quote">On 4/4/07, <b class="gmail_sendername"><a href="mailto:John.Tal@gxs.com">John.Tal@gxs.com</a></b> &lt;<a href="mailto:John.Tal@gxs.com">John.Tal@gxs.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Writing DRL is not easy for people new to drools. &nbsp;&nbsp;Can
someone please help me understand how to write this simple rule? &nbsp;You can see
the approaches I have taken.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">In this case I do not have getters and setters for the
attributes I am checking. &nbsp;I need to pass parameters to the object for it to
get the data.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I can't get any of the code in the when block to be
syntax proper. &nbsp;Existing DRL doc is lacking in this area.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks&nbsp; John</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p style=""><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">rule</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">
 </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">&quot;UCCnet_DVE_Depth_All&quot;</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span>
</font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
when</span></font></b><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catalogObject : CatalogObject( getElementValue(</span></font><font color="green" face="Courier New" size="2">
<span style="font-size: 10pt; color: green;">&quot;depth&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">) == </span></font><b><font color="#960000" face="Courier New" size="2">
<span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">null</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">, getElementValue(</span></font><font color="green" face="Courier New" size="2">
<span style="font-size: 10pt; color: green;">&quot;depth&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">) == </span></font><font color="green" face="Courier New" size="2">
<span style="font-size: 10pt; color: green;">&quot;&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String depth =
CatalogObject.getElementValue(&quot;depth&quot;)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; depth == null</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font>
</p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; depth == &quot;&quot;</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"></span>
</font></p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catalogObject : CatalogObject( depth == null)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; color: olive;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catalogObject : CatalogObject( depth == &quot;&quot;)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">
then</span></font></b><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logWriter : LogWriter();</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logWriter.logDebug(</span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;Package Depth is Blank&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">);</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println( </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green;">
&quot;Package Depth is Blank&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"> ); </span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">
</span></font></p>

<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(150, 0, 0); font-weight: bold;">end</span></font></b><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">
</span></font></p>

</div>

</div>


<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div><br>