<br><br><div class="gmail_quote">On 27 May 2011 16:24, jstroup <span dir="ltr">&lt;<a href="mailto:jstroup@regenstrief.org">jstroup@regenstrief.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
The 5.2 docs list the following example DSL entry<br>
<br>
  [when][][Tt]here is an? {entity:\w+}=${entity!lc}: ${entity!ucfirst} ()<br>
<br></blockquote><div>Oops, there is a spurious &#39;$&#39;, the second one. It should be <br>      =${entity!lc}: {entity!ucfirst} ()<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

and say the following about what follows the equals sign<br>
<br>
&quot;The remaining part of the line after the delimiting equal sign is the<br>
replacement text for any DSLR text matching the regular expression. It may<br>
contain variable references, i.e., a variable name enclosed in braces.&quot;<br>
<br>
What does the colon following the first variable do? </blockquote><div><br>The colon in &quot;...=${entity!lc}: {entity!ucfirst} ()&quot; will remain a colon, after expansion. It&#39;s the colon after a binding variable.<br>
 <br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Also, I&#39;m used to (and actually understand) the following syntax which does<br>
not prefix { with a $.<br>
<br>
   [when]There is some {cheese} cheese available=Cheese(type==&quot;{cheese}&quot;)<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
My best guess is that the $ denotes a class name that is specified<br>
declaratively in the matching DSLR rule as opposed to a field {cheese} that<br>
is simply a replaceable parameter that matches whatever you type between<br>
&quot;some&quot; and &quot;cheese available&quot; and looks for Cheese objects of that type. <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 So,<br>
given the first DSL entry, if my rule text is<br>
<br>
  when<br>
<br>
    there is a cheese<br>
<br>
the rule will fire if a Cheese object has been inserted. And, conversely<br>
<br>
  when<br>
<br>
    There is an Cheese<br>
<br>
will also fire.<br></blockquote><div><br>Since both expand to<br><br>    $cheese: Cheese ()<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
<br>
Am I on the right track here?<br>
<br></blockquote><div><br>yes, and thanks for the Q.<br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks,<br>
<br>
Jeff<br>
<font color="#888888"><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/DSL-Entry-Question-tp2993076p2993076.html" target="_blank">http://drools.46999.n3.nabble.com/DSL-Entry-Question-tp2993076p2993076.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<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><br>
</font></blockquote></div><br>