MR2. The typo was my fault. Let me test in trunk (at home) before I
raise a JIRA.
Cheers,
Mike
________________________________
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Edson Tirelli
Sent: 25 May 2007 13:40
To: Rules Users List
Subject: Re: [rules-users] NPE loading rule with multi
restriction connectivefield constraints
2007/5/25, Anstis, Michael (M.) <manstis1(a)ford.com>:
Hi Michael
Are you using trunk or MR2?
There was a syntax change in trunk where the connective
constraints were modified to || and && for consistency with the rest of
the language.
Also, I see a typo in the above rule where the variable name
is "$pminp" but was written as "$pmin".
Anyway, the exception message must be improved. Can you
please add a JIRA with your test?
Thanks once more,
Edson
Hi,
I get a NPE (in v4.0) when loading a rulebase with the
following rule:-
rule "smurf"
when
$p1 : Property( $pminp : number )
$p2 : Property( $pmaxp : number )
$p3 : Property( $mlp : number < $pmin | > $pmaxp
)
then
System.out.println("The smurf has landed!" );
end
If the rule uses literals in the multi-restriction
connective field constraint it loads OK.
The stack trace isn't very helpful:-
java.lang.NullPointerException
at
com.ford.finance.nges.rules.RuleEngineWrapper$WorkSpace.loadRulebaseFrom
Drl(RuleEngineWrapper.java :506)
at
com.ford.finance.nges.rules.RuleEngineWrapper$WorkSpace.loadRuleBase(Rul
eEngineWrapper.java:472 )
at
com.ford.finance.nges.rules.RuleEngineWrapper$WorkSpace.<init>(RuleEngin
eWrapper.java:64 )
at
com.ford.finance.nges.rules.RuleEngineWrapper.getWorkSpace(RuleEngineWra
pper.java:582 )
Would you like a new JIRA?
With kind regards,
Mike
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com