WTX Fundamentals Training LAB 9 Resolving Unresolved Rules In this lab we’ll be using the following materials: WTX Version(s): Maps: v8.3.0.4 Bank_to_XML.mms Trees: fixed_length_flat_file.mtt, XML_Data.mtt, xref.mtt Text Files: bank_data.txt, xref.txt Description: In our last lab we made a change to our Type Tree by removing two Items and using Initiators on two of our groups. This was a fairly insignificant change to our input tree, so we will first determine how this affected our Bank_to_XML.mms map. We will be making changes to our xref.mtt input tree as well as our XML_Data.mtt tree to determine what, if any, issues this will cause us in our map. © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 1 Steps: 1. Open the map named Bank_to_XML.mms, Build, and Run. We notice that although we made some changes to our input tree we didn’t cause any errors to be generated in our map. This is only because the Key_5 and Key_10 Items weren’t mapped to our output: 2. Next we will open the tree named xref.mtt and rename the Record group to Bank: 3. Analyze, Save, and Close the Type Tree. © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 2 4. When we Build our map we notice we now have four errors we will need to resolve: 5. All four errors occur in the functional map named f_Each_Record.Double click on the f_Each_Record map and we see that two objects in the rule containing the LOOKUP function still use the name Record. The reason for this is that the Type Tree Editor and the Map Designer are two separate applications and when a change in made in a Type Tree it does not automatically resolve the Type in the Map. In order to resolve this we need to rename Record to Bank in our mapping rule just as we had done the rename in the Type Tree: =LOOKUP( Bank_Account_Number Field:Record:XRef, Bank_ID Field:Record:XRef = TRIMLEFT( BANK_ID Field:ACCOUNT:In1 )) =LOOKUP( Bank_Account_Number Field:Bank:XRef, Bank_ID Field:Bank:XRef = TRIMLEFT( BANK_ID Field:ACCOUNT:In1 )) 6. Save, Build, and Run the map and the map should complete successfully: © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 3 7. Next we will open our output Type Tree named XML_Data.mtt and rename the Group Doc to Document as shown below: 8. Analyze, Save, and Close the tree. 9. When we go to our top level, executable map we see several issues. We have several Unresolved Rules and we notice that the Output Card no longer can find the output XML objects: © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 4 10. In order to resolve this edit the output card and select Document for the Type: 11. The Unresolved Rules go away and the output card has been restored: © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 5 12. Open the XML_Data.mtt Type Tree again and this time change the Item named account_nbr to account_number. 13. Analyze, Save, and Close the Type Tree. 14. Open the map and we notice we have another Unresolved Rule. This time the output card appear to be valid, but one rule is unable to be resolved. © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 6 15. To resolve this issue drag and drop the rule from the Unresolved Rules tab to the account_number Item as shown below: © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 7 16. Our map should complete successfully: © 2012 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 8