[jboss-jira] [JBoss JIRA] (DROOLS-3606) From with modify fires unexpected rule

Mario Fusco (Jira) issues at jboss.org
Tue Feb 19 03:07:04 EST 2019


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

Mario Fusco commented on DROOLS-3606:
-------------------------------------

Also fixed by https://github.com/kiegroup/drools/commit/426130b76d7d460dcc61f5bd8dabc37f254be52d

> From with modify fires unexpected rule
> --------------------------------------
>
>                 Key: DROOLS-3606
>                 URL: https://issues.jboss.org/browse/DROOLS-3606
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.17.0.Final
>            Reporter: Toshiya Kobayashi
>            Assignee: Mario Fusco
>            Priority: Major
>              Labels: support
>
> The rules below expect that only "R1" is fired when Person ("John", 20) is inserted. However, "R2" is also fired though age is set to 5 in modify block.
> {noformat}
> rule "R1"
>     salience 1
>     when
>         $p : Person()
>         Person( age > 10 ) from $p 
>     then
>         modify ($p) {
>           setAge(5);
>         }
>         System.out.println( "R1, " + $p);
> end
> rule "R2"
>     salience 0
>     when
>         $p : Person()
>         Person( age > 10 ) from $p 
>     then
>         System.out.println( "R2, " + $p);
> end
> {noformat}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list