<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    I am finding that the "salience" feature is acting very erratically.<br>
    <br>
    Some of my rules modify the working memory. So I would like them to
    execute before the others that simply read the memory after
    modification and report on certain data conditions that are left
    after all modifications have happened.<br>
    <br>
    The "modifying" rules have a salience of 5. The "reading" rules have
    a salience of 0.<br>
    <br>
    Using the rules logging I can see activations of my modifying rules
    being created and activations of the reading rules being created.<br>
    And I can see "reading" rules (with salience 0) being executed <i>before</i>
    "modifying" rules (with salience 5) even though no other activations
    are being created in between them.<br>
    <br>
    I am not using agenda groups or anything "fancy" like that.<br>
    <br>
    Debugging through the code I can see the "MAIN" agenda group is a
    queue organised as heap.<br>
    However, the order in which things happen is very non-deterministic
    (presumably due to hashing or something like that) and I am finding
    it very difficult to actually pin down an actual 100% reproducible
    case.<br>
    <br>
    Is there any known problem with the salience mechanism?<br>
    <br>
    I am using JBoss Rules 5.1.0 (with a support licence).<br>
    <br>
    Chris Selwyn<br>
  </body>
</html>