| 4GL Engine |  |
| The 4GL engine handles the default behavior of a session. If additional functionality is needed or default functionality needs to be by-passed, this should be programmed in a UI script (Program script). When a session is started, the session’s object will run. The object and the form work together to perform queries and present data on the form. The sequence of actions that take place are: The object allocates memory space for a record buffer based on the table definition. The object builds a SQL statement to select rows from the main table and related tables. The record buffer is populated within a selectdo loop. The record buffer variables are updated after the query and are available for use on forms. The form fields are mapped to the record buffer and display on the form. This sequence of actions is an overview of the actions that take place within a session. The detailed actions are coded. The 4GL Engine (also called the standard program) provides this standardized coding and enforces consistency across sessions in the system. The 4GL Engine controls the processing of a session: The session startup including checking for authorizations, loading icons and pull-down menus. Loading the forms, reports, and charts. Performing queries on the main table for the user’s company, which includes selects, inserts, updates, and deletes. Scrolling through data selections. Checking that a reference to another table exists, such as checking that a Department exists for an Employee. Handling the right forms, labels, and menus for a user’s language. Choose the device for output. Note The exceptions to the normal processing are contained in the Session Object. The session object uses events to hook into the 4GL Engine, and describe the actions that should happen as a result of an event. These additional actions are defined in the UI script (program script). For more information, refer to the UI scripts section. |