...
Code Block |
---|
rule intialization { select when wrangler ruleset_added where event:attr("rids") >< meta:rid if ent:owners.isnull() then noop(); fired { ent:owners := {}; } } |
It is very important that the select
clause include the conditional where rids clause where event:attr("rids") >< meta:rid
because many rulesets might be installed in a pico during its existence, and we don't want the intialization
rule in this ruleset to respond when other rulesets are installed later on. Making sure the rule fires only when the entity variable is not already defined is also good policy.
...