Integration Object Chaining allows you to create Web Applications that are easier to maintain and that can have quicker response times. With chaining, multiple Integration Objects use the same terminal connection. When you begin executing an Integration Object with chaining, you reserve a particular host terminal connection that belongs to one and only one Web client. No other clients may use the reserved connection until the final Integration Object in the chain has finished executing.
Chained Integration Objects require a host session to be in a particular state, or screen, and they leave the session in another state. If one Host Access Integration Object starts where another Host Access Integration Object ends, the two Integration Objects are considered chainable. You can chain together Integration Objects that share the same host connection to create an application with several tasks represented by Integration Object subtasks.
For example, you could have one Integration Object that starts an application. Several other Integration Objects would contain tasks a user might want to perform in the application. The user might want to complete some, none, or all of these tasks. A final Integration Object would exit the application. In this example, we are going to have two Integration Objects. The first Integration Object is going to connect to the Host and search for an author and the second Integration Object is going to retrieve details on a selected title and disconnect from the Host.
Initialization
We will use IBM WebSphere Host Publisher Host Access to create the two chained Integration Objects, then combine them using Host Publisher Studio.
The Welcome screen appears. Click Next.
Select Create a new Integration Object, then click Next.
The Host Configuration page appears. You can configure a default connection pool, Create a new pool, or Share an existing session pool. For the Chaining example, select Create a new pool. The new pool will be used to create all of the Integration Objects in the chain. You must supply the pool name. Since we are using the same database as the Basic_Example, for the Connection Information select Share an existing connection configuration. We will call our new pool chain_pool. When you are finish, click Next.
The User List Configuration page appears. You can choose to define a list of users that will be associated with the pool we are creating. The user IDs and passwords can be inserted in the Connect Macro for logging on the system. For each user, click Add and fill in the description, user ID and Password, then click OK. For this example, this is not necessary since the University of Michigan library's database does not require you to have a user ID and password. We will select Share an existing user list, making sure the list name is "none", and click Next.
First Integration Object - First In Chain
Now you will begin recording the Connect Macro and the first Data Macro for this new connection pool. The Connect/Disconnect Macros you define will be associated with the chain_pool connection pool. Each Integration Object that uses the chain_pool connection pool will use the same Connect/Disconnect Macros. We are doing a search Integration Object which will allow us to search for books by a particular author. After typing an author you will be able to view the results found.
To indicate that an Integration Object is the First element in the Chain, from the Options menu, select Configure Object Chaining. You can do this at any point while you are building this Integration Object.
The Configure Object chaining page appears. Check the Enable object chaining for this Integration Object box, then choose First, Middle, or Last. Once you select the Position in object chain, the corresponding start or stop state label box appears. We are creating the Integration Object in the First position in the object chain. There is only a Stop state label associated with this object. Remember the value (although you can find it later) of the label. This value will be used for subsequent Integration Objects positioned in the same chain. Once you have filled in the necessary information, click OK. This Integration Object is now in the first position in the chain.
We are now ready to begin the Connect Macro. Click Next.
The Define Screen page appears. This page is not yet defined in the Integration Object; therefore you are asked to Define the Screen. It is easier when recording Macros to identify screens by meaningful names rather than the default values presented to the users. For example, to uniquely identify this screen, we call it Database Selection Menu Screen instead of Screen1. After you define a name for this screen, click Next.
The Add Recognition Criterion to Screen Definition appears. This page allows you to choose how you want the Integration Object to remember this screen. Text area allows you to choose specific text on the screen, Number of fields allows you to choose the number of total fields on the screen or the number of input fields, Cursor position allows you to recognize the screen by the position of the cursor, and then there is an Advanced choice that you can read about in Help. Remember that you must uniquely define each screen. For this example, we are going to select Advanced Color at cursor position and click Next. This will allow us to recognize the screen by the color at a single location.
The Color at Cursor Position screen appears. For this screen we are going to choose the position two spaces after Database Selection: located in the lower left-hand corner of the screen. This location was chosen so that when the web application is created in Host Publisher Studio, you can be sure that the full screen has been received. The information located in the boxes is immediately filled in when you choose the cursor position. Click Next.
The Screen Definition screen appears. This screen allows you to add additional criteria for recognizing a screen should you choose to do so. Click Add to choose additional criteria for recognizing this screen.
The Add Recognition Criterion to Screen Definition appears. Select Text area and click Next.
The Text Area Recognition screen appears. We will recognize this logon screen by the Database Selection Menu unique text. Use the cursor to draw a box around the unique text, indicate that we will recognize the text At the specified position, and click Next.
The Screen Definition appears. The different criteria that you have chosen to recognize the screen by appears in the table. Click Next.
You have now completed the Connect Macro. The wizard states that when you are ready to move to the Data Macro, click Next. We are going to begin recording our Data Macro and gather data. Click Next.
The Begin Data Macro screen appears. In this example, we are going to collect data, so select Gather Data and click Next.
We will navigate to the point where we want to capture data. Enter the database selection "MCAT" in capital letters then press the Enter key.
The Unrecognized Screen appears. Click Yes to create a definition for this screen.
The New Screen Definition screen appears. Rename the screen from Screen2 to Introduction Screen, then click Next.
The Add Recognition Criterion to Screen Definition appears. For this example, we are going to select Text area and click Next.
The Text Area Recognition screen appears. Draw a box around the specified text on the terminal. In this case, it is the word Introduction in the upper right-hand corner of the screen. Select At the specified position and click Next.
The Screen Definition appears. Click Next.
Type a= and select Insert Input Variable from the Icon bar. You are creating an input variable that allows the user to input different names when the Integration Object runs.
The Insert Input Variable box appears. The user must type a Variable name value. In this example, we type author_input. In addition, a value must be provided for the variable for the purposes of recording the Integration Object. This value will NOT be remembered or used in the Integration Object itself. It will only be used during recording. Click OK.
Press Enter on the keyboard.
The Unrecognized Screen appears. Click Yes to create a definition for this screen.
Rename the screen to Search Results Screen. Click Next.
The Add Recognition Criterion to Screen Definition appears. For this example, we are going to select Text area and click Next.
We recognize this page by the unique text of Search Results and we select At the specified position. Click Next.
The Screen Definition appears. Click Next.
We are now at the point where we want to capture data. Click Next to enable the user to gather data.
The Select Data screen now appears. Choose Select data on the terminal, then use the mouse to draw a box around the search results. Click Next.
You are now asked if you want to extract data as a table, or as plain text. For this example, we chose Extract data as a table. Click Next.
The Extract Data screen appears. Provide a value for the output information. Remember this information because you will need it when publishing the Integration Object. We will use author_results as the output value. Click Next.
The Select Column Names screen appears. You can either use values on the screen as table headers by selecting text on the screen, or use default values by select Next. You can change these names when you use the Studio. Therefore, let the header names default and click Next.
The Data Table screen appears. Select the column name and provide an identifiable value. In this example, the header was allowed to default to column0, which we changed to number and column1 to book_titles. After values are provided for all of the column headers, click Next.
The Finish Data Extraction screen appears. Select Finished extracting data, then click Next.
We are now done recording the first Integration Object. We want to stop this object at the Search Results Page. The other object in this chain will begin at the same point, which is the Search Results Screen. Click Stop Macro.
Click Yes.
Save this Integration Object as Chaining_Example1. Click Save.
The Integration Object has been created successfully. Click OK. You are now ready to create the other Integration Object.
Second Integration Object - Last In Chain
You are now ready to create the other object in the chain. From the File menu, select New to create a new Integration Object. Navigate to the Host Configuration page.
You are asked again if you want to Configure a default connection pool, Create a new pool, or share an existing session pool. All objects in a chain MUST use the same connection pool. Therefore, select Share an existing connection pool, and select the name of the pool we created (chain_pool). All the values are filled in. Click Next.
You are asked if you want to run the Connect Macro. Click Yes.
The Connect Macro associated with the pool runs, logging you onto the system. Once this is done, the Begin recording box appears informing the user that he is now ready to record the Data Macro. You are NOT automatically thrown into the Record state. You must indicate when you are ready to begin recording. Click OK.
You are now at the Gather Data Macro Screen. We want to begin this Data Macro where the first Integration Object ended. To do this we can choose to Play another macro and that will place us at the end point of the last Integration Object.
Open the previous Integration Object Chaining_Example1.macro.
Click Play.
You are asked to input a name. To receive the same information from the previous Integration Object, you must enter the same name. Enter king stephen and click OK.
The extracted data is displayed. Click Continue until all the data has been displayed.
The Macro has completed playing. Click OK.
We are now ready to record the next Integration Object. Choose Configure Object Chaining.
The Configure Object chaining page appears. Check the Enable object chaining for this Integration Object box, then choose First, Middle, or Last. Once you select the Position in object chain, the corresponding start or stop state label box appears. We are creating the Integration Object in the Last position in the object chain. There is only a Start state label associated with this object. This value is the same as the value entered in the previous Integration Object. The place where the first Integration Object ended is the place where the Second Integration Object begins. Once you have filled in the necessary information, click OK. This Integration Object is now in the last position in the chain.
You must be at the stopping point of the first Integration Object, Search Results Screen. You are now ready to record the Data Macro. Click Record Macro on the icon bar.
The Unrecognized Screen appears. Click Yes to create a definition for this screen.
You must identify this screen. Again, we will call this screen Search Results Screen, and use the same text to define the screen. We are now ready to search under a particular title.
Click Next.
Select the Insert Input Variable icon from the tool bar. You are creating an input variable that allows the user to input different numbers when the Integration Object runs.
The Insert Input Variable box appears. The user must type a Variable name value. In this example, we type number_input. In addition, a value must be provided for the variable for the purposes of recording the Integration Object. This value will NOT be remembered or used in the Integration Object itself. It will only be used during recording. Click OK.
Press Enter on the keyboard.
The Unrecognized Screen appears. Click Yes to create a definition for this screen.
Rename the screen to Book Screen. Click Next.
We are going to recognize this screen by the Text area. Click Next.
Draw a box around the unique text of Book and we select At the specified position. Click Next.
The Screen Definition appears. Click Next.
We are now at the point where we want to capture data. Click Next to enable the user to gather data.
The Select Data screen now appears. Choose Select data on the terminal, then use the mouse to draw a box around the search results. Click Next.
You are now asked if you want to extract data as a table, or as plain text. For this example, we chose Extract data as plain text. Click Next.
The Text Extraction screen appears. Provide a value for the output information. We will use book_information as the output value. Click Next.
The Finish Data Extraction screen appears. Select Finished capturing data, then click Next.
To finish recording this Macro type STA and press Enter.
You are now ready to record the Disconnect Macro. Click Next.
The Disconnect Your Session screen appears. Disconnect from the screen by typing "exit" and press Enter. Look at the left-hand side. The key strokes you entered to disconnect from the session are recorded in the Disconnect Macro.
To disconnect from the session click Next.
The Save Integration Object screen appears. Click Next to save this Integration object (or use File->Save menu).
Save this Integration Object as Chaining_Example2. Click Save.
The Integration Object has been created successfully. Click OK.
This Integration Object is now complete. You are now ready to create
your Web Application. For detailed instructions click
Host Publisher Studio:
Chaining_Example .