In my ongoing efforts to abuse Drools syntax, I would like to write rules like this:
rule "severe bugs for which a member of your group is dev or support owner"
when
$group : UserGroup( )
$badBugs : List() from
collect( Bug( (devOwner memberOf $group or supportOwner memberOf $group),
severity == "hair-on-fire" )
then
$group.runAroundInStarkRavingPanicOver($badBugs)
end
Will that work? Is that the right syntax? Will it be performant if I've got
10000 Bugs and 1000 UserGroups?
According to Mark's "What's New in JBoss Rules 4.0" presentation, you
can use &&
and || without subrule generation, and I have a vague memory of seeing something
about "and" & "or" as well, but I can't remember where I saw
it.
Thanks.
--
Dirk Bergstrom dirk(a)juniper.net
_____________________________________________
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905