As discussed earlier, ECMap can automatically create the basic map flow for transaction maps because it has built-in knowledge of the structure of the EDI standard being used. However, since application data is not required to conform to any special standard, ECMap cannot automatically generate flow for any-to-any maps. You must manually create the map flow for any-to-any maps, and you must do this from the Any-to-Any Map Flow window. Unlike transaction maps, there is no ability to assign levels on the Any-to-Any Map window - because of the difference in how data is mapped in the two types of maps. Levels are assigned to data - not rule commands - and in any-to-any maps, rule commands do the actual mapping.
In any-to-any maps, application data is mapped directly to application data, and rule commands perform the mapping. The first time that you open the Any-to-Any Map window, you must define the rule that holds the mapping instructions. Each time that you link source and destination data, a separate rule command is created within the mapping rule.
In addition to the rule that performs the mapping, you must add rule commands to read the input data, write the output data, and perform any necessary manipulations on the data during mapping. Since an any-to-any map involves no Standards data, you must tell the system how and when to read and write the data. You tell the program how to read and write the data when you specify the type of read and write rule commands that should be used.
In any-to-any maps, the I/O rule generally reads the input, the Before Rule usually performs the mapping, and the After Rule normally writes the output. The program automatically invokes the I/O Rule when the any-to-any map is run. If the I/O Rule is successful, the Before Rule is executed and then the After Rule is executed.
When you create an any-to-any map, you assign levels that group the input application data together in a way that is logically related to the grouping of the output application data 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 – it is called 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.
You control the order in which the input application data is read to produce the output application data by the Parent/Child/Sibling levels you assign and 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 any-to-any map – an I/O rule, a Before rule, and an After rule. The I/O rule is always executed. The Before and After rules are executed only if the I/O rule is successful.