Progress
Open Client
Developer’s Guide
Specifying 4GL Procedures and User-defined Functions
To specify 4GL procedures for an AppObject or SubAppObject definition, you must:
- Set the Propath Components list box to allow ProxyGen to locate the available r-code files.
- Add the r-code files for this object from the set of files made available under the directories specified as Propath Components. Add each procedure according to whether it is executed non-persistently or persistently.
- Optionally, customize each procedure entry to configure the corresponding method (if non-persistent) or ProcObject (if persistent).
- Optionally, for ProcObjects only, customize the method definitions for all specified internal procedures and user-defined functions.
The following sections provide information about:
Setting the Propath Components List Box
To access the procedures for AppObject and SubAppObject definitions, you must first specify, in the Propath Components list box, the directories that contain the r-code for these procedures. Typically, these directories correspond to a portion of the AppServer PROPATH environment setting. You can add, edit, or remove a Propath Component using the New, Edit, and Delete buttons on the AppObject tab folder.
You can only add 4GL procedures to a proxy that ProxyGen can locate using the Propath Components setting. The PROPATH environment variable itself might be different between the development and deployment machines, but the relative path for the r-code files below a specified PROPATH directory must remain unchanged. Thus, if you move the r-code files to a separate development machine for access by ProxyGen, make sure that you maintain the directory structure used for relative pathnames under the Propath Components setting.
Adding and Deleting Procedure Files
You can add any 4GL procedure file to an AppObject or SubAppObject definition, provided that the compiled (r-code) version of the file is available to ProxyGen through the Propath Components setting. For information on compiling 4GL procedures, see the Progress Programming Handbook .
NOTE: If you are generating a Java proxy that accesses a Progress SmartDataObject as an SDOResultSet, you do not have to make the compiled r-code for the SmartDataObject available to ProxyGen. The Java SDOResultSet already understands how to access standard SmartDataObject functionality. For more information, see Using SmartDataObjects From Java Clients." However, if you are defining a ProcObject in ProxyGen to directly access the SmartDataObject as a Progress persistent procedure, you must make the compiled r-code available to ProxyGen, like any other 4GL procedure.To add procedure files to your object definition:
These choices display either the Add Procedures dialog box or the Add Persistent Procedures dialog box for your current proxy object. The user interface is almost identical for the two dialog boxes. Both dialog boxes allow you to:
- Select r-code files under a pathname selected from your Propath Components setting (Propath Selection list box).
- Specify whether to use the relative pathname of selected procedures as part of the corresponding method name in the proxy (Use Path in Method Name check box).
- Request that any directories that you select be searched recursively (Perform Recursive Add check box).
- Add the selected files to the Procedures tab folder for the current AppObject or SubAppObject definition (Add button). The procedures that you add depend on what files and directories you have selected in the Folders tree and Folder Contents list.
The difference between the two dialog boxes is in the execution type of the procedure file that is added. A method is generated in the proxy for each non-persistent procedure. A ProcObject class factory method is generated for each persistent procedure. (For information on proxy methods, see "Overview," and Programming Concepts.")
After selecting and adding the respective procedure files, any non-persistent procedures appear in the Procedures list and any persistent procedures appear in the Persistent Procedures list of the Procedures tab folder on the main window.
To delete procedures from either list in the Procedures tab folder:
Changing the Execution Mode (Type)
You can change the execution mode type of any procedure files already added to a proxy object definition using the Procedures tab folder. This folder allows you to select and move procedures between non-persistent execution (Procedures list) and persistent execution (Persistent Procedures list).
To move procedures between modes:
Customizing Method and ProcObject Definitions
You can customize method and ProcObject definitions for added procedure files according to your application requirements. From the Procedures tab folder:
This displays the corresponding Customize Procedure or Customize Persistent Procedure dialog box for your proxy object. Both dialog boxes provide:
- A Procedure tab folder to modify the name and description of the associated method or ProcObject
- A Parameters tab folder to modify the behavior of method or ProcObject parameters
- A check box (Use AppObject Unknown Setting) that specifies whether to use the AppObject or SubAppObject setting to allow the 4GL unknown value (?) in parameters and return values
The Customize Persistent Procedure dialog box also has an Internal Procs tab folder to customize methods (internal procedures and user-defined functions) of the specified ProcObject.
In the Procedure tab folder, you can:
In the Parameters tab folder, you can set check boxes to indicate whether one or more method or ProcObject parameters allow the 4GL unknown value (?). If you check the Use AppObject Unknown Setting box, these parameter check boxes are disabled.
In the Internal Procs tab folder for ProcObjects (Customize Persistent Procedure dialog box):
Customizing Method Definitions In a ProcObject
You can customize the definitions for methods included in a ProcObject according to your application requirements. From the Customize Persistent Procedure dialog box:
The Customize Internal Procedure/UDF dialog box appears. This dialog box provides:
- A Procedure tab folder to modify the name and description of the method associated with the selected internal procedure or user-defined function.
- A Parameters tab folder to modify the behavior of any method parameters
- A check box (Use AppObject Unknown Setting) that specifies whether to use the AppObject or SubAppObject setting to allow the 4GL unknown value (?) in method parameters and return values
- For user-defined functions, a check box (Allow Unknown Return) that specifies whether to allow the 4GL unknown value (?) in function return values.
In the Procedure tab folder, you can:
In the Parameters tab folder, you can set check boxes to indicate whether one or more method parameters allow the 4GL unknown value (?). If you check the Use AppObject Unknown Setting box, these parameter check boxes are disabled.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |