How to insert facts in a sroted list via rules in RHDM/BRMS
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.