[jboss-jira] [JBoss JIRA] Created: (JBRULES-2558) Drools keeps only the last logical insertion in each rules consequence

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Wed Jun 23 11:44:46 EDT 2010


Drools keeps only the last logical insertion in each rules consequence
----------------------------------------------------------------------

                 Key: JBRULES-2558
                 URL: https://jira.jboss.org/browse/JBRULES-2558
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-core
    Affects Versions: 5.1.0.M2
            Reporter: Edson Tirelli
            Assignee: Edson Tirelli
             Fix For: 5.1.0.CR1


If a rule contains more than on logical insertion, Drools will only keep the last one, cancelling any previously logically inserted facts. Example:


package com.sample
 
declare Some
	field : int
end
 
rule "Init"
salience 9999
    dialect "mvel"
	when	
	    eval( true );	
	then
	    with( s0 = new Some() ) {
	        field = 0
	    }
		insertLogical(s0);
		with( s1 = new Some() ) {
		    field = 1
		}
		insertLogical(s1); 		
end

In the above case, drools will only keep s1, but not s0.


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

        


More information about the jboss-jira mailing list