Hello,
 
when I execute this code
rule "sample6"
when
act :activity(activityName != "activite1",type:type, activite : activite)
pp: activite.getactivity()
then
act.getActivityName();
System.out.println("deux clés ont la meme valeurs " +act.getActivityName());
end
 
an error is affiched
 
Exception in thread "main" org.drools.rule.InvalidRulePackage: Unable to resolve ObjectType 'activite.getActivity'
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:60)
 
Thank you for your help
Best regard
Ismail


Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.