[rules-users] code error

Scott Reed sreed at spamcop.net
Mon Apr 9 09:21:55 EDT 2007


fakhfakh ismail's message received 4/9/2007 8:13 AM:
> hello,
> when I execute this code
> rule "sample6"
> when
> act :activity( Type == 5)
>   //nod: act.getNodeProperty()
> //nod.Property(key1: Key, value1:value)
> //nod.Property(key2: Key, value==value1)
> then
> System.out.println("deux clés ont la meme valeurs");
> end
> 
> error is affiiched
> 
> 
>  Exception in thread "main" org.drools.rule.InvalidRulePackage: Unable 
> to create Field Extractor for 'Type'
> 
>     at org.drools.rule.Package.checkValidity(Unknown Source)
>     at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
>     at org.drools.jsr94.rules.admin.RuleExecutionSetImpl.<init>(Unknown 
> Source)
>     at 
> org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(Unknown 
> Source)
>     at 
> org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(Unknown 
> Source)
>     at 
> org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(Unknown 
> Source)
>     at com.sample.Rule.fireRules(Rule.java:41)
>     at com.sample.Rule.fireRules(Rule.java:70)
>     at com.sample.DroolsTest.main(DroolsTest.java:59)
> 
> however the attribut Type exist in class activity
Does the method activity.getType() exist?
> Best regard
> Thank you for your help



More information about the rules-users mailing list