Mike,
Wolfgang has it right. When you write:
property : StatusProperty( name == "propertyName", value == "valueA" )
You are telling the engine that the StatusProperty is a fact in the working memory. Reading that, I assumed you were inserting them, because if they are not facts in the working memory, the rule will obviously never match.
If you don't want to insert them (although recommended), you need to rewrite the pattern using "from" to tell the engine where to look for the properties. Example:
when
t : TrainingStatus( currentSection == "section_a" )
property : StatusProperty( name == "propertyName", value == "valueA" ) from t.properties
then
end
[]s
Edson2010/1/25 Mike Dougherty <mjdougherty@gmail.com>Hello Wolfgang,Thank you for the response. However, as I read this documentation this should not be necessary. Even still, if I try it, it does not seem to help.Thanks,MikeOn Jan 24, 2010, at 9:17 AM, Wolfgang Laun wrote:On Sun, Jan 24, 2010 at 8:16 AM, Mike Dougherty <mjdougherty@gmail.com> wrote:
I'm inserting a TrainingStatus object that should match this rule. But the resulting object does not have the nextSection and previousSection fields set to the values they should.
Only because you mention the insertion of the TrainingStatus object but not the one(s) of (a) StatusProperty object(s): They should be inserted, too!
-W_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users