Bottom of Page | Previous Page | Next Page | Contents

Editing a screen customization

A screen customization is a HATS resource with two parts: a set of screen recognition criteria used to match host screens, and a list of actions to be taken when a host screen matches the screen recognition criteria.

When you created your project in HATS Studio, you used the Create a HATS Screen Customization wizard to define screen customizations. The recognition criteria and the actions you defined for the screen customization were saved in a screen customization (.evnt) file. You can use the screen customization editor to view and modify those criteria and actions.

You can see the screen customizations you have created by expanding the Screen Customizations node of the HATS Project View tab of the HATS Studio. You can invoke the screen customization editor by double-clicking on the name of the screen customization.

The following sections describe each tab of the screen customization editor.

Overview tab

The Overview tab of the screen customization editor summarizes all of the information you specified when you created your project. It contains the name and description of the screen customization, the name and an image of the screen that was used to create the screen recognition criteria, a summary of the screen recognition criteria, and a summary of the actions to be taken when the screen is recognized. On this tab, you can modify the description of the screen customization, and you can select a different screen to associate with the screen customization. The selected screen is the screen that is used whenever you make changes to the screen customization, such as modifying the screen recognition criteria, or adding actions.

Each of the section headings on the Overview tab is a link to the other tabs of the screen customization editor.

Screen Recognition Criteria tab

During project creation or customization, you set screen recognition criteria that HATS uses to match host screens. Host screens can be recognized by any combination of criteria including how many input fields or total 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. The Screen Recognition Criteria tab of the screen customization editor displays the screen recognition criteria that you set for the screen customization. You can add, edit, or remove criteria on this tab.

Field criteria

You can use the total number of fields on a screen, the total number of input fields on a screen, or both as screen recognition criteria. These are the first two criteria shown on the Screen Recognition Criteria tab.

If you click the checkbox for these criteria, they are used to recognize the screen. The fields next to each field criterion show the number of fields and input fields for the screen specified on the Overview tab. If you change the screen being used for this screen customization, click Refresh to update the values for the screen you choose.

Note:
If you are using field criteria to recognize screens that have a certain number of fields, and another screen does not contain the same number of fields, that screen is not recognized. For example, one screen might have a list of 10 files with 10 fields. If the host displays a screen with only eight files in the list and eight fields, the second screen does not match the number of fields criterion of the screen customization that matched the first screen.

For an explanation of the Optional and Invert checkboxes, see Optional versus non-optional screen recognition criteria and Inverted match of screen recognition criteria.

Cursor position criteria

You can also use the initial position of the cursor as a screen recognition criterion, either by itself or in conjunction with other criteria, by clicking the checkbox. The fields next to the cursor position criterion shows the row and column of the cursor position for the screen specified on the Overview tab. If you change the screen being used for this screen customization, click Refresh to update the values for the initial cursor position row and column on the screen you choose.

For an explanation of the Optional and Invert checkboxes, see Optional versus non-optional screen recognition criteria and Inverted match of screen recognition criteria.

Text string location criteria

Text string location criteria are shown at the bottom of the Screen Recognition Criteria tab. If you have set a string location as a screen recognition criterion, it is shown in the table. The table shows what part of the screen contained the string, shows some of the characters of the text selected, and whether the text is case sensitive.

If you highlight a row of the table and click Edit, or if you click Add, the Screen Recognition Criterion dialog appears. In the dialog panel, you can either modify or specify text string information. The panel shows the screen selected on the Overview tab.

You can select any text on the screen by drawing a rectangle around the text. Place your cursor at any point on the screen, click and hold the left mouse button, and move the cursor to another location on the screen to draw the rectangle. The fields on the right of the dialog show the text you selected and the starting and ending row and column numbers of the rectangle. You can specify the part of the screen that should contain the text by clicking one of the radio buttons for Anywhere on the screen, At a specified position, or Within a rectangular region. If the text you selected must be case-sensitive to be recognized as matching the screen recognition criteria, click the Case sensitive checkbox.

For an explanation of the Optional and Invert checkboxes, see Optional versus non-optional screen recognition criteria and Inverted match of screen recognition criteria.

Click OK when you have finished your selections.

Optional versus non-optional screen recognition criteria

You can choose whether the screen recognition criteria you set is optional or non-optional. If you do not check the Optional checkbox, the recognition criterion is considered non-optional. How you use the Optional checkbox corresponds to the Host On-Demand screen descriptor attribute, optional.

If you have both optional recognition criteria and non-optional recognition criteria, HATS checks the non-optional criteria first. If all the non-optional criteria match, the screen matches. If at least one of the non-optional criteria does not match, HATS checks the optional criteria. For a screen to match the criteria, HATS must find all non-optional criteria, or at least one optional criterion. Otherwise, the screen fails to match. The following example explains this concept in greater detail.

Note:
Non-optional does not mean required.

