...
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 every {
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 } } )
}
} |
...