In order to use an object in your client application, you must register (or add) it to your local workstation. You can register (or remove) objects at the module or interface level. To add an object to the local workstation, you must have both the Contract Repository and the Workstation Objects views open in the Active Expert.
To open the local workstation view, choose File->Open Workstation from the menu bar or click on the workstation toolbar button. (Keyboard shortcut is Alt F W.)
Note: If this is the first window you have opened in this session of Active Expert Application Builder, you are prompted for logon information. Otherwise, the Workstation Objects view opens immediately.
The Workstation Objects view shows the local modules, if any, previously registered on the workstation. If you have not yet registered any modules to your workstation, this view is empty. (For information on how to register a module to your workstation, refer to the next section, "Registering Objects on the Local Workstation.")
Figure 3-4 shows the local view of a workstation on which one module, BANKAPP, has been registered.
Figure 3-4 Workstation Objects View (along with Contract Repository View)
The local workstation environment is represented by two panels, each providing a different view of modules and their components-the top panel shows the objects in a graphical tree, the lower panel shows sample code for the selected tree object.
The top panel shows the objects that have been registered on the local workstation in the same hierarchical tree format used in the Contract Repository-as modules, interface objects, operations (TUXEDO services), and the parameters contained in the operations. (For further explanation, see Table 3-2 in the section on the Contract Repository.) The local view includes only locally registered objects.
In Figure 3-4, the workstation view contains one module, BANKAPP. The BANKAPP module has been expanded out to show the two interfaces it contains (TELLER and BACKOFFICE).
The TELLER interface is expanded to show that it contains three operations (or services), DEPOSIT, INQUIRY, and WITHDRAWAL. The INQUIRY operation contains one input parameter (ACCOUNTID), one output parameter (SBALANCE), and one exception parameter (INQUIRYException).
The BACKOFFICE interface is expanded to the operation level. It contains two operations: OPEN_ACCT and CLOSE_ACCT.
As shown in Figure 3-4, the bottom panel shows the sample code for the currently selected object. The sample code is generated in the language of the client tool you specify as the default from the drop-down combo box on the main window tool bar. (See Specifying the Target Client Tool for Sample Code.)
In addition to setting the client tool language (Visual Basic, PowerBuilder, or Visual C++), you can specify numerous other sample code default options that control how the sample code gets generated. There are options to specify authentication values, error handling code, and transaction object code. Advanced sample code options let you specify late or early binding, variable naming schemes, and GUI control naming schemes.
For information on setting sample code default values, refer to the section "Working with Sample Code."
You can view sample code for an object in three different modes; Declarations, Usage, and Cleanup. To change the sample code mode click on one of these three tabs. (You can also choose View->SampleCodeMode from the menu bar or use the keyboard shortcuts mentioned in the following table.)
There are two ways to copy sample code:
Copying Sample Code
(Keyboard shortcuts are Ctrl C or Alt E C.)
To register (or add) an object on your local workstation:
Registering Objects on the Local Workstation
Or
Choose Add from the popup menu on the selected object (right mouse click to get popup menu).
Or
Drag the module or interface icon from the Repository window to the Workstation window.
(Keyboard shortcuts to add a module are Alt O A or F3. Keyboard shortcuts to add an interface object are Alt O A or F4.)
The new object is registered on your local workstation and displayed in the Workstation Objects window.
When you register (add) a module to the local workstation, you automatically register all of the interface objects contained in the module.
When you register (add) an interface object only and the parent module does not exist on the local workstation, you automatically register both the interface object and the parent module to the local workstation. The new workstation module contains only this interface object.
If the parent module already exists on the local workstation, the interface object is registered locally as a child of that module.
You can remove an object from your local workstation at the module or interface level. When you remove an object from the workstation, you remove it from the local Windows registry and from your local view. (This in no way affects the objects in the shared Contract Repository database.)
To remove an object from your local workstation Windows registry:
Or
Choose Remove on the popup menu (right mouse click to get popup menu).
(Keyboard shortcuts to remove an object are Alt O R or the Delete key.)
The object is removed from the local Windows registry and no longer appears in the Workstation Objects view.
You can reload modules on the Workstation object tree to ensure that the TUXEDO objects showing in your Workstation Objects view are up-to-date based on source objects showing in the Contract Repository view. (An out-date module displays as a white ghost module on the Workstation Objects tree.)
To refresh a local module, select the out-of-date module on the Workstation Objects view and choose Tools->Refresh from the menu bar. The local module is updated based on the current view of the Contract Repository.
Note: This action only refreshes the local workstation view of objects against the current view of the Contract Repository. If you think there may be changes to the repository taking place during the current Active Expert session and you want to ensure that you have an up-to-date view of the repository, you need to exit the Active Expert Application Builder and restart.