For outbound maps, the flow is driven by how the input records containing the input data must be read in order to create the output. You can either read the records in the input order or use various techniques to read them in a different order to create the desired output. You first look at the EDI message you want to create. You then look at the application data that will be used to create the message and ask yourself, “How must I read these records to create this output?” Based on this analysis, you assign levels and create rules.
When you create an outbound transaction map, you assign levels that group the application data together in a way that is logically related to the grouping of the segments and elements in the transaction set or message you are creating. ECMap uses family terminology to describe the levels assigned to application data—Parent, Child, and Sibling.
In addition, a special term is used for the first record—the Master record. The Master record is the very first Parent record. Other than the Master record, a Parent record is never explicitly defined in ECMap; instead, a record implicitly becomes a Parent when it is defined as having a Child. A Child record is always one level below its Parent record. A Child record that has the same Parent record as another different Child record is called a Sibling record.
There can be multiple Child records for the same Parent record, and they are all Sibling records. A Child record can be directly below the Master record or it can be below another Child (who implicitly becomes that Child’s Parent) record. The Parent/Child/Sibling terminology used to describe the relationship between the records in the application data is analogous to the Level/Sublevel/Loop terminology applied to the relationship between the segments in EDI data.
You control the order in which the input application data is read to produce the output EDI data by the assignment of the Parent/Child/Sibling levels and by the rules you create—the commands they contain and where the rules occur in the flow. Three rules can take place at a flow point in an outbound map—an I/O rule, a Before rule, and an After rule. If the I/O rule for the flow point is executed successfully, then the Before rule is executed, mapping is done, and the After rule is executed. If the I/O rule is not successful, no mapping takes place and no rules are executed.
Once you have decided how to group your data, you create and assign levels to the flow.