in 2.5, functions MUST be static.
so:
public static boolean IsStatutoryProfileOfficial(){
return true;
}
Unfortunately we couldn't think of a way to make this automatic in 2.5.
However (and sorry to tease !) in 3, there is a function keywork that takes
care of all that.
On 3/2/06, fanory <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I get the message : Cannot make a static reference to the non-static
> method
> IsStatutoryProfileOfficial() from the type Function_0_0
> with this sample drl file:
> <?xml version="1.0"?>
> <rule-set name="iris.73 ruleset"
> xmlns="http://drools.org/rules"
> xmlns:java="http://drools.org/semantics/java"
> xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
> xs:schemaLocation="http://drools.org/rules rules.xsd
> http://drools.org/semantics/java java.xsd">
> <java:import>java.lang.Object</java:import>
> <java:import>java.lang.String</java:import>
> <java:import>iris.drools.domain.*</java:import>
> <java:import>iris.drools.util.*</java:import>
> <java:functions>
> public boolean IsStatutoryProfileOfficial(){
> return true;
> }
> </java:functions>
> <rule name="st73.r1">
> <parameter identifier="beneficiary" >
> <class>iris.drools.domain.Beneficiary</class>
> </parameter>
> <java:condition>
> IsStatutoryProfileOfficial()
> </java:condition>
> <java:consequence>
>
> </java:consequence>
> </rule>
> </rule-set>
>
> Is someone understands my mistake ...?
>
>