Progress
AppBuilder
Developer’s Guide
Creating an XML Map File
The basic process in creating a map file is straightforward:
Selecting SmartObjects for Mapping
The SmartB2BObject always transforms data on behalf of some other object. You must identify at least one such object—typically a SmartDataObject or SmartBusinessObject—before you can begin mapping nodes. Follow these steps:
- Choose the Object tab. The view changes:
NOTE: You can edit any ObjectName here, but no two listed objects can have the same ObjectName. If you change an ObjectName, the new name must be locally unique (in other words, unique within the list you are creating here).- Choose the Add button. Select an object that can serve as a DATA-SOURCE or DATA-TARGET, depending on the type of map file you are creating. Its ObjectName property will appear in the fill-in and its filename will appear in the list box.
NOTE: If you intend to use conversion functions that reside in the SmartB2BObject, you must Add that object to this list as well.- Repeat Step 2 until you have identified all the objects you will use.
If you make a mistake when adding an object, select it in the list and choose the Remove button. Note that you can remove an object from the list at any time. Even if you have already mapped nodes to the object, the mappings will go away cleanly if you remove the object name from the list.
- Select the mode of this map file: inbound (consumer) or outbound (producer).
- Choose the Browse button and identify the SmartContainer that holds the SmartB2BObject that will use this map file. You can omit this step if this is the only document type your application will produce/consume.
- Choose File
Save to save your work.
You are now ready to begin the mapping process itself.
Mapping Schema Nodes
As the SmartB2BObject parses some logical document, it consults the map file you created for that document type. That map file must contain a mapping association for every element of the document. As the SmartB2BObject identifies an element in the document, it creates a transformation based on the association you supplied.
To create an association, follow these steps:
- Select a node in the tree view. Click the Map tab, if necessary:
![]()
- Pull down the Object list and select the object that will supply the association for this node:
![]()
- Select the appropriate radio button to refine the association. You can choose to map the node to:
- The whole object, if you intend to loop through multiple records (outbound side) or to CREATE, FIND, or DELETE the node, or UPDATE it or its children (inbound)
- Some particular field supplied by the object, if the node does not have children
- Some procedure or function, if the node does not have children
See the "Mapping Options" section for more information.
- The display changes to reflect your choice:
![]()
Complete the association by selecting the exact mapping ( see the "Mapping Options" section for more information):
- If mapping the whole node in an inbound document, select the action to be performed (Update–may exist, Update–must exist, Create only, Delete, Find):
![]()
- If mapping to or from a column that you will filter through a SmartB2BObject function, select the column identifier before you select the function identifier:
![]()
- If mapping to a procedure, or to a function not in the SmartB2BObject, select it from the list that appears after you choose the radio button.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |