Web transaction support in EGL

Use EGL web transactions to migrate VisualAge® Generator web transactions to EGL.
It is possible to write new code using EGL web transactions, but this code is not efficient. For new code that has a web interface, use one of the following technologies:

VisualAge Generator used web transactions to adapt its Text UI development approach to the web. EGL uses a virtually identical Text UI approach. EGL web transactions somewhat resemble Text UI, except that the VGUIRecord replaces the Form.

Web transaction applications involve two kinds of EGL parts:

EGL treats the VGUIRecord differently depending on whether you are generating code for Java™ or COBOL. When you generate a VGWebTransaction program for COBOL, the program automatically includes the information in the associated VGUIRecord, and displays the record as it would a form in Text UI. In Java generation, the VGUIRecord generates a .jsp file that becomes the user interface for the customer; that .jsp file is used to generate a java bean on the server. Therefore, web transactions produce an actual web interface in Java, but not in COBOL.

When you generate for Java, you can use parameters with web transactions. When you generate for COBOL, using parameters with a web transaction passes validation, but is flagged as an error during generation.

Requirements

Web transactions require that you set the genVGUIRecords build descriptor option to YES. You may want to modify other, related build descriptor options; for more information, refer to the EGL Generation Guide.

The VGUIRecord is a main part; it resides in a source file that has the same name as the part. The name should be no more than 8 characters in length. When you generate a VGUIRecord for Java, EGL creates a Java Server Page, adding a .jsp extension to the name of the record.

VGUIRecords are structured records, and use properties to manage options, links, called programs, validation information, and more. For more information, see VGUIRecord properties and VGUIRecord field properties.

In a VGWebTransaction program, you declare a variable based on the VGUIRecord definition, then use an EGL converse or show statement to display the page.

Web transactions can be used with EGL in one or more of these scenarios:
  • The recommended method is to migrate VisualAge Generator web transactions to EGL VGWebTransaction parts and associated EGL parts. These EGL VGWebTransaction parts can then be incorporated into an existing deployment of an EGL application. See Additional information about EGL for the migration guide.
  • If you must create new EGL VGWebTransaction programs, create them in an EGL web project.
  • It is possible to incorporate existing VisualAge Generator web transactions into an existing EGL application without migrating the VisualAge Generator parts to EGL parts. These web transactions can forward control to an EGL JSF Handler, and the JSF Handler can forward control to a web transaction. See "Transferring control between JSF Handlers and web transactions" in the EGL Programmer's Guide.

Development process

Web transaction development in EGL usually involves the following steps:

  1. Set the build descriptors for the project to specify the appropriate generation and deployment options for the web transactions.
  2. Create an EGL VGUIRecord part.
  3. In the VGUIRecord part, define the data structures and controls (such as buttons) to be shown on the page. When the VGUIRecord part is saved, the VGUIRecord bean and its associated parts are generated, along with a JSP file.
  4. If necessary, customize the JSP file. For more information, see the EGL Programmer's Guide.
  5. Create an EGL VGWebTransaction program.
  6. In the VGWebTransaction, create a variable from the VGUIRecord part.
  7. In a function within the VGWebTransaction, reference the VGUIRecord variable with the converse or show statement. These statements present the web page, using the data in the VGUIRecord.
  8. Generate the VGWebTransaction part.
  9. Run the EGLWebStartup.jsp page on the server or test environment. Use this page to start the VGWebTransaction program that will launch your JSP file.

Feedback