[jboss-jira] [JBoss JIRA] (DROOLS-13) OTN id generation doesn't take count of inheritance

Mario Fusco (JIRA) jira-events at lists.jboss.org
Wed Jan 16 04:29:21 EST 2013


Mario Fusco created DROOLS-13:
---------------------------------

             Summary: OTN id generation doesn't take count of inheritance
                 Key: DROOLS-13
                 URL: https://issues.jboss.org/browse/DROOLS-13
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Mario Fusco
            Assignee: Mark Proctor


The following set of rules reproduces this issue:

{code}
declare Parent
    active : boolean
end
 
declare Child extends Parent
end
 
rule "Init"
when
then
    insert( new Child( false ) );
end
 
rule "Print"
when
    $g : Child( active == true )
then
    System.out.println("Rule B " + $g );
end
 
rule "Switch"
when
        $item : Parent( active == false )
then
    System.out.println("Rule C " + $item );
    modify ( $item ) {
            setActive( true );
    }
end
{code}

Here when rule "Switch" modifies the object, it correctly triggers the rule "Print", only, when it tries to create an activation for "Print", it reuses the existing activation for "Switch".

The problem is in LeftTupleSource.doModifyLeftTuple where it ends up comparing otnIds that can potentially be generated by different OTNs.

--
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