Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: for now convert index to number

...

Code Block
  rule mischief_subscriptions {
    select when mischief subscriptions
    foreach ent:things setting(thing,index)
      // introduce mischief pico to thing[index] pico
      event:send(
        { "eci": ent:mischief, "eid": "subscription",
          "domain": "wrangler", "type": "subscription",
          "attrs": { "name": "thing" + (index.as("Number")+1),
                     "Rx_role": "controller",
                     "Tx_role": "thing",
                     "channel_type": "subscription",
                     "wellKnown_Tx": thing } } )
  }

...