Using Host Access Transformation Services (HATS)
With IBM® Rational® Host Access Transformation
Services (HATS), you can create Web applications, including portlets, and rich client applications
that provide an easy-to-use graphical user interface (GUI) for your
3270 applications running on IBM System z® platforms and your
5250 applications running on IBM i operating system platforms. HATS
applications can access 5250 applications without requiring Online
Transaction Processing (OLTP) capacity. In this book, these character-based
3270 and 5250 applications are referred to as host applications.
You can also create service-oriented architecture
(SOA) assets using Web services that provide standard programming
interfaces to business logic and transactions contained within host applications.
Data from virtual terminal (VT) emulation screens can also be accessed.
HATS applications can be given a modern appearance.
HATS Web applications, including portlets, can be developed with an
interface that matches your company's Web or portal pages, and your
users can access them through their Web browsers. HATS Web applications can also be developed to provide
access to your host applications from mobile
devices such as cellular phones, data collection terminals, and personal
digital assistants (PDAs).
HATS rich client applications can be developed to
run in an Eclipse Rich Client Platform (RCP) implementation, in Lotus Notes®,
or in the Lotus® Expeditor Client to provide native client applications targeted
for a user's desktop. For more information about the Eclipse RCP environment
see http://www.eclipse.org/home/categories/rcp.php.
For more information about Lotus Notes see the Lotus Notes Information
center at http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp.
For more information about the Lotus Expeditor Client see the Lotus Expeditor Information Center
at http://publib.boulder.ibm.com/infocenter/ledoc/v6r2/index.jsp.
For information on what is new in HATS V7.5.1 see HATS Getting Started.
Note:
Throughout this document, configuration
settings that apply only to HATS Web applications, including portlet
and EJB applications unless otherwise noted, are marked with Web-only .
Configuration settings that apply only to HATS rich client platform applications are marked with RCP-only .
HATS has two components:
- The HATS Toolkit is a set of plug-ins for
the Eclipse-based IBM Rational Software Delivery Platform (Rational SDP). For more on which
versions of Rational SDP are supported, see the section, Prerequisites, in HATS Getting Started.
The HATS Toolkit enables you to develop
new applications, including portlets, a step at a
time, previewing and saving each change you make. Over time,
or as quickly as you like, you can streamline your HATS
application, making it easier to use than the host applications
whose data it presents, and possibly moving functions from the host applications
into your HATS applications. The development process for building HATS Web and rich client applications
is similar. For more information, see Understanding HATS application development.
After you
have developed a HATS application, you deploy it to a production
runtime environment.
-
The HATS runtime code runs as part of a HATS application
deployed in the production runtime environment, WebSphere® Application Server, WebSphere Portal, or rich client platform.
Users interact with the HATS application through the HATS GUI and
data is sent back and forth between the user and the host application.
For more information see Developing and deploying HATS Web applications and Developing and deploying HATS rich client applications.
Understanding HATS key concepts and objects
This section explains key concepts and objects of HATS, some
of which are described in Understanding HATS application processing. Many key objects in HATS are
created using a wizard, but are viewed or modified after creation
using an editor.
- Project
- A collection of HATS resources (also called artifacts)
that are created using HATS Toolkit wizards and customized using HATS Toolkit editors.
These resources are exported as a HATS application. There are five
types of HATS projects; Web, portlet, EJB, rich client, and for purposes of administering HATS Web (including
portlet and EJB) applications, HATS administrative console projects. For
more information see Developing and deploying HATS Web applications.
- Event
- A HATS resource that performs a set of actions
based on a certain state being reached. There are two types of HATS
events, application events and screen events.
- Application event
- A HATS event that is triggered by state changes in the application's
life cycle. Examples of application events include a user first accessing
a HATS application (a Start event), or an application encountering
an unrecognized screen (an Unmatched Screen event). For more information
see Application events.
- Screen event
- A HATS event that is triggered when a host screen is recognized
by matching specific screen recognition criteria. There are two types
of screen events, screen customizations and screen combinations.
- Screen customization
- A HATS screen event designed to perform a set
of actions when a host screen is recognized. Examples of screen customizations
include recognizing a screen and transforming it into a GUI for the
user or playing a macro to skip the screen. The screen customization
definition includes a set of screen recognition criteria and a list
of actions to be taken when a host screen matches the screen recognition
criteria. Screen-level global rules and text replacement settings
are also included. For more information see Working with screen events.
- Screen combination
- A HATS screen event designed to gather output data from consecutive, similar host screens, combine it, and
display it in a single output page. An example of a screen combination
includes recognizing a screen that contains only partial data and
navigating through all subsequent screens to gather all of the remaining
data to display for the user. The screen combination definition includes
a set of screen recognition criteria for both the beginning and ending
screens to be combined, how to navigate from screen to screen, and
the component and widget to use to recognize and render the data gathered
from each screen. Also, it includes a list actions
to be performed one or more times, screen-level global rules and text
replacement settings. For more information see Working with screen events.
- Screen recognition criteria
- When you create a screen event, you set
screen recognition criteria that HATS uses to match one or more screens.
Host screens can be recognized by any combination of criteria including
how many fields or input fields are on the screen, the coordinates
of the cursor's position, and text strings on the screen within a
defined rectangle or anywhere on the screen. You can also use global
variables, color, compare region to value and compare region to region
criteria for screen recognition criteria.
When a host displays a
screen, HATS determines whether the current
host screen matches any of the screen recognition criteria you set
in any screen event in your project. If HATS
finds a match, the defined actions for the screen event are
performed.
For more information about setting screen recognition
criteria, see Screen Recognition Criteria or Begin Screen.
- Action
- A step that is taken when an event occurs, such as when a host
screen is encountered that matches the screen recognition criteria
that is specified for a screen event. A list
of actions is part of the definition of each application event
and screen event.
- Transformation
- A JavaServer Pages (JSP) file
(for Web projects) or a Standard Widgets Toolkit (SWT) composite (for rich client projects)
that defines how host components should be extracted and displayed
using widgets in a GUI. Applying a transformation is one of the
possible actions of a screen event. You can
edit transformations in a WYSIWYG fashion, dragging HATS components
from the palette, and modifying settings from the HATS Properties
view. The Java™ client
application editor (VE), also referred to as the Visual Editor, must
be installed in order to edit rich client transformations in a WYSIWYG
fashion.
For more information about creating transformations,
see Working with transformations.
- Host components
- Host components are HATS objects that are responsible for recognizing
elements of the host screen (such as command lines, function keys,
and so on) that you present to the user of the HATS application.
You can use the set of host components that HATS supplies, or you can
create your own.
For more information about selecting host components to
use with your HATS project, see Insert Host Component.
For more information about using the wizard
to create custom components and widgets, see the HATS Web Application Programmer's Guide or the HATS Rich Client Platform Programmer's Guide, depending on your application environment.
- Widgets
- Widgets are HATS objects that are responsible for creating
the GUI output for host components in the HATS presentation.
For example, you can convert function key host components into button widgets allowing
the user to see the function keys as push buttons in the HATS application.
You can use the widgets that come with HATS, or you can create your
own.
For more information about selecting widgets to use with your HATS project,
see Insert Host Component.
For more information about using the wizard
to create custom components and widgets, see the HATS Web Application Programmer's Guide or the HATS Rich Client Platform Programmer's Guide, depending on your application environment.
- Connection
- A set of parameters used by HATS to connect to host applications.
There are two types of connections in HATS, default (also referred
to as transformation) and background. Each HATS application has one
default connection for the host application whose screens HATS will
transform. Background connections are any connections in a HATS application
other than the default connection. HATS does not transform screens
from background connections. It is possible, however,
to dynamically choose which connection will be treated as the default
connection. For more information, see Managing connections.
- Global rules
- Rules specifying the screen-level or project-level replacement
of a certain type of host input field with a particular widget using
transformation fragments. The transformation fragment contains the
content you want to use to replace all occurrences
of a pattern in any given transformation.
Note:
Global rules
can be turned off for a particular usage of a transformation by editing
the transformation action of a screen event.
For more information, see Rendering.
- Default rendering
- The method used by HATS to render a host screen for which no
specific screen event exists. Default
rendering can also be used in a specific transformation to apply to
a defined area of a host screen. For more information, see Rendering.
- Text replacement
- Text replacement is used at the project level
or the screen level to transform text on your host screens into
images, HTML Web-only , or other text on your GUI
transformation. For more information, see Text replacement.
- Template
- A JSP file (for Web projects) or a Java SWT composite class (for rich client projects) that
enables you to enhance the appearance of your project. When creating
a HATS project, you select a template to use as the default template
for your project. The template can contain company logos and information
and links to other pages. You can select your default from the sample
templates that are provided with HATS, or you can design custom
templates for your projects using the template wizard and editor in the HATS Toolkit. You can also create a template prefilled
from an existing file, or for Web projects, prefilled
from a URL.
In the GUI, the template surrounds the area where
the transformation appears. You can apply a template other than the
default template as a result of a screen event.
For more information about associating a template with a transformation,
see Using templates.
- Business logic
- Any Java code that is
invoked as an action in an event, such as a screen customization.
Business logic is specific to the application.
For more information about business logic,
see the HATS Web Application Programmer's Guide or the HATS Rich Client Platform Programmer's Guide, depending on your application
environment.
- Global variable
- A variable that is used to store a value that can be used throughout
the lifetime of a HATS application instance.
The value of a global variable can be extracted from a host screen
or defined by the developer. Global variables can be used in templates,
transformations, screen event actions, or recognition
criteria. They can also be shared among Web applications
in an enterprise archive (.ear) file or among rich client applications
running in the same rich client environment. Global variables
can be indexed and can also be used in macros, business logic, and
Integration Objects.
For more information about global variables,
see Interacting with global variables.
- Macro
- An XML script that defines a set of screens and certain actions
that should be taken on those screens. Use macros to automate user
interactions with the host. You can record and play macros to skip
screens, loop, prompt users for data input (or insert data yourself
or with global variables), and extract host screen information.
Macros
can be used in different ways in a HATS application:
- A macro can be played on the default connection
as part of a Play macro action of a
HATS event. It must be the last action that is defined for a screen event.
- A macro can be played on a background connection as part of a Perform macro transaction action of a HATS
event.
- A macro can be played by adding Macro buttons to a transformation.
This enables a user to control whether the macro is played or not.
- A macro can be played by an Integration Object.
- A connect macro can be used to prime a connection.
- A disconnect macro can be used to clean up a connection.
For more information about incorporating macros into the HATS environment,
see Macros and host terminal.
- Integration Objects
- Java objects that are
created from a macro that can be used as building
blocks for WebSphere applications.
Integration Objects are Java beans
that encapsulate interactions with host data
sources. These data sources include terminal-oriented applications
that use 3270, 5250, and virtual terminal (VT) data.
Integration
Objects sharing the same connection can be grouped together to achieve
a single major task within your HATS application. This is called Integration
Object chaining. For more information, see Using Integration Objects.
- Host terminal
- A connection in the HATS Toolkit to a live
host. Using the host terminal, you can capture screens, create screen events and transformations, and record and
edit macros. You can also play previously recorded or imported macros.
The host terminal also allows you to preview your screen as a GUI.
- Display terminal
- A terminal window that displays host screens you
can use while testing and debugging to observe interactions between
a HATS application and a host application at runtime. You can also
interact with the host application using host screens in the terminal
window. For more information about the display terminal, see Using display terminal for testing and debugging.
- Screen capture
- An XML representation of a host screen, used to create or customize
a screen event, transformation, or global rule.
- Run on Server Web-only
- A
function in Rational SDP that enables you to test your HATS Web and
portlet projects in a WebSphere Application
Server or WebSphere Portal
instance, as appropriate. In this mode you can modify and test the
runtime settings, defined in the runtime.properties file, that are
deployed to the runtime environment. Be aware that any changes made
to the runtime settings while testing in this mode are retained and
become effective when you deploy the HATS application to a runtime
environment. For more information about changing runtime settings,
see Administering problem determination components.
- Debug on Server Web-only
- Same as Run on Server, and in addition enables you to:
- Use the display terminal to see host screens as they are navigated
while testing your project.
- See debug messages in the Rational SDP console.
- See changes you make to your project, for example
changing the template or a transformation, without having to restart
your application on the test server.
- Modify and test runtime settings, defined in the
runtime-debug.properties file, without modifying the settings, defined
in the runtime.properties file, that are deployed to the runtime environment.
- Step through Java code,
such as HATS business logic.
- Profile on Server Web-only
- Same as Run on Server, and in addition enables you to locate
the operations that require the most time, and identify actions that
are repeated, to eliminate redundancy. You can use this function for
performance analysis, helping you to get a better understanding of
your application.
- Run RCP-only
- A function in Rational SDP that enables you to test your HATS rich client projects
in an Eclipse, Lotus Notes, or Lotus Expeditor Client instance.
In this mode you can modify and test the runtime settings, defined
in the runtime.properties file, that are deployed to the runtime environment.
Be aware that any changes made to the runtime settings while testing
in this mode are retained and become effective when you deploy the
HATS application to a runtime environment. For more information about
changing runtime settings, see Administering HATS rich client applications.
- Debug RCP-only
- Same as Run, and in addition enables you to:
- Use the display terminal to see host screens as they are navigated
while testing your project.
- See debug messages in the Rational SDP console.
- See changes you make to your project, for example
changing the template or a transformation, without having to restart
your application.
- Modify and test runtime settings, defined in the
runtime-debug.properties file, without changing the runtime settings,
defined in the runtime.properties file, that are deployed to the runtime
environment.
- Step through Java code,
such as HATS business logic.
- Profile RCP-only
- Same as Run, and in addition enables you to locate the operations
that require the most time, and identify actions that are repeated,
to eliminate redundancy. You can use this function for performance
analysis, helping you to get a better understanding of your application.
- Print support
- The ability for a developer to specify a printer session to
be associated with a host session, and enable the user to view host
application print jobs, send them to a printer, or save them to disk. Print
support is available only for the default connection.
For
more information about print support, see Enabling print support.
- Keyboard support
- The ability for a developer to enable a user to use a physical
keyboard to interact with the host when the application is run in
a GUI. The developer also decides whether to
include a host keypad, an application keypad, or both, in a project.
If the keypads are included, the developer decides which keys are
included and how those keys and the keypad appear in the GUI.
For
more information about keyboard support, see Enabling keyboard support.
- Keypad support
- The host keypad is a table of buttons or links that enable users
to interact with the host as if they pressed the physical keys on
a keyboard. However, the users can still use the physical keys on
the keyboard instead of the buttons or links on the host keypad. For
more information about host keypad, see Host keypad
The
application keypad is a table of buttons or links that enable users
to perform tasks that are related to the HATS application, such as
viewing their print jobs or refreshing the screen. For more information
about application keypad, see Application keypad.
Understanding HATS application processing
Before creating a HATS project, you should understand how HATS processes
host applications. As users access each screen of an application, HATS processes
the application as described in the following steps. Figure 1 shows the flow of these steps. Key concepts are
described in Understanding HATS key concepts and objects.
-
When the host displays a screen, HATS compares the
host screen to the set of screen recognition criteria that is defined
in each of the project's enabled screen events,
in the order that is defined by event priority, until a match is found.
- When a match is found, HATS performs the actions that are defined
for the screen event. For both screen customization
and screen combination events, these can include the actions listed
below. For a screen combination event, in addition, HATS navigates
through multiple screens gathering data from each screen to display
to the user.
- Apply a transformation using the associated template. HATS displays
any host components (defined in the transformation) as GUI widgets.
- Execute business logic
- Extract global variable
- Insert data
- Set global variable
- Remove
global variable
- Send global variable (HATS standard portlet projects only)
- Show URL or SWT Composite RCP-only
- Show URL Web-only
- Forward to URL Web-only
- Play macro
- Perform macro transaction
- Send key
- Disconnect
- Pause
For more information, see Actions.
|
Notes:
- When a screen match is found, at least one action must be performed,
but a transformation of the screen is not required to be displayed
to the user. In other words, the apply a transformation action is
not required.
- You can perform actions against the host screen data before and
after the user interacts with it. For example, you can extract some
data as a global variable, replace some information with new data,
and then apply the transformation before showing
the transformation to the user. After the user performs an action
that returns the screen data, you can perform additional extractions
and insertions before the data is finally returned to the host.
|
- If no screen recognition criteria match the host screen, HATS processes
the unmatched screen application event. The
default action of this event is to display the host screen using the
default transformation and applying the default template. The default
transformation uses the rendering settings that are defined in the
project settings.
- As the host presents each new screen of an application, HATS begins
at step 1 again and proceeds through
all steps. Figure 1 shows how HATS processes screens.
Note:
If a macro is used for skip-screen
processing, those screens are not subject to this process.
Figure 1. HATS screen processing
Screen events are an important
concept in the development of a HATS project. Without defined screen
recognition criteria in a screen event, HATS does
not know what actions to take when the host screen is received.
You should familiarize yourself with the basic principles of screen events before beginning the development
process. The core elements of setting screen recognition criteria
are discussed in Working with screen events.
Understanding HATS application development
HATS enables you to use an iterative approach to application development.
You can start with a simple configuration and add refinements as you
are ready. You can test each change as you make it using the test
environment of Rational SDP. Most changes can be seen by a simple refresh
of the HATS transformation. You can make modifications if needed and
save your work before you proceed to the next change. This section
describes one possible sequence of steps that you can use to design
and develop your HATS application. You can go as far down this path
as you like and stop at any point along the way.
- Begin by creating a HATS application that uses all of the defaults
and instantly see all of your host screens rendered in a GUI.
Default rendering can render your host screens in a way that
preserves the original layout of the screen and automatically adds
GUI controls, such as links, buttons, and tables, to improve user
productivity.
- Create a template that matches your company's Web pages, or other company applications, and see all of your host screens
rendered with your company appearance. You can start with, and modify,
one of the templates supplied with HATS, or for HATS Web applications
you can import your company's web site as a template. See Using templates for more information. Now your HATS application
matches the style and colors of your company's Web pages or other
corporate applications.
- Configure project-level (application-wide) settings and see how
much of your host application can be handled without configuring specific
screens. You can change project-level characteristics under the various
tabs of the Project Settings editor. See Modifying a HATS project for
more information. For example, try making a few changes such as:
- Change default rendering to render a selection list as a drop-down
list. This will change all selection lists to drop-down lists.
- Create one or more global rules to configure the way HATS transforms
the input fields on your host screens. For example, change date fields
to calendar widgets or location fields to drop-down lists.
- Use text replacement to change one or more strings that appear
on your host screens. For example, you might change the word signon to logon.
- Look at the way your host screens are transformed. Are there elements
that appear on most screens that you want to see transformed differently?
Those might be candidates for modifying the settings of some components
(to change how host components are recognized) or widgets (to change
how the GUI controls are rendered on the transformation). You can
change these settings at the project level to establish defaults to
be used on your host screens. You can also change the settings for
individual instances of components and widgets when you add them to
transformations. For more information see Rendering.
- Create screen-level events to recognize specific host screens
and trigger a set of actions to be performed.
- If you use BMS maps, you can start by importing your BMS map sets
to create screen captures for your host screens. Otherwise,
use the HATS host terminal function to connect to the host application
and create screen captures for the specific screens you want to recognize
and act upon. Then from each screen capture, create a screen event.
- Use the Create a Screen Customization wizard to customize some
of the host screens to simplify them, remove unused items,
and automatically extract and populate data to simplify user input.
Provide screen-specific GUI controls for a higher degree of productivity
for the user. For more information see Working with screen events.
- It is a common requirement to be able to gather data from multiple host screens
and present it in a single output page, or to provide a single input
page, which then supplies multiple host screens with data.
HATS provides several methods for performing these operations. The
different methods include the use of screen combinations, screen customizations,
transformations, macros, global variables, and Integration Objects.
Which method you use depends upon the operation to be performed and
the location of the data. For starters, try using the Create a Screen
Combination wizard to combine data that does not all fit on a single host screen
and display it in a single output page. For more information, see Combining screens and Working with screen events.
- Create simple macros to aid the user in navigating the host application.
Macros can be used to perform skip-screen functions, to prompt users
for input data, or to extract data from one or more host screens.
For more information, see Macros and host terminal.
- For Web applications, create Integration
Objects, which are built from macros and are Java beans that encapsulate
interactions with a host application. Then use the Integration
Objects to create Model 1, Struts, or JavaServer Faces (JSF) Web pages
to drive interactions with your host application. You can
also run Integration Objects from your own Java business logic or extend them to provide Enterprise JavaBeans™ (EJB) or Web services
interfaces to your host application. For more information,
see Using Integration Objects.
How do I know what version of HATS I have?
You can determine the version of your HATS Toolkit and
of each of your HATS projects.
To determine what version of HATS Toolkit you are using,
check the IBM Installation Manager
Installed Packages:
- Launch IBM Installation
Manager.
- On the menu bar, select File > View
Installed Packages.
The Installed Packages panel displays the installed HATS Toolkit
version.
You can
determine the version (including maintenance level) of each HATS project.
This version information is maintained in each project in a file named .serviceHistory.xml. This file can be
viewed from the Navigator view of the HATS perspective in the Web Content\WEB-INF\profiles folder (for Web
and portlet projects), the profiles folder (for rich client projects),
and the ejbModule folder (for EJB projects).
The version information for HATS .ear projects and
for the HATS RCP runtime extension project is maintained in the product.xml
file. This file can be viewed from the Navigator view in the root
folder for the project.
Gathering problem determination information
Sometimes you may require assistance in determining HATS related
problems. To gather general information
for HATS support personnel, on the HATS Toolkit menu bar, select HATS > Gather Problem Determination
Information to launch the wizard.
Once the window opens, you will see all of your projects listed.
Select the project or projects you want to include. Specify the destination
of the zipped file you want to use to capture your information then
click Finish. The information
contained in the zipped file will assist HATS support personnel
in determining your problem.
For information about how the user can gather problem
determination data in a rich client production environment, see Troubleshooting preferences.
For instructions on how to gather more specific information
for certain problem scenarios, see the section Gathering
problem determination information in HATS Troubleshooting.
Where can I find information about HATS?
The following HATS information is available before
you install HATS:
- HATS documentation is available on the HATS installation CD.
From the installation launchpad, select links to any of the following
documents:
- Release Notes
- Getting
Started (pdf)
- Getting
Started for IBM i (pdf)
- The HATS Information Center at http://publib.boulder.ibm.com/infocenter/hatshelp/v75/index.jsp includes information from the Release Notes,
frequently asked questions (FAQs), API reference information, tutorials,
WebFacing information, and HTML and PDF versions of
the documents listed below. Available translated PDF versions are
also included.
- HATS Getting Started
- HATS Getting Started for IBM i
- HATS User's and Administrator's Guide
- HATS Web Application Programmer's Guide
- HATS Rich Client Platform Programmer's Guide
- HATS Advanced Macro Guide
- HATS Messages
- HATS Troubleshooting
- Developing WebFacing Applications
- The HATS product Web site at http://www.ibm.com/software/awdtools/hats/index.html includes
additional product information such as product overview, features
and benefits, system requirements, and more.
- The HATS HotSpot at http://www.ibm.com/software/rational/cafe/community/hats includes
a resource library, discussion forums, blogs, and more.
- The IBM Education Assistant
Web site at http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp integrates
narrated presentations, demonstrations, tutorials, and resource links
to help you successfully use IBM products. Search
for Host Access Transformation Services in the Contents.
In addition to the information available before installing
HATS, the following information is available on the system after installing
HATS:
- Links to the HATS Web site, Information Center, and Release Notes are available on the Windows® Start menu.
- HATS documentation, including WebFacing, is available from
the Help menu on the Rational SDP menu bar. Select Help > Help Contents and in the Contents
panel select Developing HATS Applications.
- The HATS Welcome page tutorial guides you through the process
of developing a HATS application, and if installed on the IBM Rational Developer for i (RDi)
product, introduces the IBM WebFacing
Tool for IBM i feature
of the HATS Toolkit.
- If the WebFacing Tool is installed, the WebFacing Welcome page
tutorial provides information similar to the HATS Welcome page tutorial.
- Context-sensitive help is available on all fields in the HATS wizards
and editors. Press the F1 key to see help in the HATS Toolkit.
- Tips are provided at key points in the process of developing a
HATS project. You can control whether you want to see tips by modifying
HATS preferences.