Skip to content
Phillip Markert edited this page Nov 23, 2016 · 1 revision

A jump indicator can be returned in the result of any action's processing phase. If an action returns a jump indicator, the indicator specifies either one of the special jump target keywords or the name of a step. When a jump indicator is returned from an action, hyperpotamus will interrupt the normal processing flow and immediately follow the jump action.

Named Steps

Each step can have a .name property that can be used as the target of a jump indicator. When a step is identified as the target of a jump operation, processing always starts with the first action under the step.

- defaults:
    a: 1

- name: main
  actions:
    - print: "A is <% a %>"

- set:
    a: <%! a | plus,1 %>

- greater_than: [ <% a %>, "10" ]
  on_failure:
    goto: main

Special jump targets

SELF

SELF will cause the current step to be repeated, starting over form the first action.

NEXT

NEXT causes any remaining actions in the current request to be skipped and processing begins with the start of the following step.

END

END causes the processor to stop executing any further steps in the script.

Clone this wiki locally