Not knowing the XML schema or the generated Java classes I can only outline the general principle.<br><br>if Request contains elist List&lt;Enrollments&gt;,  write a rule that matches the Request object and inserts:<br><br>
rule &quot;extractFromRequest&quot;<br>when<br>   r : Request()<br>then<br>   for( Enrollments e: r.getElist() ){<br>      insert( e );<br>   }<br>end<br><br>If there is only one enrollment Enrollments within each request, it&#39;s just<br>
   insert r.getEnrollments()<br><br>If you can conveniently write your rules against Enrollments objects, that&#39;s it. Otherwise, you might do the same, over again, at the Enrollments level. <br><br>(It&#39;ll become a problem if children of some element ought to be related to each other but this is only provided by them being children of the same parent. In this case, you won&#39;t be able to use the JAXB generated classes as WME classes.)<br>
<br>-W<br><br><br><div class="gmail_quote">On Fri, Apr 23, 2010 at 5:16 PM, mikexr <span dir="ltr">&lt;<a href="mailto:mike@bigfatnuthin.com">mike@bigfatnuthin.com</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;">
<br>
Thanks that makes sense.<br>
<br>
How do i get to elements that are beans below Enrollments?  This doesnt seem<br>
to work?<br>
<br>
rule &quot;EnrollmentsfromEnrollmentRequest&quot;<br>
when<br>
    EnrollmentRequest( $es: enrollments )<br>
    $e : Enrollments( enrollmentType ==  &quot;NewEnrollment&quot;) from $es<br>
then<br>
                System.out.println(&quot;Found Subscriber<br>
&quot;+$e.EnrollmentPolicy.Person.getName()) ;<br>
                System.out.println(&quot;for GroupID &quot; + $e.GroupIdentifier.getGroupId()) ;<br>
                System.out.println(&quot;Setting Source Name to Mike&quot;);<br>
                $e.setSourceName(&quot;Mike&quot;) ;<br>
<br>
end<br>
<br>
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule<br>
name=&#39;EnrollmentsfromEnrollmentRequest&#39;]<br>
        com/regence/edi/rules/Rule_EnrollmentsfromEnrollmentRequest_0.java (7:641)<br>
: $e.EnrollmentPolicy cannot be resolved or is not a field<br>
        com/regence/edi/rules/Rule_EnrollmentsfromEnrollmentRequest_0.java (8:720)<br>
: $e.GroupIdentifier cannot be resolved or is not a field<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Rules-Not-executing-tp731013p745971.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Rules-Not-executing-tp731013p745971.html</a><br>

Sent from the Drools - User 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>