Iterate¶
Definition¶
<iterate iterator="identifier"/>
Iterate over the propositions enumerated in the <iterator>.
Attribute | Type | Description |
---|---|---|
iterator | string | The name of the iterator referenced. |
Parents¶
Children¶
None
Behaviour¶
An has_more_items
will return false
. If iteration continues, the test will return true
until iteration is again finished.
Examples¶
iterate over nice destinations¶
<iterate iterator="nice_destinations"/>
Examples¶
iterate over nice destinations¶
If destination is paris, inform that we'll see the eiffel tower. When the iteration is done, we'll exit the plan.
<plan>
<iterate iterator="nice_destinations"/>
<if>
<proposition predicate="destination" value="paris"/>
<then>
<inform insist="true">
<proposition predicate="info" value="we'll see the eiffel tower"/>
</inform>
</then>
</if>
<if>
<has_more_items iterator="nice_destinations"/>
<else>
<signal_action_completion/>
</else>
</if>
</plan>
Last update: May 20, 2022