pypyr.steps.jump permalink

jump to another step in pipeline permalink

Jump to another step-group. This effectively stops processing on the current step-group from which you are jumping.

If you want to return to the point of origin after the step-group you jumped to completes, use call instead.

input permalink

jump expects a context item jump. It can take one of two forms:

- name: pypyr.steps.jump
  comment: simple string means just call the step-group named "jumphere"
  in:
    jump: jumphere
- name: pypyr.steps.jump
  comment: specify groups, success and failure.
  in:
    jump:
      groups: ['jumphere', 'andhere'] # list. Step-group sequence to jump to.
      success: group_to_call_on_success # string. Single step-group name.
      failure: group_to_call_on_failure # string. Single step-group name.

jump.groups can be a simple string if you’re just jumping a single group -i.e you don’t need to make it a list of one item.

All inputs support substitutions. This means you can dynamically specify the jump destination, success & failure handlers.

example permalink

jump is handy when you want to transfer control from a current step-group to a different sequence of steps. So you can jump around to your heart’s content.

steps:
  - name: pypyr.steps.echo
    in:
      echoMe: this is the 1st step of steps
  - name: pypyr.steps.jump
    in:
      jump: arbgroup
  - name: pypyr.steps.echo
    in:
     echoMe: You WON'T see me because we jumped.
arbgroup:
    - name: pypyr.steps.echo
      in:
        echoMe: this is arb group
    - pypyr.steps.stopstepgroup
    - name: pypyr.steps.echo
      in:
        echoMe: if you see me something is WRONG.

This will result in:

this is the 1st step of steps
this is arb group

jump only runs success or failure groups if you actually specify these.

See a worked example for jump.

see also

last updated on .