Suppose you defined cursor position location and two text strings with the values shown in the following example:

Cursor position recognition  Optional     
                             Row: 1   Column: 1

String recognition           Non-optional   
                             String 1: Welcome
                             Start position: Row: 1   Column: 6
                             End position:   Row: 1   Column: 12

                             String 2: Username
                             Start position: Row 20   Column 10
                             End position:   Row 20   Column 17

In this example, HATS must find both text strings or the cursor position for the screen to match. Because HATS checks non-optional criteria first, HATS looks for the text strings first. If HATS cannot find both text strings in the specified regions of the host screen, then it checks to see if the optional criterion (cursor position) can be found.

Inverted match of screen recognition criteria

You can choose whether the screen recognition criteria you set matches or does not match the host screen. If you check the Invert checkbox, the recognition criterion must not match the screen for the criterion to be considered true.

Conversely, if you do not check the Invert checkbox, the recognition criterion must match the screen for the criterion to be considered true..

How you use the Invert checkbox corresponds to the Host On-Demand screen descriptor attribute, invertmatch.

Actions tab

During project creation or customization, when you specified screen recognition criteria that HATS uses to match host screens, you also defined the actions to be taken when the host screen is recognized. The Actions tab of the screen customization editor displays the actions that you defined for the screen customization. These actions are applied in the order that they are listed. If you want to change the order of the actions, select one and click Up or Down to move that actions higher or lower in the list.

You can add, edit, or remove actions on this tab. Choose from the following actions:

To play a macro, click the checkbox and select the name of the macro to play from the drop-down list. If you define a macro to be played as an action of this screen customization, it is the last action applied. Be sure to use very specific criteria for recognizing that screen, so that the macro will not be played on other screens. For example, if you are using a string criterion, specify that it must be found at the exact location, rather than anywhere on the screen. Make sure that the screen on which the macro ends does not satisfy the criteria for starting the macro. When you record a macro, be sure that the final screen is not the screen that is recognized by the screen customization. If the recognized screen is the final screen of the macro, a loop will be created.

Ordinarily you will not apply a transformation and play a macro as actions on the same screen. If both actions are specified, the transformation will be applied, and the macro will be executed only after the user interacts with the transformed screen. The playing of a macro is always the last action to be taken. If you want a macro to be played automatically when a screen is recognized, do not apply a transformation to that screen. When you create the screen customization for that screen, you should clear the Apply a transformation button on the Actions page of the wizard. You can create another screen customization for the last host screen to which your macro will navigate, and apply a transformation to govern the appearance of the Web page derived from that final screen.

You can insert a macro button into a transformation to enable the end user to run a macro from the transformed screen. In this case, the end user can either interact with the transformed screen or click the macro button to cause a macro to begin running at the current host screen.

You can record macros in the HATS Studio using the host terminal. You can also import macros created with other programs, such as the IBM WebSphere Host Publisher Host Access application or IBM Host On-Demand MacroManager. For more information on importing macros, see Incorporating macros.

All other action types and their descriptions are shown in the table on the Actions tab. If you highlight a row of the table and click Edit, the Edit xxx Action dialog appears. where xxx is one of the following:

If you click Add, the Add Action dialog appears. The dialog panel shows the screen selected on the Overview tab. In this panel, you can select the action you want to occur from the drop-down list. Depending on the action you choose, the rest of the panel displays information that you can specify for that action.

Note:
You cannot change the action in the Edit xxx Action dialog. You can only change the information that applies to the action.

Apply transformation action

If you decide to apply a transformation as the action of this screen customization, you can select the transformation you want to apply from the drop-down list of transformations defined in the project.

The Template field has "(default template)" selected by default. Unless you select a different template to be applied with this particular transformation, the template that surrounds the transformation in the browser window is the template you specified as the default template for the project. The drop-down list contains all the templates defined in the project.

If you want host keys pressed by the end user of your project to be sent to the host immediately instead of waiting until all actions have been performed, click Immediate host keys. On this panel, click the checkboxes of the keys that should be sent to the host immediately. The immediate sending of these keys applies only to the current transformation, and not for all transformations in the project.

Insert global variable action

You can insert information onto the host screen. Select whether the information is a string or a global variable by clicking the appropriate radio button. To insert a string, type the text in the entry field provided. To insert a global variable, select the name of an existing global variable from the drop-down list. In either case, specify the row and column of the screen where the variable should be inserted.

Note:
Inserting information onto a host screen must occur before any transformation occurs for the global variable to appear in the Web page. See Actions tab for information on modifying the order of the actions.

If the value of the global variable is indexed (contains a list of strings), click Advanced. You must select one of the radio buttons to specify whether all of the strings are inserted at the specified position one after the other or if the strings are inserted as separate lines into a rectangular region of the screen.

For more information about global variables, see Interacting with global variables.

Extract global variable action

