The iterator construct in Flogo enables the iteration of a single activity. The configuration elements are associated with that activity. In Flogo, you can iterate only over a single activity. The iterator acts much like a foreach loop in any procedural language. If you need to iterate over multiple activity calls, simply place an iterator on a subflow.
Iterators are associated with an activity. The activity must have the type declared and set to iterator, as well as the iterate setting defined and the value would be either the array to iterate over or a scalar value.
{
"id": "log_2",
"type": "iterator",
"name": "Log",
"description": "Logs a message",
"settings": {
"iterate": 1
},
"activity": {
"ref": "#log",
"input": {
"addDetails": false,
"message": "=string.concat(\"Hello \", $flow.name)"
}
}
}
A few important things to note:
The $iterate scope has two properties: