[jboss-jira] [JBoss JIRA] (DROOLS-353) Evaluation of the RHS in a rule with multiple matches using noloop and update gets cut short

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Wed Nov 27 11:38:05 EST 2013


    [ https://issues.jboss.org/browse/DROOLS-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927164#comment-12927164 ] 

RH Bugzilla Integration commented on DROOLS-353:
------------------------------------------------

Mario Fusco <mfusco at redhat.com> changed the Status of [bug 1034094|https://bugzilla.redhat.com/show_bug.cgi?id=1034094] from ASSIGNED to MODIFIED
                
> Evaluation of the RHS in a rule with multiple matches using noloop and update gets cut short
> --------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-353
>                 URL: https://issues.jboss.org/browse/DROOLS-353
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Mario Fusco
>            Assignee: Mario Fusco
>             Fix For: 6.0.1.Final
>
>
> If you have a rule with both noloop and update where there are multiple matches on the LHS, the RHS only runs for first match instead of running for all matches. The following example shows the problem:
> {code}
>         @Test
>         public void testMultipleNoLoop1() {
>             String str =
>                     "import org.drools.compiler.Person\n" +
>                     "rule R no-loop\n" +
>                     "when\n" +
>                     "  String()\n" +
>                     "  $p : Person( $age : age )\n" +
>                     "then\n" +
>                     "    modify($p) { setAge( $age + 1 ) }\n" +
>                     "end\n";
>      
>             KnowledgeBase kbase = loadKnowledgeBaseFromString(str);
>             StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
>      
>             Person mario = new Person("Mario", 38);
>      
>             ksession.insert("a");
>             ksession.insert("b");
>             ksession.insert(mario);
>             ksession.fireAllRules();
>      
>             assertEquals(40, mario.getAge());
>         }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list