Steps Repetition

Repetition allows you to generate a step several times to run in parallel or sequence.

There are two main methods to repeat steps in a process:

Repeat Steps

To enable step repetition using the result of an XPath Query:

  1. Select the step in the process diagram, right-click and then select Show Properties View.

    • In the Generation section of a step or process:

      • Provide an XPath Query. The step will be generated for each value returned by this query.

      • Provide a Variable Name. This variable will contain each of the values returned by the query and pass them to the step. You can use this variable name in the step code.

      • Specify whether this repetition must be Sequential or Parallel.

  2. Press Ctrl+S to save the process.

This repetition applies to the generation. It can be used for example to create a step for each table in a model.

Repeat Steps for Records

The direct bind link is a specific type of link that allows you to run a target step once for each record returned by a SQL Operation action.

To configure step repetition with a SQL Operation:

  1. Create the first step using a SELECT SQL Operation.

  2. Create a second step of any type, including an INSERT/UPDATE/DELETE SQL Operation. This second step is repeated for each record returned by the select operation.

    • Link the first step to the second one using a Bind Link from the process Palette.

With this configuration, the columns of the records returned by the select operation can be used in the second action using the bind syntax: :{column_name}:, where column_name if the name or alias of the column returned by the SQL Operation.

Bind Link Example
  1. Create a first step that performs a SELECT SQL Operation with the following query:

    SELECT CUST_NAME, CUST_COUNTRY, CUST_CODE
    FROM CUSTOMER
  2. Create a second step uses the Write a file built-in action, with the following value for the output file name (Txt Write Filename) parameter:

    /cust/docs/customer_:\{CUST_CODE\}:_content.txt
  3. Link the first and second steps using a Bind Link.

As a result, one file is written per customer returned by the select statement. The file is named after the customer code (CUST_CODE).

Handling Failures

The execution of a bind link stops by default if one of its iterations fails. The corresponding error is then thrown and the target step is put in error.

You can change this behavior to let all the iterations run, even when an error occurs in one of them, by unchecking the Stop Bind On Error parameter in the Advanced tab of the target step.

This parameter can only be changed on steps targeted by a bind. Moreover, when multiple errors occur during the bind iterations, it is the first encountered that is thrown on the step at the end of the execution.