IBM WebSphere Host Access Transformation Services (HATS) V5

Tutorial Module 3

Customizing HATS Applications

Abstract

This tutorial is designed for anyone who wants to learn how to customize HATS applications.  The tutorial is in the form of a lab exercise to a live publicly available host application. This module will cover some customization steps and how to apply different actions based upon recognized screen events.  This will demonstrate the rules based engine that is part of HATS and how transformations are applied to screens depending upon certain events.

Assumptions / Requirements

It is assumed that the user has already installed WebSphere Studio 5.1 and the HATS Studio v5 software on a supported platform.  The platform requirements were covered in the HATS Tutorial - Module 1. It is also assumed that a network connection can be made to the publicly accessible IBM Demonstration  iSeries host at: Connectivity to this host can be tested by using any TN5250 emulator configured for the settings above. A WebSphere application server that meets the requirements for HATS needs to be available if you want to deploy the HATS application to a production WebSphere server.  It is assumed that you are already familiar with the WebSphere application server console.

Topics covered on this tutorial

Review Basic HATS Application Steps

You can reuse the previously  configured HATS application for Module 2 for this tutorial.  If you have a previously configured HATS application that you want to use from Module 2, then skip to the next section and start from there.  Otherwise follow these steps prior to starting the next section.

1. Launch the HATS Studio

2. From the HATS Welcome page , click on "launch the Create HATS Project Wizard" link.

3. The New Project panel will come up.

4. On the Connection Settings panel  enter the following: 5. The Select Default Template panel 6. When the studio finishes building the project files the HATS Project View will open and you will see the project folders on the left.  Expand the folders and examine the files that the studio build for the project.  You can now go the next section to start customizing the HATS application.
 

Customizing the application

This section will introduce you to the HATS customization wizards. You will customize several of the boats application screens and then test the application by running the application in the test server within WebSphere Studio.

1. With the project highlighted in the HATS Project View, right click and select Open  Terminal and select the main connection from the list. This will open the terminal window.  You should see the SignOn screen.



 

2. The next screen should be the OS/400 Main Menu screen or could possibly be a display messages screen.  If the display messages screen appears, press the enter key and the OS/400 Main Menu screen should appear.

3. The OS/400 Main Menu screen is where we will add a Screen Customization. Notice that this is a menu screen with several choices that can be entered on the command line. You will create a transform JSP that will render the menu as a Selection List - Button Table widget in the next steps and also add an input field for the command line.

4. From the HATS terminal click on the Create HATS Screen Customization wizard.  The Screen Customization Name and Destination panel will open.

5. Specify a name and a description for the new Screen Customization.

6. The Select Screen Recognition Criteria panel will come up with a screen capture of the OS/400 Main Menu screen.  Here is where you will define the screen recognition criteria.

7. Notice that in the Select a screen box are the choices of "Use the terminal screen" (selected) and "Use a previously captured screen" (which is grayed out). HATS Studio has the capability of using previously captured screens to do customizations with.  This is great for working remotely because it allows the application developer to work remotely and do screen customizations without being attached to a network accessing the host application in real time.  You just need to have previously captured the screens with the HATS built in screen capture tool, then customize on an iterative basis later.

8. The Select Actions panel will come up. 9. The project files will be built now.  The Os_400MainMenu.jsp file will be built and the Insert Host Component - Screen Region panel should open up now, shown below.  You can sign off the boats application on the iSeriesD host and close the HATS Terminal window now.

10. The Insert Host Component - Screen Region  panel should be open. We want to render the screen menu as a GUI widget on the browser page.

Insert Host Component - Screen Region panel

 

11. The Rendering Option panel will open next, shown below.  From here you select what Rendering Option method to use. As you select different options the Component Preview and Widget Preview panels will change and show you how the component will look on the web page.

Rendering Option panel - Selection list - Links

12. Examine the code added to the JSP, shown below.  Notice that the SelectionListComponent  has been added with the HATS tag on the JSP.

Os_400MainMenu.jsp in HTML editor
b

13. Move the blinking cursor on the Os_400MainMenu.jsp so that it is located below the first HATS:Component tag on the page.

14. Then go to File > Save the JSP or CTRL S to save the changes to the JSP.

Preview of Os_400MainMenu.jsp.

 


 
 
 
 

15. Highlight the application in the HATS Project View.

16. After a while the WebSphere Test Server will load in the Server Perspective and then a browser will start to open the URL to the application. When the first page is in the browser go ahead an sign into the application and press the enter key and navigate through the application to see your screen customization changes.

17. The next page should come up with the transformation applied so that the menu is rendered as links with an input field.

18. You can also test run the HATS application from a browser while the WebSphere Test Server is running the application in the WebSphere Studio.  Simply copy the URL from the browser in the WebSphere Test Server and then open a browser outside WebSphere Studio and then paste the URL into the browser and press the enter key.  The entry servlet for the application should load after a bit and you should see the first screen of the application in the browser and you can work with the application from here.  This way you can view the application like a web user would see the application running on WebSphere.

19. Summary - the above section has stepped you through generating several screen customizations and generating transformations. These steps have demonstrated to you some of  the tasks necessary to customize screens.  These steps can be applied in a similar manner to build other screen customizations and transformations for host screens that the developer might want to customize.

Conclusion

In this tutorial you were shown how to use the screen customization wizards to transform several screens to apply HATS widgets to these screens.

The next tutorial (Module 4) will be a lab exercise using Host Publisher v4 resources with HATS v5.

Copyright:  Licensed Materials - Property of IBM
             (C) Copyright IBM Corp. 2002, 2003  All rights reserved.
             U.S. Government Users Restricted Rights -
             Use, duplication or disclosure restricted by
             GSA ADP Schedule Contract with IBM Corp.