UTS Connect User's Guide

CHAPTER 3

Creating a UTS Component

 
Top of page

Creating a UTS Component

As discussed in the previous chapter, before you proceed with creating a UTS component you must first prepare any XML templates needed by the component. (For more information, see "Creating a New XML Template" in the Composer User's Guide.) During the creation of your component, you will use these template's sample documents to represent the inputs and outputs processed by your component.

Also, as part of the process of creating a UTS component, you must specify a UTS connection for use with the component (or you can create a new one). See the previous chapter for information on creating UTS Connection Resources.

Procedure To create a new UTS Component:

  1. Select File>New>xObject then open the Component tab and select UTS Terminal.

    NOTE:   Alternatively, under Component in the Composer window category pane you can highlight UTS Terminal, click the right mouse button, then select New.

  2. The "Create a New UTS Component" Wizard appears.

    CreateNewComponent1

  3. Enter a Name for the new UTS Terminal Component.

  4. Optionally, type Description text.

  5. Click Next. The XML Input/Output Property Info pane of the New UTS Component Wizard appears.

    CreateNewComponent2

  6. Specify the Input and Output templates as follows.

  7. Select an XML template for use as an Output DOM using the same steps outlined above.

    NOTE:   You can specify an input or output XML template that contains no structure by selecting {System}{ANY} as the Input or Output template. For more information, see "Creating an Output DOM without Using a Template" in the User's Guide.

  8. Click Next. The Temp and Fault XML Template panel appears.

    CreateNewComponent3

  9. If desired, specify a template to be used as a scratchpad under the "Temp Message" pane of the dialog window. This can be useful if you need a place to hold values that will only be used temporarily during the execution of your component or are for reference only. Select a Template Category if it is different than the default category. Then select a Template Name from the list of XML templates in the selected Template Category.

  10. Under the "Fault Message" pane, select an XML template to be used to pass back to clients when an error condition occurs.

  11. As above, to add additional input XML templates, click Add and choose a Template Category and Template Name for each. Repeat as many times as desired. To remove an input XML template, select an entry and click Delete.

  12. Click Next. The Connection Info panel of the Create a New UTS Component Wizard appears.

    CreateNewComponent4

  13. Select a Connection name from the pulldown list. For more information on the UTS Connection, see "Creating a UTS Connection Resource" in Chapter 2.

  14. Click Finish. The component is created and the UTS Component Editor appears.

 
Top of page

About the UTS Component Editor Window

The UTS Component Editor includes all the functionality of exteNd Composer's XML Map Component Editor. For example, it contains mapping panes for Input and Output XML documents as well as an Action pane.

There is one main difference, however. The UTS Component Editor also includes a Native Environment Pane featuring a UTS emulator. This screen appears blue until you either click the Connection icon in the main toolbar or begin recording by clicking the Record button in the toolbar. Either action establishes a UTS emulation session inside the Native Environment Pane with the host that you specified in the connection resource used by this UTS component.

 
Top of page

About the UTS Native Environment Pane

The UTS Native Environment Pane provides UTS emulation of your host environment. From this pane, you can execute a UTS session in real time, interacting with the Native Environment Pane exactly as you would with the screen on a terminal connected to a Unisys mainframe. You can also do the following:

 
Top of page

UTS Keyboard Support

The UTS Native Environment Pane supports the use of several special attention keys including: Clear Home, Local, Previous Page, Specify, Forms Mode Toggle, Next Page, Receive and Transmit. The function for each attention key may vary depending on the host application. These keys are mapped to the PC Keyboard as follows:

Table 1-1:

UTS Key

PC Key

UTS Key

PC Key

MsgWait

Ctrl + W

F11

F11

SOE

Ctrl + S

F12

F12

Transmit

Enter

F13

Shift + F1

UnlckKbd

Esc

F14

Shift + F2

F1

F1

F15

Shift + F3

F2

F2

F16

Shift + F4

F3

F3

F17

Shift + F5

F4

F4

F18

Shift + F6

F5

F5

F19

Shift + F7

F6

F6

F29

Shift + F8

F7

F7

F21

Shift + F9

F8

F8

F22

Shift + F10

F9

F9

F23

Shift + F11

F10

F10

F24

Shift + F12

You can either use the keys directly from the keyboard as you create your UTS Component, or you can use a keypad tool bar available from the view menu.

Procedure How to Use the Floating Keypad:

  1. Select View/Terminal Keypad from the Composer Menu. A floating Keypad appears.

  2. Click on the key you wish to invoke. If you require help, hover the mouse over that key. Help will display the UTS keyboard equivalent for that key. You will see the result of the key you clicked in the Native Environment Pane.

  3. Click OK to close the keypad. In order for the keypad to redisplay, you must repeat step 1.

    floatingkeyboard

 
Top of page

About the Screen Object

The Screen Object is a byte-array representation of the emulator screen shown in the Native Environment Pane, with methods for manipulating the screen contents.

 
Top of section

What it is

The UTS component communicates with the host environment via the block mode terminal data stream , in a UTS session. A block of data essentially represents a screen. The host sends a screen block that is displayed in the component. The screen is edited by the user (and ultimately by the component you create) and the modified screen block is sent back to the host for processing after you press an attention key. The Screen Object represents the current screen's block of data. For a 24 x 80 terminal screen, this is 1,920 bytes of data.

 
Top of section

How it works

When character data arrives from the host, appropriate updates to the Native Environment Pane occur in real time. Those updates might be anything from a simple cursor repositioning to a complete repaint of the terminal screen. The screen content is, in this sense, highly dynamic.

When you have signaled exteNd Composer (via a Set Screen Text action) that you wish to operate on the current screen's contents, the screen buffer is packaged into a Screen Object that is made accessible to your component through ECMAScript.

Many times, it is not necessary for your component to "know" or understand the complete screen contents prior to sending keystrokes back to the host or prior to mapping data into a prompt. But when mapping outbound from the screen to a DOM, it can be useful to have programmatic access to the Screen Object. To make this possible, the Connect for UTS defines a number of ECMAScript extensions for manipulating screen contents. These extensions are described in further detail in the next chapter. For now, a simple example will suffice. Suppose you are interested in obtaining a string value that occurs on the screen in row 8 at column position 11. If the string is 10 characters long, you could obtain its value by using an ECMAScript expression within a Check Screen action that refers to the getText method:

In the example shown above, the 10 characters beginning at row 8, column 11 on the screen are checked to make sure they contain the characters "Thank you".

Screen methods such as these will be discussed in greater detail in the section on "UTS-Specific Expression Builder Extensions" in Chapter 4.

 
Top of page

UTS-Specific Toolbar Buttons

If you are familiar with exteNd Composer, you will notice immediately that the UTS Connect includes a number of Connect-specific tool icons on the component editor's main toolbar. They appear as shown below.

Record Button

recording defaultRecord icon (normal state)


recordingRecord icon (recording in progress)


recording disabledRecord icon (disabled)



The Record button allows you to capture keyboard and screen manipulations as you interact with the Native Environment Pane. Recorded operations are placed in the Action Model as actions, which you can then "play back" during testing.

Connection Button

TelnetDisconnectOnConnection (disconnected state)


connectedConnection (connected state)


TelnetDisconnectOffConnection (connected/disabled state)


The Connection button on Composer's main toolbar toggles the connection state of the component (using settings you provided during the creation of the Connection Resource associated with the component).

NOTE:   When you are recording or animating, a connection is automatically established, in which case the button will be shown in the "connected/disabled" state. When you turn off recording, the connection the button will return to the enabled state.

Set Screen Text Button

getscreenThe Set Screen Text button on exteNd Composer's main toolbar is used to indicate that you wish to send data to the screen object. Clicking this button will brings up the Set Screen Text dialog, allowing you to create a new Set Screen Text Action.. (See the next chapter for a detailed discussion of this action type.)

Send Key Button

sendkeyThe Send Key button on Composer's main toolbar would be pressed when you wish to add a Send Key Action to the Action Model. (See the next chapter for a detailed discussion of this action type.) The various UTS attention keys are discussed in the section above entitled "UTS Keyboard Support".

Create Check Screen Button

checkscreenThe Create Check Screen button on Composer's main toolbar is used to check that the terminal screen is in the state you expect it to be. Clicking this button will brings up the Check Screen dialog, allowing you to create a new Check Screen Action. (The next chapter contains a detailed discussion of this action type.)

 
Top of page

UTS-Specific Menu Bar Items

Component Menu

Two additional items have been added to the Component drop down menu for the UTS Connect. These are Start/Stop Recording and Connect/Disconnect (depending on your current status).

Start/Stop Recording—This menu option manages the automatic creation of actions as you interact with a host program. Start will enable the automatic creation of actions as you interact with the screen and Stop will end action creation.

Connect/Disconnect—This menu option allows you to control the connection to the host. When you are recording or animating, a connection is automatically established (and consequently, the connection icon is shown in the "connected/disabled" state). However, this menu choice is useful if you are not recording and you merely want to establish a connection for the purpose of navigating the UTS environment.

 
Top of page

UTS-Specific Context-Menu Items

The UTS Connect also includes context-menu items that are specific to this Connect. To view the context menu, place your cursor in either the Native Environment pane or the Action pane and click the right mouse button.

 
Top of section

Native Environment Pane Context Menu

When you right-mouse-click in the Native Environment Pane, you will see a contextual menu. The menu items will be greyed out if you are not in record mode. In record mode, the context menu has the following appearance:

NEPContextMenu

The four commands work as follows:

Set Screen Text: USERID—Automatically sends User ID information to the host, based on the value you supplied (if any) for User ID in the UTS Connection Resource for this component. Also creates the corresponding Set Screen Text action in the Action Model.

Set Screen Text: PASSWORD—Automically transmits Password information to the host, based on the Password you supplied (if any) in the UTS Connection Resource for this component. Also creates the corresponding Set Screen Text action in the Action Model.

Set Screen Text...—Creates a new Set Screen Text dialog, allowing you to create a new Set Screen Text Action. (See the next chapter for a detailed discussion of the use of this command).

Check Screen...—Brings up the Check Screen dialog, allowing you to create a new Check Screen Action. (This will be discussed in greater detail in the next chapter.)

 
Top of section

Action Pane Context Menu

If you click the right mouse button when the mouse is located anywhere in the Action pane, a context menu appears as shown.

T27ContextMenu

The UTS-specific functions of the context menu items are as follows:

Set Screen Text—Allows you to create a Set Screen Text action to send data to the host. A dialog appears, allowing you to specify what you want to send to the host as well as determining the screen position where the information will be received. (See the next chapter for a detailed discussion of the use of this command.)

Check Screen— Allows you to create a new Check Screen action which is used to make sure the appropriate screen is present before the component continues processing. A dialog appears, allowing you to specify various go-ahead criteria as well as a Timeout value. (The next chapter contains a detailed discussion of the Check Screen action.)




Copyright © 2003 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...