[jboss-jira] [JBoss JIRA] Created: (JBRULES-3073) Saliance is not working for 5.1.1 with fusion

Richard Ambridge (JIRA) jira-events at lists.jboss.org
Thu Jun 9 06:34:59 EDT 2011


Saliance is not working for 5.1.1 with fusion
---------------------------------------------

                 Key: JBRULES-3073
                 URL: https://issues.jboss.org/browse/JBRULES-3073
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-core
    Affects Versions: 5.1.1.FINAL
         Environment: Ubuntu
            Reporter: Richard Ambridge
            Assignee: Mark Proctor
            Priority: Blocker
         Attachments: DroolsRuleTest.java, Item.java, rule1.drl

Using drools with time based rules and saliance, the saliance is not used when firing the rules

This only happens when multiple objects update at the same time.

e.g. Rule 1 is
salience 1000
dialect "mvel"
when
  $i : Item(val==10)
  Item(val==11, this after [0s, 1m] $i)

Rule 2 is
salience 1000
dialect "mvel"
when
  $i : Item(val==10)
  not( Item(val==11, this after [0s,1m] $i))


Rule3 is
salience 100
when
  $i : Item(val==11)


Then we insert 3 items with val==10
Rule2 is activated 3 times...
Then we insert an item with val==11

Note, with a val==10 and val==11 in the memory, Rule 1 will activate, and Rule 3 will activate
However, Rule1 should fire first.. as its saliance is high

For the first item it does, but then the Rule 3 fires before 2nd item does.

Audit log is attached, but summary is

Object inserted (1), Item: val==10
Activation created: Rule 2 (1)
Object inserted (2), Item: val==10
Activation created: Rule 2 (2)
Object inserted (3), Item: val==10
Activation created: Rule 2 (3)
Object inserted (4), Item: val==11
Activation created: Rule 1 (1)
Activation created: Rule 1 (2)
Activation created: Rule 1 (3)
Activation created: Rule 3 (4)
Activation cancelled: Rule 2 (1)
Activation cancelled: Rule 2 (2)
Activation cancelled: Rule 2 (3)

.. here we have 4 activations, 3 for Rule1 (saliance 1000), 1 for Rule3(saliance 100)
Activation executed Rule 1 (1)
Activation executed Rule 3 (4)   //WRONG
Activation cancelled: Rule 1 (2)
Activation cancelled: Rule 1 (3)
Activation created: Rule 2 (2)
Activation created: Rule 2 (3)

Note, this works fine in Drools 5.0
In Drools 5.2.0 CR1 a null pointer is thrown (another issue will be logged for that)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list