How to insert facts in a sroted list via rules in RHDM/BRMS

Solution Unverified - Updated -

Issue

  • I have a FactA with a list of FactB objects. I have a requirement to read the FactB objects sorted by a FactB's property (e.g. dueDate). So I write a rule below:
rule "Insert FactB"
when
    $a: FactA()
    $b: FactB() from $a.factBList   
then
    insert($b);
end

But the inserted order doesn't meet the sorted order of factBList. How can I achieve it?

Environment

  • Red Hat JBoss BRMS
    • 6.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content