[jboss-jira] [JBoss JIRA] Created: (JBRULES-2061) rule with not fires only once

Wolfgang Laun (JIRA) jira-events at lists.jboss.org
Thu Apr 16 15:03:22 EDT 2009


rule with not fires only once
-----------------------------

                 Key: JBRULES-2061
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2061
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-core  (expert)
    Affects Versions: 5.0.0.CR1
         Environment: Linux
            Reporter: Wolfgang Laun
            Assignee: Mark Proctor


The following rule fires only once, although there are several Node objects passing the <INFINITY test, and one of them must have the minimum tentDist. A rule with salience -100 shows this.

rule relax
    when
        $n : Node( $ta : tentDist < Graph.INFINITY )
        not Node( tentDist < $ta )
        $e : Edge( nodeA == $n, $nb : nodeB, $cost : cost )
        $b : Node( this == $nb, $tb : tentDist )
    then
        if( $ta + $cost < $tb ){
	        modify( $b ){
    	            setTentDist( $ta + $cost ),
        	    setParent( $n );
        	}
            System.out.println( "new td = " + ($ta + $cost) + " from " + $n.getId() + " to " + $b.getId() ); 
        }
end


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

        



More information about the jboss-jira mailing list