An external class with persistent members provides an interface to connect to an external data source and retrieve data. The schema of the external database or an OLTP view file can be imported into AB Suite.
Note: Presently, external classes with persistent members are not supported on the MCP platform. Hence, you cannot access a DMSII database using external classes. However, you can access external MCP databases by using the existing MCP AccessExternal feature.
Data is retrieved from the data source with a Determine or ForEach command over an instance (variable, parameter, attribute) of the external class for EAE OS 2200 database tables.
The following example illustrates how an external class with persistent members can be instantiated. The Ispec "DemoIspec" with Multiplicity = 1 has an attribute member "MyCustAttribute" with Multiplicity = 1, that inherits from the external class Cust. The method Main() reads the contents of the external class by using a Determine command over MyCustAttribute.
External classes can be created manually or by using the External Class Wizard. Using the wizard requires a schema file or an OLTP view file that is imported to automatically create the external class and its members. Members typically consist of profiles and persistent attributes. Refer to Importing External Data Sources for more information on using the External Class Wizard.
Note: For an imported external class with persistent members, it is recommended that you do not change the Profiles or Attributes because the changes are lost when the class is synchronized with the source RDML file or OLTP view file.
To read an external database, perform the following:
Create a class and set the IsExternal property to True.
Add an attribute for every field in the record as defined in the external data source.
Attributes are limited to the AB Suite Primitive types and must match those in the external data source.
Note: The sequence number is used to determine the order of the columns in an external database table.
Add profiles to retrieve subsets of the records using the views or keys as defined in the external data source.
Right-click the external class and select Properties to set the configuration properties in the ExternalClass Property Pages window.
Refer to External Configuration Properties of the Builder for more information on setting the connection information for external data sources.
Use the Determine command variants to iterate over the external data source for EAE OS 2200 database tables.
Refer to the Agile Business Suite Programming Reference Manual for more information on using the Determine logic command variants and Lookup Every command to read external data from EAE OS 2200 database tables.