createTask
createTask
creates a task. A task will be created for each object in the input set, with the object as the tasks target.
Context | Type |
---|---|
Input | set of objects |
Output | a set with a single object |
Parameter | Type |
---|---|
name | The name of the task. |
description | A description of the task. |
assignees (optional) | The objects to assign to the created tasks |
Examples
when
object(type="bike", battery<20)
then
createTask("charge", "charge the bike", nearest(type="van"))
This example first finds bicycles with low battery, then creates a new task for each of them and assigns all of the tasks to the van that is nearest to any of them. In real life it may not make sense to assign a single van to every new low battery bike if the new low battery bikes are widely spread.