[rules-users] Match workingmemory elements based on declared type (interface)

Andreas Langegger andreas.langegger at gmx.at
Tue Feb 12 17:08:42 EST 2008


On Feb 12, 2008, at 10:03 PM, Edson Tirelli wrote:

>
>    Yes, that is how it works. Declare the pattern as any class or  
> interface name and it will try to match any fact in the working  
> memory that implements that interface or derive that class.

great, works neatly!

NOTE to anybody debugging with ECLIPSE:
You must add the rule files to the src build path! Drools will run if  
you don't, however debugging won't work!
(first I thought it has something to do with the project <nature> but  
it doesn't need one. If you want to use drools with another project  
(Java, Dynamic Web, etc.) add this to the .project file:

         <buildSpec>
                 <buildCommand>
                         <name>org.drools.eclipse.droolsbuilder</name>
                         <arguments>
                         </arguments>
                 </buildCommand>
          ...
and <classpathentry kind="con" path="DROOLS/Drools"/> to  
your .classpath. That's all what a "Drools Project" is about.

Best regards and thank you Edson,
Andy



More information about the rules-users mailing list