Iterator module in ÃÛ¶¹ÊÓƵ Workfront Fusion
An Iterator module is a special type of module that converts an array into a series of bundles. Each array item is outputted as a separate bundle.
For more information, see Types of modules and Map an array in ÃÛ¶¹ÊÓƵ Workfront Fusion.
Access requirements
You must have the following access to use the functionality in this article:
To find out what plan, license type, or access you have, contact your Workfront administrator.
For information on ÃÛ¶¹ÊÓƵ Workfront Fusion licenses, see ÃÛ¶¹ÊÓƵ Workfront Fusion licenses.
Iterator module configuration
You set up an Iterator module the same you set up any other module. The Array field contains the array to be converted or split into separate bundles.
For more information, see Configure a module’s settings in ÃÛ¶¹ÊÓƵ Workfront Fusion.
-
The below scenario shows how to retrieve emails with attachments and save the attachments as single files in a selected Dropbox folder.
Emails can contain an array of attachments. The Iterator module inserted after the first module will enable you to handle each attachment separately. The Iterator module splits the array of attachments into single bundles. Each bundle, with one attachment, is then saved one at a time in a selected Dropbox folder. The Iterator module set-up is shown above: the Array field should contain the
Attachments
array. -
For your convenience, many Workfront Fusion apps offer specialized Iterator modules with a simplified setup. For example, the Email app contains the special Iterator module Email > Iterate attachments that will produce the same results as the general Iterator module.
Troubleshooting: Mapping panel does not display mappable items under Iterator module
When an Iterator module does not have information about the structure of the array’s items, the mapping panel in the modules following the Iterator module display only 2 items under the Iterator module :Total number of bundles
and Bundle order position
:
This because each module is responsible for providing information about items it outputs so that these items can be properly displayed in the mapping panel in the subsequent modules. However, several modules might be unable to provide this information in some cases; for example, JSON > Parse JSON or Webhooks > Custom Webhook modules with missing Data structure.
The solution is to manually execute the scenario to make the module learn about the items it outputs so it can provide the information to the following modules.
For example, if you have a JSON > Parse JSON module without a Data structure as below:
And then if you connect an Iterator module to it, you will not be able to map the output of the module to the Array field in the setup panel of the Iterator module :
To resolve this, manually start the scenario in the scenario editor. You can un-link the modules after the JSON > Parse JSON module to prevent the flow from proceeding further. Or you can right-click the JSON > Parse JSON module and choose Run this module only from the context menu to execute only the JSON > Parse JSON module.
When the JSON > Parse JSON executes, it learns about the items that it outputs and provides this information to all the subsequent modules, including the Iterator module. The mapping panel in the Iterator’s setup then displays the items:
Moreover, the mapping panel in the modules that are connected after the Iterator module display the items contained in the array’s items:
If you cannot see some items in a module’s mapping panel, run the scenario once so all the modules can learn about the items they output and provide this information to the following modules.