HP3000 Connect User's Guide

CHAPTER 3

Creating an HP3000 Component

 
Top of page

Before Creating an HP3000 Component

As with all exteNd Composer components, the first step in creating an HP3000 component—assuming a Connection Resource is available—is to 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 templates' sample documents to represent the inputs and outputs processed by your component.

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

Procedure To create a new HP3000 Component:

  1. Select File>New>xObject, open the Component tab and select HP3000.

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

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

    CreateNewComponent1

  3. Enter a Name for the new HP3000 Component.

  4. Optionally, type Description text.

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

    newHPComponent

  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 XML Temp/Fault Template Info panel of the New HP3000 Terminal Component Wizard 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. Specify the templates as indicated in Step 6 above.

  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 temp or fault XML templates, click Add and choose a Template Category and Template Name for each. Repeat as many times as desired. To remove an XML template, select an entry and click Delete.

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

    newhpcomp27

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

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

 
Top of page

About the HP3000 Component Editor Window

The HP3000 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 HP3000 Component Editor also includes a Native Environment Pane featuring an HP3000 emulator. This screen appears black 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 an HP3000 emulation session inside the Native Environment Pane with the host that you specified in the connection resource used by this HP3000 component.

CompEdWindow

 
Top of page

About the HP3000 Native Environment Pane

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

 
Top of page

About HP3000 Keyboard Support

The HP3000 Native Environment Pane supports the use of numerous special terminal keys. The Terminal Keypad dialog (see below) is comprised of four Tabs: Common Keys, NumPad Keys, Other Keys and North Keys. Each Tab contains a group of keys with specific functionality.

Note that you can also achieve the use of additional keys (such as Insert Char and Delete Char) by using the picklists in the Expression Builder dialog, Function/Methods column, under HP3000 > Keys.

Procedure How to Use the Floating Keypad:

  1. Select View/Terminal Keypad from the Composer Menu. A floating Keypad appears. The Keypad window contains a series of tabs, including the following: Common Keys, NumPad Keys, Control Keys and Other Keys.

  2. Click on the appropriate Tab to display the keys you wish to view on the Terminal Keypad.

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

  4. Click OK to close the keypad. In order for the keypad to redisplay, you must repeat step 1. When you display the keypad, you will return to the last Tab that you were using.

The following pages illustrate the four Tabs and corresponding keys that can be used to interact with HP3000.

Common Keys: Includes directional keys, (Arrow Down, Arrow Left, Arrow Right, Arrow Up, BackSpace, BackTab) as well as Delete, Escape, Linefeed, Return, and Tab. The function keys, F1 through F8, are also displayed.

keyboardCommonKeys

NumPad Keys: Includes the digits 0-9, Minus, Comma, Period and Enter keys.

keyboardnumkeys

Control Keys: Includes 5 keys associated with specific functions. Refer to Appendix B for a complete listing.

keyboardcontrolkeys

Other Keys: Includes keys to perform common functions for example: the Home key.

keyboardotherkeys

NOTE:   The complete list of special (non-printing) keys and their ANSI equivalents is shown in Appendix B.

 
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 HP3000 component communicates with the host environment via a character-mode terminal data stream, in a TCP/IP session. The user sends data to the host in the form of keystrokes (or XML data mapped to cursor prompts). The host, in turn, sends the terminal a stream of data which may contain anything from a single byte to a whole screen's worth of information. The Screen Object represents the current screen's worth 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 arrive 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 Check Screen 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 HP3000 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 5 at column position 20. If the string is 10 characters long, you could obtain its value by using the following ECMAScript expression as the Source in a Map action (with an output DOM or temp DOM as the Target):


Screen.getTextAt( 5, 20, 10 )


The 10 characters beginning at row 5, column 20 on the screen would be mapped to the Target of the Map action.

For more examples (and complete API documentation for the Screen object), see the section on "HP3000-Specific Expression Builder Extensions" in the next chapter.

 
Top of page

HP3000-Specific Toolbar Buttons

If you are familiar with exteNd Composer, you will notice immediately that the HP3000 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

Connection (disconnected state)TelnetDisconnectOn


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.

Create Check Screen Button

checkscreenThe Create Check Screen button on Composer's main toolbar should be clicked before the first user interaction with any given terminal screen. This signals exteNd Composer that you intend to work with the screen data as currently shown in the Native Environment Pane. Clicking this button causes a new Check Screen Action to be inserted into the Action Model. (See the next chapter for a detailed discussion of this action type.)

 
Top of page

HP3000-Specific Menu Bar Items

Component Menu

Two additional items have been added to the Component drop down menu for the HP3000 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 button is useful if you are not recording and you merely want to establish a connection for the purpose of navigating the HP3000 environment.

 
Top of page

HP3000-Specific Context-Menu Items

The HP3000 Connect also includes context-menu items that are specific to this Connect. To view the context menu, place your cursor in the appropriate pane (Native Environment or Action) 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:

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

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

Send Buffer—Brings up the Send Buffer dialog, allowing you to create a new Send Buffer Action. (See the next chapter for a detailed discussion of the use of this command.)

Check Screen—Creates a new Check Screen action without bringing up a dialog (same as a click on the Create Check Screen button in the toolbar).

 
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.

actioncontext

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

Send Buffer—Allows you to create a Send Buffer action, so you can enter text and/or control-key commands that will be sent to the HP3000 host application. (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 ...