Step 2 of Business Object Wizard displays the Configure Agent dialog box, which shows the ODA's configuration properties. Configuration properties are those properties that the ODA needs to be able to begin running. The ODK API represents a configuration property as an agent-property (AgentProperty) object. In this step, the wizard displays the configuration properties, allows you to update them, and then writes the user-initialized properties into the ODA runtime memory.
Figure 53.
Configure Agent (Step 2) of Business Object Wizard
As Figure 53 shows, Business Object Wizard takes the following actions:
To obtain the configuration properties from the ODA, the wizard calls the getAgentProperties() method, which is defined in the ODA base class, ODKAgentBase2. This method is an abstract method that the ODA developer must implement as part of the ODA class. It returns the ODA's configuration properties to Business Object Wizard as an array of AgentProperty objects. These configuration properties can include the names, types, any valid values, descriptions, input restrictions, and any default values.
In addition to the configuration properties that getAgentProperties() provides, Business Object Wizard always provides a set of standard configuration properties, which are common to all ODAs:
For more information, see Obtaining configuration properties.
Business Object Wizard saves these properties in the ODA runtime memory. Within the ODA, you can access these properties through an instance of the ODKUtility class, which provides the getAgentProperty() and getAllAgentProperties() methods for this purpose.
After it calls getAgentProperties(), Business Object Wizard calls the getMetaData() method of the ODA base class, ODKAgentBase2. This method is an abstract method that the ODA developer must implement as part of the ODA class. It returns an initialized AgentMetaData object that contains the ODA metadata.
To initialize the ODA, the wizard calls the init() method of the ODA base class, ODKAgentBase2. This method is an abstract method that the ODA developer must implement as part of the ODA class. It performs initialization tasks such as resource allocation and creating a connection to the data source.
This chapter provides the following information on how to implement the methods involved in the initialization of an ODA:
Initialization method | For more information |
---|---|
getAgentProperties() | Obtaining configuration properties |
getMetaData() | Initializing ODA metadata |
init() | Initializing the ODA start |