Importing External Data Sources

You can create external classes with persistent members by importing the OLTP view file that defines the tables within the external data source. When the source file is imported, it is automatically copied to the project directory (Resources folder in the Solution Explorer view). As the synchronization process uses this file, it is recommended that you always update the source file in the project directory so that the changes are automatically detected. This prevents duplicate source filenames and is useful when you want to version control the solution files.

To import an external data source, perform the following:

  1. Obtain access to the schema file of the external data source and save it on the AB Suite developer machine.

  2. Right-click the element that owns the external class, and select Add, Add New Item….

  3. Select External Class from the Wizards pane in the Add New Item dialog box.

  4. Click Create.

    The Select Data Source box appears.

  5. On the Selection page, browse and select the external data source file.

    For example, an RDML$EXT.txt file or an OLTP (Online Transaction Processing) view file.

  6. Select the tables to be imported from the external data source schema.

    You can select the Select/Deselect All check box to clear all the selected tables and select only those that must be imported.

    Note: You can only select tables but not table members. All the members of the selected tables are imported except those data types that are not supported by AB Suite.

    Click Next.

  7. Confirm the selection and click Finish to return to the model.

    If you select the Display Result check box on the Confirmation page, the Results page shows the progress and displays a message indicating the status of the import process.

  8. Click Close.

    The Output window displays the progress and the status during the creation of external classes. Errors appear in the Output window.

    This imports the structure of the external database. The IsExternal property of the classes is automatically set to True and the class members are persistent.

    The SynchronizeState property of the imported external class is also set to InSync.

  9. Right-click the external class and select Properties to set the configuration properties in the ExternalClass Property Pages window.

  10. Select either Defined Locally or Location in Edit, from the Data Source Location list.

    The Defined Locally option can be used to set the properties within the class configuration. Otherwise, you can select an existing location to specify the predefined configuration information.

    Refer to Data Source properties in System Modeler Locations for more information on setting the properties for the Defined Locally option.

  11. Use the Determine command variants to iterate over the external data source.

    Refer to the Agile Business Suite Programming Reference Manual for more information on using the Determine logic command variants to read external data.