[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1354) Duplicate parameter error while trying to use pattern bound variables or globals in accumulate function

Eric Miles (JIRA) jira-events at lists.jboss.org
Thu Nov 29 09:13:46 EST 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-1354?page=all ]

Eric Miles updated JBRULES-1354:
--------------------------------

    Summary: Duplicate parameter error while trying to use pattern bound variables or globals in accumulate function  (was: Duplicate parameter while trying to use pattern bound variables or globals in accumulate function)

> Duplicate parameter error while trying to use pattern bound variables or globals in accumulate function
> -------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-1354
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1354
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.0.3
>         Environment: JDK 1.5.0_13, Ubuntu 7.10
>            Reporter: Eric Miles
>
> Whenever I attempt to reference a pattern bound variable (declared outside of accumulate) or a global from within an accumulate function, I get a "Duplicate parameter" error.
> Example of pattern bound variable:
> rule "Test"
> when
>     $obj: SomeObject()
>     Integer() from accumulate( AnotherObject() , init (int total = 0 ), action ( total += $obj.getValue(); ), reverse ( total -= $obj.getValue(); ), result ( total) )
> then
>     System.out.println("HI!");
> end
> The same happens when if I attempt to use a global.  Here is an exact stacktrace of the error:
> org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule
> name=Daily Core Hours, agendaGroup=MAIN, salience=0, no-loop=false]
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (32:1301) : Duplicate parameter $schedOut
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (32:1330) : Duplicate parameter $schedIn
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (41:1735) : Duplicate parameter $schedOut
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (41:1764) : Duplicate parameter $schedIn
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (51:2330) : Duplicate parameter $schedOut
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (51:2359) : Duplicate parameter $schedIn
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (58:2738) : Duplicate parameter $schedOut
>         com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java
> (58:2767) : Duplicate parameter $schedIn
>         at org.drools.rule.Package.checkValidity(Package.java:424)
>         at
> org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:364)
>         at
> com.kronos.webta.service.smarttime.rules.maxiflex.FlowTest.setUpBeforeClass(FlowTest.java:79)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.junit.internal.runners.ClassRoadie.runBefores(ClassRoadie.java:49)
>         at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:36)
>         at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
>         at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list