Repeat

With this node you can repeat a section of a flow one ore more times.

Repeating can be based on:
  • A number that determines the count.
  • The files where the repeat will then select each individual file once.
  • A JSON array where the repeat will then select each item in the array once.

The node has the following configuration options:

  • Mode: here you can specify what needs to be iterated/repeated. Options:
    • Counter: if you select this option, the NR Repeats parameter will determine how many times the repeat flow will be called.
    • Enumerate Files: if you select this option, the files referenced by the Data parameter will be enumerated. Using Data from Previous Node in the repeat flow will select each time one of the referenced files. At the end of the Repeat, all resulting files from the repeat flow will be collected and set as output files of the Repeat Node itself.
    • Enumerate JSON Array: if you select this option, the data referenced by the Data parameter will be enumerated. That referenced data must be an Array. Using Data from Previous Node in the repeat flow will select each time one of the array entries (if the 'Select Sub JSON' option is enabled). At the end of the Repeat, all resulting data from the repeat flow will be collected and set as output data of the Repeat Node itself (if the Update JSON option is enabled).
  • Create Multiple Workables: if you select this checkbox, one workable is created for each iteration, where all those workables will process independently until the repeat is finished. If you leave this checkbox unselected, the repetition is performed on the single workable.
  • Variable name: here you can specify the name of the variable to store the repeat information in. The repeat information contains:
    • The number of times the repeat section will be used.
    • How many times the section was already repeated (the index). This value will be zero the first time the repeat section is used.

    You can set it to an empty string if you don't need this information.

When Mode is set to Counter:
  • Nr Repeats: here you can specify the number of times you want to repeat.
When Mode is set to Enumerate Files or Enumerate JSON Array:
  • Data: here you can specify the data to use while repeating. This can either be a list of files, or it can be JSON data. Select the pencil to open Expression Builder.
When Mode is set to Enumerate JSON Array:
  • Select Sub JSON: here you can specify if you want the Repeat Node to set the selected part of the JSON array that is being iterated as its output data during Repeat. Enable this option to set the data, or disable this option if you do not need this data.
  • Update JSON: here you can specify if you want the Repeat Node to update the JSON array with the output data or the Repeats. Enable this option to update the data, or disable this option if you want to keep the iterated JSON array unchanged. This option can not be used if the iterated JSON array is coming from a variable or if the iterated JSON array is build on the fly.