Cool. That makes it a bit more simple. I think I may have wrapped it in an
eval because I was having trouble with the null.
Thanks
On 4/17/06, Mark Proctor <[EMAIL PROTECTED]> wrote:
>
> That's illegal syntax, surprised if it worked before. 'eval' is a
> conditional element, it cannot be nested inside a Column:
> TestParam(s : value -> (s != null) )
>
> BTW null tests work, you can just do:
> TestParam(s == null)
>
> If you wanted to use:
> TestParam(s : value )
> eval(s == null)
>
> Mark
> Paul Smith wrote:
> > Hi Guys,
> >
> > I've just put RC2 in place but now rules that did work with RC1 don't
> build
> > any more. An example is as follows:
> >
> > package testing
> >
> > import testing.TestParam
> >
> > rule "testEval"
> >
> > when
> > TestParam(s : value -> eval(s != null))
> > then
> > System.out.println("Do something");
> > end
> >
> > When I do the addPackage I get the following:
> >
> > org.drools.rule.InvalidRulePackage: unknown:8:25 mismatched token:
> > [EMAIL PROTECTED],116:119='eval',<56>,8:25]; expecting type '('
> >
> > at org.drools.rule.Package.checkValidity(Package.java:378)
> > at org.drools.reteoo.RuleBaseImpl.addPackage(RuleBaseImpl.java:303)
> > at testing.EvalTest.testFunction(EvalTest.java:23)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > at java.lang.reflect.Method.invoke(Unknown Source)
> > at junit.framework.TestCase.runTest(TestCase.java:154)
> > at junit.framework.TestCase.runBare(TestCase.java:127)
> > at junit.framework.TestResult$1.protect(TestResult.java:106)
> > at junit.framework.TestResult.runProtected(TestResult.java:124)
> > at junit.framework.TestResult.run(TestResult.java:109)
> > at junit.framework.TestCase.run(TestCase.java:118)
> > at junit.framework.TestSuite.runTest(TestSuite.java:208)
> > at junit.framework.TestSuite.run(TestSuite.java:203)
> > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> > RemoteTestRunner.java:478)
> > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> > RemoteTestRunner.java:344)
> > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> > RemoteTestRunner.java:196)
> >
> > The brackets look ok to me.
> >
> >
>
>