// Dependencies
var ParseFlowElements = require("./flow-elements");

/**
 * flowElements
 *
 * @name flowElements
 * @function
 * @param {Arrayt} _input Raw engine-syntax flow elements.
 * @param {String} instName The instance name.
 * @return {Object} The parsed flow elements.
 */
module.exports = function (_input, instName) {
    return _input.map(function (c) {
        return ParseFlowElements(c, instName, true);
    });
};

@@ -13,25 +13,25 @@
 ies%0A
-var ParseFlowElem
+const parseCompon
 ents
@@ -53,18 +53,121 @@
 low-
-elements%22)
+components%22)%0A    , iterateObject = require(%22iterate-object%22)%0A    , flowTypes = require(%22engine-flow-types%22);%0A    
 ;%0A%0A/
@@ -434,75 +434,277 @@
     
-return _input.map(function (c) %7B%0A        return ParseFlowElements(c
+var parsed = %7B%7D;%0A    iterateObject(_input, (rawEvent, eventName) =%3E %7B%0A        var listener = parsed%5BeventName%5D = new flowTypes.Listener(%0A            eventName,%0A            rawEvent.r,%0A            rawEvent.e%0A        );%0A        listener.addData(parseComponents(rawEvent.d
 , in
@@ -713,14 +713,9 @@
 Name
-, true
+)
 );%0A 
@@ -721,11 +721,30 @@
     %7D);%0A
+    return parsed;%0A
 %7D;%0A

Parse the new flow format