Adding a Do While step

You can use a Do While task to sequentially perform a list of tasks as long as a condition is true. The list of tasks is performed first and then the condition is checked.

To add a Do While step:

  1. Locate the Do While icon in the API Flow Modeler.
  2. Drag and drop the icon into the modeler.
  3. On the Properties tab, specify this information:
    Name
    Specify a name for the Do While step.
    Description
    Specify a description for the Do While step.
  4. On the Do While Parameters tab, specify the parameters for the Do While step.

    A parameter can be anything that must be referenced in the Do While condition.

    A parameter can be any static value, or it can be a reference to an input/output parameter that has been defined in any previous tasks.

  5. On the Conditions tab, specify the conditions for the Do While step.

    There are some points of attention:

    • You must define the Do-While condition expression with Javascript (Nashorn).
    • Do While parameters are referenced as $.doWhileParameter.

      For example: if ($.doWhileParameter > 100) true; else false.

    • Do While activities output can be used in expressions to break the loop.

      For example, if there is an activity name 'Activity', you can use an expression similar to 'if ($.Activity != null) true; else false'.

    • Iteration is a reserved keyword that returns the current iteration value.

      The first iteration value starts from 1.