Progress
AppBuilder
Developer’s Guide
Synchronizing SmartDataObjects Using DATA Links
To get the benefits the SmartBusinessObject can provide, you must identify the business hierarchy between the contained SmartDataObjects. You do this using SmartLinks of type DATA. The DATA-SOURCE is always the object that initiates a change and the DATA-TARGET is the object that must respond by staying in sync.
In the situation shown in Figure 4–3, you would create DATA links from the Customer object to the Order object, from Order to OrderLine, and from OrderLine to both Item and Inventory.
Figure 4–4 shows the hierarchy imposed by the DATA links.
Figure 4–4: Resynchronization Hierarchy Defined by DATA SmartLinks
![]()
Before deciding how to organize your DATA links, determine your business focus. If you are interested in both Customer and Order records, which are more central? Are you interested in orders only in connection with a particular customer? Or is your focus the order itself, with customer information being secondary? In the first case, you would create your DATA link from the Customer object to the Order object. In the second case, the link would go in the opposite direction. How you organize the dependencies is a function of your business goals.
NOTE: The SmartBusinessObject itself can be the target of a DATA link from some SmartDataObject outside itself. The effect when resynchronization takes place is exactly as though both objects were combined—the resynchronization process propagates through both objects.Follow these steps to create a synchronizing relationship between two SmartDataObjects within the SmartBusinessObject:
- Create and place the first (controlling) object.
- Create the second (controlled) object, being sure to include at least one field shared with the first object. For example, the CustNum field is common to both the Customer table and the Order table. That field (the foreign field) relates those two tables. Note that the field need not have the same name in both tables, although it often does.
- Place the second object. An Advisor dialog box appears and offers to create a DATA link from the first object. Accept the offer:
![]()
- Another Advisor dialog box appears asking you if you wish to identify the foreign-field (relational) mapping. Unless you have a reason to defer this operation, accept the offer:
![]()
- The Multi-Field Mapping dialog box now opens, presenting you with lists of available fields. Select the field common to both tables, for example CustNum:
![]()
- Choose the Map button. Your selections disappear from the Source and Target lists and reappear as an associated pair in the Mapped Fields field:
![]()
- Create additional associations, if you so desire and there are suitable field pairs. When you have finished, choose OK to close the dialog box. Synchronization between these two SmartDataObjects is now established.
NOTE: The Advisor is not aware of your goal, so it will offer to create a link from any existing object. It is easy to become confused and select the wrong object. If you make such a mistake, use the SmartLinks Editor to correct it.- Repeat from Step 2 for each additional SmartDataObject you place, creating a synchronizing DATA link only from the immediately preceding object.
- When you have linked all the SmartDataObjects appropriately, save your work.
If you were to create the relationships shown in Figure 4–4, they would appear similar to this in the SmartLinks Editor:
![]()
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |