...
When cleanup is needed, this rule will be selected. Line 3 gets all the member subscriptions and the rest of the rule loops over them, with each one in turn bound to the name subs
. Lines 5-6 removes each subscription. Line 7, which is only evaluated when handling the last subscription, signals the collection pico's readiness for deletion.
Note | ||
---|---|---|
| ||
Note that the events |
Ruleset
The complete code for this ruleset can be found at https://raw.githubusercontent.com/Picolab/pico_lessons/master/collections/edu.byu.enMotion.collection.krl
Creating a collection pico
...
Repeating the action to create more collection picos give us a final configuration:
Ruleset
The complete code for this ruleset can be found at https://raw.githubusercontent.com/Picolab/pico_lessons/master/collections/edu.byu.enMotion.building.grouper.krl
Using a collection pico
Suppose we wanted to use one of the collection picos to collect some information from its member picos.
...