[rules-users] Rules Not executing
Wolfgang Laun
wolfgang.laun at gmail.com
Tue Apr 20 03:14:02 EDT 2010
(.) You do call the method fireAllRules() on the engine?
(.) To see what you actually have in WM, add a rule
rule "any"
when
$obj : Object()
then
System.out.println( "obj: " + $obj.getClass() );
end
-W
On Tue, Apr 20, 2010 at 1:14 AM, mikexr <mike at bigfatnuthin.com> wrote:
>
> I have been working on a test to try and get up to speed on DROOLS. And I
> am
> having some challenges.'
>
> I have this rule.
>
> #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.Enrollments;
>
>
>
> #declare any global variables here
>
> rule "New Enrollment Rule"
> no-loop
> dialect "mvel"
> ruleflow-group "834RuleflowGroup"
> when
> #conditions
> Enrollments( enrollmentType == "NewEnrollment")
> then
> #actions
> System.out.println("Found Subscriber
> "+Enrollments.EnrollmentPolicy.Enrollment.Person.getName())
> System.out.println("for GroupID " +
> Enrollments.GroupIdentifier.getGroupId())
> System.out.println("Setting Source Name to Mike")
> Enrollments.setSourceName("Mike")
>
> end
>
>
> It compiles and runs but nothing happens
>
> I debugged the code and the data is being passed to the rules engine. but
> it doesn seem like the rule is executing.
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <EnrollmentRequest>
> <Enrollments>
> <EnrollmentType>NewEnrollment</EnrollmentType>
> <SourceName>USRINPUT</SourceName>
> <GroupIdentifier>
> <GroupId>60004854</GroupId>
> <SubGroupID>1</SubGroupID>
> </GroupIdentifier>
> <EnrollmentPolicy>
> <HoursPerWeekWorked>40</HoursPerWeekWorked>
> <Enrollment>
> <Event>
> <EventType>NEW</EventType>
> <EventDate>05/15/2009</EventDate>
> <EventEffectiveDate>06/10/2009</EventEffectiveDate>
> <EventTerminationDate/>
> <BreakInCoverage/>
> <QualifyingEvent/>
> <Description/>
> <Reason/>
> </Event>
> <Cobra>
> <CobraType/>
> <QualifyingEvent/>
> <CobraEffectiveDate/>
> <CertificateLength/>
> <CobraTerminationDate/>
> </Cobra>
> <Person>
> <Name>
> <FirstName>TEST</FirstName>
> <LastName>ENROLLMENT</LastName>
> <MiddleName/>
> <NameSuffix/>
> </Name>
> <DateOfBirth>05/05/1976</DateOfBirth>
> <Gender>Male</Gender>
> <MaritalStatus>Single</MaritalStatus>
> <Language>ENGL</Language>
> <PersonIdentifier>
> <PersonId>555555555</PersonId>
>
> <PersonIdentifierType>SocialSecurityNumber</PersonIdentifierType>
> </PersonIdentifier>
> <PersonIdentifier>
> <PersonId>55555567345</PersonId>
>
> <PersonIdentifierType>MedicareId</PersonIdentifierType>
> </PersonIdentifier>
> <PriorCoverage>
> <CarrierName>Kaiser</CarrierName>
> <PolicyHolderID>345545</PolicyHolderID>
> <EffectiveDate>01/01/2009</EffectiveDate>
> <TerminationDate>01/31/2009</TerminationDate>
> <PolicyHolderName>Medical</PolicyHolderName>
> </PriorCoverage>
> <PriorCoverage>
> <CarrierName>Providence</CarrierName>
> <PolicyHolderID>23474</PolicyHolderID>
> <EffectiveDate>02/01/2009</EffectiveDate>
> <TerminationDate>03/31/2009</TerminationDate>
> <PolicyHolderName>Medical</PolicyHolderName>
> </PriorCoverage>
> <ContactInformation>
> <AddressDetails>
> <ContactType>Home</ContactType>
> <Address>
> <AliasName>ADDR1</AliasName>
> <AddressLine1>56 Test Street</AddressLine1>
> <AddressLine2/>
> <City>Portland</City>
> <County>Multnomah</County>
> <State>OR</State>
> <ZipCode>97203</ZipCode>
> <Country>US</Country>
> </Address>
> </AddressDetails>
> <AddressDetails>
> <ContactType>Mailing</ContactType>
> <Address>
> <AliasName>ADDR1</AliasName>
> <AddressLine1>89 Mailing Street</AddressLine1>
> <AddressLine2/>
> <City>Portland</City>
> <County>Multnomah</County>
> <State>OR</State>
> <ZipCode>97203</ZipCode>
> <Country>US</Country>
> </Address>
> </AddressDetails>
> <PhoneNumber>
>
> <ContactType>Home</ContactType>
>
> <PhoneNumber>665-567-8888</PhoneNumber>
> </PhoneNumber>
> <EMailAddress>
> <EmailAddress>user at home.com</EmailAddress>
> </EMailAddress>
> </ContactInformation>
> <Membership>
> <MembershipIdentifier>
> <MemberID/>
>
> <MemberIdentifierType>CPSS_SBSB_ID</MemberIdentifierType>
> </MembershipIdentifier>
>
> <RelationshipToSubscriber>Subscriber</RelationshipToSubscriber>
> <MemberIndex>0</MemberIndex>
> <InsuranceIDCard>
> <IDLevel>FAMILY</IDLevel>
> <IDBackground>100</IDBackground>
> </InsuranceIDCard>
> <Eligibility>
> <Coverage>
> <ClassId>1</ClassId>
> <Product>
> <ProductId>MINN1001</ProductId>
> <BusinessCategory>M</BusinessCategory>
> </Product>
> <Product>
> <ProductId>RX000001</ProductId>
> <BusinessCategory>R</BusinessCategory>
> </Product>
> </Coverage>
> </Eligibility>
> <Preference>
> <PreferenceType>EEOB</PreferenceType>
> <Detail>
> <DetailType>EMAIL</DetailType>
> <DetailValue>user at home2.com</DetailValue>
> </Detail>
> </Preference>
> </Membership>
> <Medicare>
> <Entitlement>Blah</Entitlement>
>
> <EntitlementStartDate>01/01/2008</EntitlementStartDate>
> <EntitlementEndDate/>
> <MedicareProgram>
> <MedicareProgramType>TypeA</MedicareProgramType>
> <EffectiveDate>01/01/2008</EffectiveDate>
> <TerminationDate></TerminationDate>
> </MedicareProgram>
> <MedicareProgram>
> <MedicareProgramType>TypeB</MedicareProgramType>
> <EffectiveDate>01/01/2008</EffectiveDate>
> <TerminationDate></TerminationDate>
> </MedicareProgram>
> </Medicare>
> <Disability>
> <IsDisabled>false</IsDisabled>
> <DisabledDate/>
> <Description/>
> <VerifiedBy/>
> <VerifiedDate/>
> <VerificationMethod>EMAIL</VerificationMethod>
> </Disability>
> </Person>
> </Enrollment>
> </EnrollmentPolicy>
> </Enrollments>
> </EnrollmentRequest>
>
>
> I am looking for some assistance
>
> Thanks
>
> Mike
>
> --
> View this message in context:
> http://n3.nabble.com/Rules-Not-executing-tp731013p731013.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100420/d33b9c43/attachment.html
More information about the rules-users
mailing list