Business Object structure for RPG, COBOL, and Java programs

The business object for the iSeries adapter is a flat business object. The attributes can be input, output or inout parameters. One of the attributes needs to be a key for the business object designer.

Figure 3. The iSeries parent business object
The iSeries parent business object

Also, there is a child attribute of type Connection. This contains information about the connection to the AS/400 machine; the HostName, UserName and Password. These attributes are all mandatory and thus is Required is set true for all of them. This Connection business object is a child attribute to all the iSeries business objects.

Note:
In the iSeries business object, the connection business object's application-specific information can be blank. This is because the business object ASI is not processed by the adapter.

The information within brackets in Figure 5 represents the business object's application-specific information.

Note:
Verb names are not case sensitive. For example, the verb getqueue can be spelt as GETQUEUE or GetQueue.
Figure 4. The iSeries child business object
 iSeries child business objectThe

Figure 5. Example of a RPG business object
Example of a RPG business object

The RPG business object consists of either of the verbs CALLRPG or CALLPGM and the program name (the full path of the IFSFile) is set as the verb's ASI. CALLRPG is used for calling RPG programs and CALLPGM is used to call any PGM (including RPG, COBOL, and Java programs). Apart from the Connection child attribute, the RPG business object has attributes corresponding to the RPG program parameters. The Name of the attribute is same as the name of the corresponding parameter specified in the source program. The MaxLength property of the attributes (representing an RPG Parameter) is derived from the corresponding parameter length specified in the PARM Spec of the source program. If the parameter is a number, the corresponding decimal part's length is also mentioned in the ASI as DecimalPositions=n and packedDec=true.

The adapter can be used to call a PGM multiple times with a single Request business object with multiple instances. An example is shown in Figure 6.

Figure 6. Single Request business object with multiple instances
Single Request business object with multiple instances

Figure 7 shows the Parent business object with connection information and the Child business object with the PGM's parameter information. The connection information is available in the Connection business object and the Verb ASI is the same as the path of the program to be called.

Figure 7. Parent business object with connection information
Parent business object with connection information

The child business object is shown in Figure 8 with attributes corresponding to parameter information of the program.

Figure 8. Child business object with corresponding parameter information
Child business object with corresponding parameter information

The example in Figure 9 shows a Business object with 2 instances of multi_child Business Object, thus the program will be executed twice. Make sure you use the appropriate XSD files for Multi record retrieval.

Figure 9. Business object with 2 instances of a multi-child business object
Business object with 2 instances of a multi-child business object

Connector business object processing

The connector passes business objects between the integration broker and the AS/400 system.

When an integration broker passes a business object to the connector, the connector performs the following operations:

  1. Uses the information in the connection child attribute to connect to the AS/400 system.
  2. Builds the parameter list for the RPG program based on the attributes in the business object.
  3. Executes the RPG program corresponding to the business object.
  4. Returns the result of executing the program: success or failure.

Use Business Object Designer ODA to create the business objects. Create the business object definition, and add the required attributes. Then configure the connector to support the business object. For more information regarding the Business Object Designer ODA, see Creating and modifying business objects.

Copyright IBM Corporation 2003, 2005. All Rights Reserved.