If they are in different files, I recommend that they are in different agenda-grounds. They’ll continue to be prioritised in load order, so you’ll have two with load order 1, two with load order 2, two with load order 3 etc.
Mark On 5 Aug 2014, at 19:12, Borris <bor...@chaos.org.uk> wrote: > Mark, > > This was a really useful post, going into some detail on behaviour and > the underlying reasoning for the Drools implementation, especially the > 6.X stuff. I've removed a whole bunch of salience mess as a result as > well, which is always good for code quality. > > A question though - if rules in multiple different files become eligble > for firing "at the same time", is their ordering something that is > readily predictable? > > Thanks > > Borris > > On Monday 28/07/2014 17:11, Mark Proctor wrote: >> Phreak is just depth + load order, so it’s not a big change, all it does is >> remove the degree of arbitrary behaviour you were relying on for >> performance. Depth in 5x meant rules with the same salience were executed in >> an arbitrary order, it seems this arbitrary order was not so arbitrary in >> your case and makes an impact on performance - but as it’s arbitrary the >> repeatability of this cannot be ensured, even across environments let alone >> versions. In 6x this is no longer arbitrary, which will allow people more >> predictability in their rule executions. Load order is also much easier for >> people to understand and deal with, and often avoids the need to use >> salience at all - it’s also how people’s brains tend to think. Rules higher >> up in the file, fire first. We recommend one “agenda-group” per file, so >> that it’s easy to keep control of those orders. Salience can still over-ride >> this; but over time we have further ideas to completely remove the need for >> salience. This didn’t make much sense in 5x as load order was not preserved >> between kbase updates, so if you add rules later you lose the load order. In >> 6x we fixed this, so load order is always preserved between versions, an >> thus adding this enhancement makes sense. >> > > > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users