I don't think you can insert a Motion object from Java when its declare is in DRL, or you can't declare a field if it's a Pojo?
But I can't reproduce it anyway. -W On 20/06/2012, sopel39 <[email protected]> wrote: > Code is: > > KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); > kbuilder.add( ResourceFactory.newClassPathResource( "rules.drl" ), > ResourceType.DRL ); > KnowledgeBuilderErrors errors = kbuilder.getErrors(); > if ( errors.size() > 0 ) > { > for ( KnowledgeBuilderError error : errors ) > { > System.err.println( error ); > } > throw new IllegalArgumentException( "Could not parse knowledge." ); > } > KnowledgeBaseConfiguration config = > KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); > config.setOption( EventProcessingOption.STREAM ); > KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( config ); > kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() ); > > StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); > KnowledgeRuntimeLoggerFactory.newFileLogger( ksession, "test" ); > > for (i = 0; i <= 1000; i++) { > ksession.insert(new Motion(System.currentTimeMillis())); > } > > Thread.sleep(10 * 1000); //wait for motion events expire (simulate hi rules > engine load) > ksession.fireAllRules(); //I have println in rules so I can see that they > are executed multiple times > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Odd-rules-execution-for-expired-events-tp4018092p4018094.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
