...
Code Block |
---|
rule mischief_subscriptions { select when mischief subscriptions pre { mischief = ent:mischief thing1 = ent:things[0] thing2 = ent:things[1] } if mischief && thing1 && thing2 then noop() fired { event:send( { "eci": mischief, "eid": "subscription", "domain": "wrangler", "type": "subscription", "attrs": { "name": "thing1", "name_space": "mischief", "my_role": "controller", "subscriber_role": "thing", "channel_type": "subscription", "subscriber_eci": thing1 } } ); event:send( { "eci": mischief, "eid": "subscription", "domain": "wrangler", "type": "subscription", "attrs": { "name": "thing2", "name_space": "mischief", "my_role": "controller", "subscriber_role": "thing", "channel_type": "subscription", "subscriber_eci": thing2 } } ) } } |
The ruleset sets up a button in the owner pico's Testing tab, "mischief/subscriptions" to send the event that causes this rule to evaluate.
...