You can extract information from the screen and define it as a global variable. When you extract a global variable, you can specify a name or select an existing global variable name from the drop-down list for the Name field. For the region of the host screen, you define the starting and ending rows and columns for the area of the screen you want to assign as a global variable.

To specify how text extracted from multiple rows of the host screen is defined in a global variable, click Advanced. You must select one of the radio buttons to specify if the extraction should be treated as one string or as a list of strings (indexed). If you selected an existing global variable in the Name field before you clicked Advanced, you must select one of the radio buttons specifying how HATS should handle the extracted data.

There are four options for handling extracted data for existing variables:

For either of the options that use a specified index, you must enter the number of the index in the Index field.

The following example illustrates how the variable value is modified based on the option you choose. Start with an existing indexed variable named "sample". The values of "sample" are "a b c d". The "a" in the value has an index of 0, so the value of "sample[0]" is "a", and the "b" in the value has an index of 1, so the value of "sample[1]" is "b", and so on. Assume that you extract a new set of values "e f g".

For more information about global variables, see Interacting with global variables.

Set global variable action

You can set global variables to be used by other objects within your project. When you set a global variable, you can specify a name or select an existing global variable name from the drop-down list for the Name field. If you select an existing indexed global variable, click Advanced to specify how to handle the setting of the value.

There are four options for setting the value for an existing indexed variable:

For either of the options that use a specified index, you must enter the number of the index in the Index field.

For an example of how variable value is set based on the option you choose, see Extract global variable action.

You can specify whether the global variable is set to a fixed constant or a calculated value by clicking one of the radio buttons. If you are setting the global variable to a fixed value, type the value in the entry field.

If you are setting the global variable to a calculated value, you specify the operands to be used and the operation of the calculation. The operands can be either fixed values that you enter into the field, or you can use the values of existing global variables for the calculation. If you use an existing indexed global value, and you want to specify an index of the variable to use as the operand, click Advanced. Enter the number of the index in the Index field.

For more information about global variables, see Interacting with global variables.

Execute business logic action

If you decide to execute some business logic as the action of this screen customization, you must specify the fully-qualified Java class name and the Java method for the business logic you want to perform in the fields provided. You can click Browse next to the Class name field to select a class in which the business logic method is defined. You can select any class defined under the Source folder in the HATS Project View tab of the HATS Studio. If you have not created the Java code for this business logic, right-click in the HATS Project View tab of the HATS Studio, and select New HATS > Business Logic to invoke the Create Business Logic wizard.

For more information about business logic in your projects, see Adding business logic.

Show URL action

If you want to show a Web page as the action of this screen customization, you must specify the URL (uniform resource locator) address of the Web page in the URL field. With Internet Explorer version 5.0 or higher and Netscape version 6.0 or higher, the Web page will be shown surrounded by the default template, similar to the way a transformation is shown. With Netscape version 4, the URL is a link surrounded by the default template. When the end user clicks the link, a new window opens with the specified URL.

Source tab

The Source tab displays the tags and values in the sc-name.evnt file for all the information supplied for the screen customization, where sc-name is the name you gave to the screen customization when you created it. As you make changes on other tabs in the screen customization editor, the tags and values displayed in the source file change to match.

You can also make changes to the tags and values in the source file, and they are reflected on the appropriate tabs of the screen customization editor. For information about the tags in the sc-name.evnt file, refer to Screen customization files (.evnt).

Screen customization ordering

HATS checks each screen customization in the order that you arranged them during project creation. You can modify the order of the screen customizations using the Event Priority tab of the project editor. See Event Priority tab for more information.

When a HATS application is running and a new host screen is found, the first enabled screen customization in the event priority list is checked to determine if the screen recognition criteria match the host screen. If so, no more screen customizations are checked for matches, and the actions for the first screen customization are performed. If not, the next screen customization in the list is checked to determine if the screen recognition criteria match the host screen. This continues until the last screen customization in the list is checked.

If there are no screen recognition criteria in the screen customizations that match the current host screen, HATS processes the unmatched screen event. The HATS unmatched screen event is a special screen customization that occurs only when no defined screen customizations match the host screen. The default action of this event is to display the host screen (default transformation) applying the default template.

You can modify the actions to be taken if a host screen that does not match any of your screen customizations. For example, you could create a Web page that tells the end user that the page was not found and gathers information on how the user reached that screen. You could use the show URL action to present the Web page.

If you want to modify the action of the unmatched screen event, you can locate the unmatchedScreen.evnt file in the source/profiles/events/session/main directory path of the Navigator tab of the HATS Studio. You can invoke the screen customization editor by double-clicking on the unmatchedScreen.evnt. Click the Actions tab at the bottom of the editor to display the actions. Click Add, Edit, or Remove to customize the unmatchedScreen.evnt file.

[ Top of Page | Previous Page | Next Page ]