IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > IBM i > Overview of WebSphere Adapter for IBM i > Technical overview

Business object structures

A business object is a structure that consists of data and additional instructions, if any, for processing the data. The adapter uses business objects to represent data queues and IBM i programs such as RPG, COBOL or Service programs running on the IBM i system.


How the adapter uses business objects

Your component communicates with the adapter using business objects. The module uses business objects to access the IBM i data queues or to call IBM programs such as RPG, COBOL, or Service program on the IBM i system. For outbound operations, the adapter converts the business objects in outbound requests into IBM i API calls to access queues and programs. For inbound events, the adapter converts the data in the events into business objects, which are returned to the application.

The operation is not stored in the business object. It is part of the module.


How data is represented in business objects


For data queue business objects

A queue is a data structure for processing work in which the first element added to the queue is the first element processed. This order is referred to as first-in first-out (FIFO). Figure 1.shows a business object on an an IBM i data queue, in the Business Object editor. Each business object has one attribute; for the message content as a string. The absolute path to the data queue (object path) on the IBM i system is not part of the business object. Instead, it is part of the interaction specification properties set in the wizard. Because data queue business objects have no child business objects, all of the attributes are simple attributes.

Figure 1. Business object for putting a message from a customer on a data queue

A Business object for getting a message from a data queue.shows a business object, to get a message from an IBM i data queue.

Figure 2. Business object for getting a message from a data queue

If a maximum entry length restriction for the target data queue in the wizard is set, the adapter will generate a business object with the maxLength property appropriately set for the messageContent attribute.

Though the type of data queue (either FIFO or LIFO) may differ, the operation the adapter performs on the business object is transparent. The business object does not indicate what type of data queue the message is being added to or removed from.


For keyed data queue business objects

Figure 3.shows a business object used to remove and process a message from a keyed IBM i data queue in the business object editor. For keyed data queues, the business object has two attributes: one for the message content and one for the message key. The absolute path to the data queue (object path) on the IBM i system is not part of the business object. Instead, it is part of the interaction specification properties set in the wizard. Because data queue business objects have no child business objects, all of the attributes are simple attributes.

Figure 3. Business object for removing a customer message from a keyed data queue

If a maximum entry length restriction for the target data queue is set in the wizard, the adapter will generate a business object with the maxLength property appropriately set for the messageContent attribute.


For IBM i program business objects

Figure 4.shows a business object used to call an IBM i program such as RPG program or COBOL program or Service program on an IBM i system in the business object editor. To properly invoke an IBM i program on an IBM i system, the business object must contain the attributes corresponding to each input argument the IBM i system needs to run the program as well as those required for gathering the return values.

For example, a PurchaseOrderPGM business object is used to invoke "purchaseorder.pgm" on the IBM i system. The path of the program on the IBM i system is recorded at the interaction specification level.

Figure 4. PurchaseOrderPGM business object

Each PurchaseOrderPGM object contains the arguments required to invoke the program on the IBM i system.


How business objects are created

Business objects can be created through your business object schemas (xsd files) with all the required fields.

For example, when manually creating an IBM i program business object you need to account for application-specific information such as the required fields for invoking an IBM i program on the IBM i system. For data queue business objects, you would need to include attributes indicating the length of the message content for a data queue business object. For keyed data queue business objects, you would need to also include the attribute for the key.

Before xsd files are imported into the wizard, they are called "pre-defined" business objects. The wizard connects to the IBM i system, discovers IBM i objects, and displays them to you. You select the objects for which you want to create business objects. After you specify which business objects you want, the wizard then generates business objects to represent the target IBM i objects that you selected. It also generates other artifacts needed by the adapter.

Technical overview of WebSphere Adapter for IBM i


Related reference:

Business object information