...
The complete code for this ruleset can be found at https://raw.githubusercontent.com/Picolab/pico_lessons-engine/master/collections/edu.byu.enMotion/packages/pico-engine/krl/io.picolabs.collection.krl
Creating a collection pico
...
Code Block | ||
---|---|---|
| ||
rule collection_needed { select when grouper creation pre { name_prefix = event:attr("name_prefix"); group_name = name_prefix + " Rooms"; rids = "eduio.byupicolabs.enMotion.collection;io.picolabs.subscription"; child_specs = { "name": group_name, "name_prefix": name_prefix, "rids": rids, "color": "#002e5d" }; } fired { raise wrangler event "new_child_request" attributes child_specs; } } |
...
Code Block | ||
---|---|---|
| ||
meta { use module eduio.byu.enMotionpicolabs.collection alias collection shares some_function } global { some_function = function() { collection:members()// some further processing } } rule some_rule { select when something required foreach collection:members() setting(subs) // some action/postludes for each subs } |
...