[rules-users] Rules Not executing
Swindells, Thomas
TSwindells at nds.com
Tue Apr 20 04:12:19 EDT 2010
And are you actually using drools flow? If not you should remove the ruleflow-group.
Thomas
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: 20 April 2010 08:14
To: Rules Users List
Subject: Re: [rules-users] Rules Not executing
(.) 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<mailto: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<mailto: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<mailto: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<mailto:rules-users at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
________________________________
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.
An NDS Group Limited company. www.nds.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100420/eba0b6bd/attachment.html
More information about the rules-users
mailing list