Thanks got it working
#created on: Apr 1, 2010
package com.regence.edi.rules;
#list any import classes here.
import com.regence.edi.enrollment.Person;
import com.regence.edi.enrollment.GroupIdentifier;
import com.regence.edi.enrollment.EnrollmentRequest;
import com.regence.edi.enrollment.Name;
import com.regence.edi.enrollment.*;
#declare any global variables here
rule "any"
when
$obj : Object()
then
System.out.println( "obj: " + $obj.getClass() );
end
rule "extractEnrollments"
when
r : EnrollmentRequest( ep : enrollmentPolicy )
then
insert( ep );
// retract( r );
end
rule "EnrollmentRequest"
when
$es : EnrollmentRequest( enrollmentType == "NewEnrollment" )
then
System.out.println("Setting Source Name to DROOLS");
$es.setSourceName("DROOLS") ;
end
rule "extractName"
when
$er : EnrollmentRequest ( n : enrollmentPolicy.enrollment.person.name )
then
insert( n );
end
rule "getEnrollmentPolicyName"
when
$n : Name ( firstName == "TEST" )
then
System.out.println(" Person is a test user " + $n.getFirstName());
System.out.println("setting firstName to TEST2");
$n.setFirstName("TEST2");
end
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Rules-Not-executing-t...
Sent from the Drools - User mailing list archive at
Nabble.com.