An application that runs in Forms Builder is not yet an application users can start. It must be compiled in the right order, its compiled files placed where the Forms server finds them, and given a URL of its own that starts at the right form with the right environment.
This guide walks through deploying a multi-form application on Oracle Forms 14.1.2: compiling it, copying the files, creating an environment file and a configuration section, and starting it.
Sample Application for This Guide
The steps use a sample application of a library, a menu, and six forms, from the Oracle Forms code repository on GitHub: the library cw_lib.pll, the object library and template in forms/ch28, the menu and forms in forms/ch40, and the report in reports. How these modules fit together is explained in how to structure a multi-form Oracle Forms application.
The forms run against the CareWell Clinic sample schema, which you install first.
Step 1: Compile in Order
Forms needs modules compiled in dependency order:
- The PL/SQL library, because the menu and every form attach it.
- The menu.
- The forms, including the template, which compiles like any form even though no user runs it.
The object library has nothing to compile: its objects are copied into the forms when they are compiled.
The script compile-all.sh from the repository's tools folder does this in one run. Copy all the modules into one directory that is in FORMS_PATH, so the compiler finds the attached library.
Syntax:
compile-all.sh <directory> <userid>
Run on the sample application, it compiled everything.
Output:
compiled 8 of 8 modules
The eight are the library, the menu, and six forms. The script and the compiler options are covered in how to automate Oracle Forms builds from the command line.
Step 2: Copy the Compiled Files
Users run compiled files only:
| Files | Go to |
|---|---|
| .plx (library), .mmx (menu), .fmx (forms) | A directory in the FORMS_PATH of the application's environment file |
| .rdf (report) | A directory in the Reports server's path |
Running reports from a form, including the Reports configuration, is covered in how to run Oracle Reports from a form using RUN_REPORT_OBJECT.
Step 3: Create an Environment File
Give the application its own environment file, carewell.env: a copy of default.env with two changes.
- The application's directory added to FORMS_PATH.
- COMPONENT_CONFIG_PATH set, so the forms can run the report.
A separate file keeps the application's settings apart from other applications on the same server. See how to set the Oracle Forms runtime environment with default.env.
Step 4: Add a Configuration Section
A section of formsweb.cfg gives the application its own name, first form, and environment.
Example (a section of formsweb.cfg):
[carewell] form=cw_login.fmx pageTitle=CareWell Clinic archive=frmall.jar,carewell_icons.jar envFile=carewell.env
| Parameter | Sets |
|---|---|
| form | The first form: the sign-in form |
| pageTitle | The title of the page |
| archive | The client's JAR files: Forms' own, plus the application's icons |
| envFile | The environment file from step 3 |
The section has no userid. Users connect to the database through the Forms logon dialog, or the section names the application's database account in Fusion Middleware Control, where the password is stored encrypted. All the parameters are described in how to configure formsweb.cfg in Oracle Forms 14.1.2.
Step 5: Start the Application
Users start the application with the Standalone Launcher and the URL of the section.
The application's URL:
.../forms/frmservlet?config=carewell
In a test, the application ran through an existing section instead, with form=cw_login.fmx added to the URL. That section's userid connected to the database, and the sign-in form did the rest. The Standalone Launcher is set up in how to install Oracle Forms 14.1.2.
Before Going Live
A deployed application needs more than a URL. Check these before real users arrive:
- A database account with only the privileges the application needs.
- Single sign-on, or at least a hashed password check, instead of a sign-in form that only asks who the user is.
- Auditing written by database triggers, so every program is audited, not only the forms.
Production security is covered in how to secure Oracle Forms applications.
Conclusion
To deploy an Oracle Forms application, compile the library first, then the menu and forms, copy the .plx, .mmx, and .fmx files to a directory in FORMS_PATH, and the report to the Reports server's path. Give the application its own environment file and a formsweb.cfg section that names the first form, the JAR files, and the environment file, and users start it from the section's URL.
