<font size="2">
<p>Hi, </p>
<p>I am planning to use Drools - JBoss Rules Engine. My requirement is to disburse mails from my application to different groups based on various criteria. I want to use Drools here.</p>
<p>My object structure is as follows:</p>
<p>class A{</p>
<p>String B = &quot;&quot;;</p>
<p>B b;</p>
<p>C c;<br>}</p>
<p>Hence Obj A has embedded objects within it, and obj B and C further has embedded objects.</p>
<p>class B {</p>
<p>String X;</p>
<p>Z z;</p>
<p>}</p>
<p>class Z{</p>
<p>String t;</p>
<p>String s;</p>
<p>}</p>
<p>The decision on sending the mails based on the fields in embedded objects of A. I pass instance of A to Drools</p>
<p>Format of drl file:</p>
<p>package...;</p>
<p>import ..;</p>
<p>rule &quot;Test&quot;</p>
<p>when $a:A(B(Z(s == &quot;testvalue&quot;)))</p>
<p>then</p>
<p>$a.setSomething();</p>
<p>update($a);</p>
<p>end</p>
<p>I wanted to know if this (accessing fields in embedded/child object) is feasible with Drools.</p>
<p>I get an error saying &quot;UNable to compile myfile.drl when i try to fo this.</p>
<p>Could some one look into this issue and let me know the reason for this ?</p>
<p>&nbsp;</p>
<p>Thanks</p>
<p>-D</p></font>