Skip to content

Jumpto

Definition

<jumpto action="..."/>

Jumps execution to the plan of another perform goal.

Attribute Type Description
action string Required. The action name of the target perform goal as defined in the domain goal element.

Parents

Children

None.

Behaviour

When executed, the target perform plan is immediately loaded and executed. When that plan completes, the original plan is reloaded and execution starts from the beginning of that plan. If the jump is not guarded by a <once> or an <if>, the jumpto will be encountered again when the original plan restarts. This looping risk does not apply when jumpto is inside a <postplan>, since the goal is already complete when the postplan runs.

Examples

Jump to a perform goal once

<plan>
  <once>
    <jumpto action="freshen_up_sourdough"/>
  </once>
</plan>

Jump to one of two perform goals

<if>
  <has_shared_value predicate="sourdough_status"/>
  <then>
    <jumpto action="freshen_up_sourdough"/>
  </then>
  <else>
    <jumpto action="start_sourdough"/>
  </else>
</if>