The object you have in your Working Memory is an EnrollmentRequest. In
order to be able to write a Conditional Element using class
Enrollments you have to have an Enrollments object in WM. (I assume
that there is a class Enrollments for the <Enrollments> element.)
Now there is two ways to do that, starting with the EnrollmentRequest.
Your choice may depend on what other rules you have, wether an
EnrollmentRequest may contain more that one Enrollments child, and
what other rules you have.
(1) Write a rule that extracts the Enrollments object from
EnrollmentRequest. (You might retract the EnrollmentRequest in the
consequence.) You could continue to use the rule you have for
Enrollments.
rule "extractEnrollments"
when
r : EnrollmentRequest( e : enrollments )
then
insert( e );
// retract( r );
end
(2) Use the "from" conditional element.
rule "EnrollmentsfromEnrollmentRequest"
when
EnrollmentRequest( $es: enrollments )
$e : Enrollments( enrollmentType == "NewEnrollment") from $es
then
...
end
Makes sense?
-W
On Tue, Apr 20, 2010 at 7:22 PM, mikexr <mike(a)bigfatnuthin.com> wrote:
Sorry what does that mean use from?
--
View this message in context:
http://n3.nabble.com/Rules-Not-executing-tp731013p732968.html
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users