<div>Hi,</div><div><br></div><div>You can do both ways:</div><div>1)&nbsp;</div><div>in DSL:</div><div>There is a Message that=msg : Message(payload : payload)</div><div>in DSLR:</div><div>There is a Message that</div><div>xpathEquals &quot;/Root/aaaa&quot; &quot;bbb&quot;</div>
<div>xpathEquals &quot;/Root/cccc&quot; &quot;dddd&quot;</div><div><br></div><div>2)&nbsp;</div><div>in DSL:</div><div>xpathEquals &quot;{path}&quot; &quot;{value}&quot;=msg : Message(payload : payload) and eval (DOMUtil.xpathEquals(payload, &quot;{path}&quot;, &quot;{value}&quot;))</div>
<div>andXpathEquals &quot;{path}&quot; &quot;{value}&quot;=eval (DOMUtil.xpathEquals(payload, &quot;{path}&quot;, &quot;{value}&quot;))</div><div>in DSLR:</div><div>xpathEquals &quot;/Root/aaaa&quot; &quot;bbb&quot;</div>
<div>andXpathEquals &quot;/Root/cccc&quot; &quot;dddd&quot;</div><br><div class="gmail_quote">On Mon, Dec 1, 2008 at 8:56 AM, Thierry B <span dir="ltr">&lt;<a href="mailto:jboss-rules@tbzone.org">jboss-rules@tbzone.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
I&#39;ve a question about drl and dsl with drools 4.0.<br>
<br>
I&#39;ve this rule :<br>
<br>
rule &quot;Contexte1&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; msg : Message(payload : payload)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eval (DOMUtil.xpathEquals(payload, &quot;/Root/aaaa&quot;, &quot;bbb&quot;))<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eval (DOMUtil.xpathEquals(payload, &quot;/Root/cccc&quot;, &quot;dddd&quot;))<br>
 &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println (&quot;Contexte 1 ************* : OK&quot;);<br>
end<br>
<br>
I use a dsl, to make it work, so now my drl is like that :<br>
<br>
rule &quot;Contexte1&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt;msg : Message(payload : payload)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xpathEquals &quot;/Root/aaaa&quot; &quot;bbb&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xpathEquals &quot;/Root/cccc&quot; &quot;dddd&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Log : &quot;Contexte 1 ************* : OK&quot;;<br>
end<br>
<br>
I was forced to make an &quot;&gt;&quot; at the line &quot;msg : Message(payload : payload)&quot;<br>
otherwise, he tells me that he can&#39;t expand that line.<br>
<br>
There is a way to :<br>
- avoid to put the &quot;&gt;&quot; even if I have to add something else to the dsl ?<br>
- avoid the line &quot;msg : Message(payload : payload)&quot; in my drl and simplify<br>
my dsl so that xPathEquals &quot;know&quot; that the &quot;payload&quot; variable come from<br>
any object Message in Working Memory ?<br>
<br>
Thanks :-)<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>