Using Integration Object chaining

An Integration Object in a chain leaves the connection in a state (at a particular screen). After the Integration Object finishes running, another Integration Object that begins in that state (that is, at that screen) can run.

You can use chaining to break up a complex application into multiple tasks, each task represented by an Integration Object. You must ensure that the order of the Integration Objects is correct.

For example, if you have three Integration Objects in a chain (A, B, and C), then you must use A first, then B, then C. If Integration Object C is invoked before Integration Object B, then when C requests its connection, the connection is not available in the correct state, and the Integration Object fails.

Figure 1. Connection lifetime with chaining
connection lifetime with chaining
Figure 1 depicts the lifetime of a connection throughout the execution of three Integration Objects. Integration Object A is configured as first, Integration Object B as middle, and Integration Object C as last. Connection state data represents the connection and the state label of the last Integration Object run.
  1. When Integration Object A begins to run, it retrieves the connection specified in the macro. If checkin screen enabled and a connection is available, the connection is already logged on and ready. If checkin screen is enabled, but a connection is not available, the connection is created and the connect macro (if specified) is run. If checkin screen is disabled, a connection is created and the connect macro (if specified) is run.
  2. Integration Object A runs the associated macro, then saves the connection and its current state for the next invocation. (You would have defined this state as the stop state label during Integration Object chaining).
  3. When Integration Object B begins to run, it retrieves a connection and its state from the connection state data because it is the middle Integration Object. You must have defined Integration Object B's start state label as Integration Object A's stop state label, which allows these Integration Objects to be chained.
  4. When execution completes for Integration Object B, the connection and its state are saved in the connection state data.
  5. Integration Object C also retrieves the connection from the connection state data. When Integration Object C begins to run, it retrieves a connection and its state from the connection state data because it is the last Integration Object. You must have defined Integration Object C's start state label as Integration Object B's stop state label, which allows these Integration Objects to be chained. Last-in-chain Integration Objects have no end labels because the connection is always returned.
  6. When checkin screen is enabled, the connection returns to the pool; otherwise, the disconnect macro (if specified) is run and the connection ends.
Note: Settings for the checkin screen are made by going to the Macro tab of your connection settings. You must enable pooling in order for the checkin screen setting to be available. For more information, see Connection editor.

To build an application using Integration Object chaining with ZIETrans, you must first build the Integration Objects and then create your Web pages from the Integration Objects.

Follow these steps to create your application:
  1. Record macros.
  2. Create chained Integrations Objects from each macro.
  3. Create Web pages for each Integration Object.
Record a Macro

You can record macros in ZIETrans Toolkit using the ZIETrans host terminal. On the ZIETrans host terminal screen, click the Record Macro icon. For information about recording macros, see Macro related icons.

Repeat these steps for each Integration Object you want to create.

Create Integrations Objects from each macro
Once all of your macros are created, you can go to the ZIETrans Project View tab of the ZIETrans Toolkit and expanding the project name, and open the Macros folder.

Right-click on each individual macro and select Create Chained Integration Object. You will have the option of selecting the position in the object chain to either First, Middle or Last. If you select First, the state will be the stop state during Integration Object chaining configuration. If you select Middle, the state can either be the start state, or the stop state. The Last position of the object chain uses the start state.

This needs to be done for all the Integration Objects which are part of the chain.

Create Web pages from each Integration Object.
Once you have created your Integration Objects, you can then create your Web pages. For information about creating Web pages from Integration Objects, see Building Web pages from an Integration Object.