Skip to content

jumpto

Targets another goal in the current DDD.

<jumpto type="perform" action="freshen_up_sourdough"/>

Attributes and placement

Attribute Meaning
type Required goal type; use perform or resolve.
action Ontology action for a perform-goal target.
question_type, predicate Question descriptor for a resolve-goal target.

The element has no children. It can appear in a plan, postplan, or conditional branch.

Behavior and usage

The target goal's plan is loaded and executed. After it completes, the original plan is reloaded and execution starts from the beginning of that plan. If the jump is not guarded, the original plan may reach the same jumpto again and loop. Guard it with once or if. That loop risk does not apply to a jump inside a completed resolve goal's postplan.

Run a target once:

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

Choose between two goals:

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

DDD JSON uses a goal descriptor:

{"jumpto": {"goal": {"perform": {"action": "start_sourdough"}}}}