+

Search Tips   |   Advanced Search

Multiple Iterators in an AssemblyLine

If you have more than one Connector in Iterator mode, these Connectors are stacked in the order in which they appear in the Config (and the Connector List in the Config Editor, in the Feeds section) and are processed one at a time. So, if you are using two Iterators, the first one reads from its data source, passing the resulting Work Entry to the first non-Iterator, until it reaches the end of its data set. When the first Iterator has exhausted its input source, the second Iterator starts reading in data.

An initial Work Entry is treated as coming from an invisible Iterator processed before any other Iterators. This means an IWE is passed to the first non-Iterator in the AssemblyLine, skipping all Iterators during the first cycle. This behavior is visible on the AssemblyLine Flow page in "AssemblyLine and Connector mode flowcharts" in Security Directory Integrator v7.2 Reference Guide.

Assume you have an AssemblyLine with two Iterators, a preceding b. The first Iterator, a, is used until a returns no more entries. Then the AssemblyLine switches to b, ignoring a. If an Initial Work Entry (IWE) is passed to this AssemblyLine, then both Iterators are ignored for the first cycle, after which the AssemblyLine starts calling a.

Sometimes the IWE is used to pass configuration parameters into an AssemblyLine, but not data. However, the presence of an IWE causes Iterators in the AssemblyLine to be skipped during the first cycle. If you do not want this to happen, you must empty out the Work Entry object by calling the task.setWork(null) function in a Prolog script. This causes the first Iterator to operate normally.


Parent topic:

Iterator mode