{
  "source": "iteratorGroup.js",
  "hidden": false,
  "type": "group",
  "method": "iterate",
  "definitions": {
    "name": {
      "type": "string"
    }
  },
  "input-schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "collection": {
        "description": "A collection to iterate on. For each entry in the collection, the given iteratee (sub flow) is invoked.",
        "type": "any",
        "required": true
      },
      "options": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "parallel": {
            "title" :"parallel?",
            "type": "boolean",
            "description": "When set, invokes the flow in parallel for each item.",
            "format" : "plain"
          },
          "limit": {
            "title" :"parallel limit",
            "type": "integer",
            "depends": {
              "expression": "{input.options.parallel}"
            },
            "description": "Max number of parallel instances to be invoked."
          },
          "excludeEmpty": {
            "title" :"exclude empty results?",
            "type": "boolean",
            "depends": {
              "expression": "{input.options.parallel}"
            },
            "description": "When set will exclude empty results from the output. Useful for skipping values from output array.",
            "format" : "plain"
          }
        }
      }
    }
  },
  "groups": {
    "default": {
      "start": {
        "schema": {
          "expression": "{$extractItemSchemaWithIndex(input.collection)}"
        }
      },
      "end": {
        "schema": {
          "type": "any"
        },
        "input-schema-builder": true
      }
    }
  },
  "output-schema": {
    "type": "array",
    "items": {
      "expression": "{groups.default.endSchema}"
    }
  },
  "meta": {
    "name": "iterateGroup",
    "description": "Iterate a group of steps over each element in a specified collection (Array or Object).",
    "sort_index": 6,
    "icon": {
      "type": "fa",
      "name": "repeat",
      "color":"#747CA3"
    }
  }
}