You can use jumps to control what step in your workflow will execute next. For
example, at the end of any step, you can use `next` to define what step should
execute next:

### YAML

```yaml
  - STEP_NAME:
      ...
      next: STEP_NAME_TO_JUMP_TO
  
```

### JSON

```json
  [
    {
      "STEP_NAME": {
        ...
        "next": "STEP_NAME_TO_JUMP_TO"
      }
    }
  ]
    
```

You can also use `next` to do the following:

- To change the flow of a `for` loop, you can use `next: break` or
  `next: continue`. For more information, see
  [Use break/continue in a loop](https://docs.cloud.google.com/workflows/docs/reference/syntax/iteration#break-in-loop).

- To stop the execution of a workflow or subworkflow, you can use `next: end`.
  For more information, see
  [Complete the execution of a workflow](https://docs.cloud.google.com/workflows/docs/reference/syntax/completing).

For more information about defining a workflow's order of execution, see
[Conditions](https://docs.cloud.google.com/workflows/docs/reference/syntax/conditions) and
[Control the order of execution in a workflow](https://docs.cloud.google.com/workflows/docs/controlling-execution-order).

### Explicit step ordering using jumps

This sample uses the `next:` command to explicitly define the sequence of
workflow steps. In this sample, steps are executed in a different order than
they appear in the workflow definition.

### YAML

    - first_step:
        call: http.get
        args:
          url: https://www.somewhere.com/callA
        next: second_step
    - third_step:
        call: http.get
        args:
          url: https://www.somewhere.com/callB
        next: end
    - second_step:
        call: http.get
        args:
          url: https://www.somewhere.com/callC
        next: third_step

### JSON

    [
      {
        "first_step": {
          "call": "http.get",
          "args": {
            "url": "https://www.somewhere.com/callA"
          },
          "next": "second_step"
        }
      },
      {
        "third_step": {
          "call": "http.get",
          "args": {
            "url": "https://www.somewhere.com/callB"
          },
          "next": "end"
        }
      },
      {
        "second_step": {
          "call": "http.get",
          "args": {
            "url": "https://www.somewhere.com/callC"
          },
          "next": "third_step"
        }
      }
    ]