Previous |
Next |
Oracle Application Express provides two ways to import an application into an Application Express instance:
Upload and installation of an application export file via the Web interface of Application Express.
Execution of the application export file as a SQL script, typically in the command-line utility SQL*Plus.
Using the file upload capability of the Web interface of Application Express, developers can import an application with a different application ID, different workspace ID and different parsing schema. But when importing an application via a command-line tool like SQL*Plus, none of these attributes (application ID, workspace ID, parsing schema) can be changed without directly modifying the application export file.
As more and more Application Express customers create applications which are meant to be deployed via command-line utilities or via a non-Web-based installer, they are faced with this challenge of how to import their application into an arbitrary workspace on any APEX instance.
Another common scenario is in training classes, to install an application into 50 different workspaces, all using the same application export file. Today, customers work around this by adding their own global variables to an application export file and then varying the values of these globals at installation time. However, this manual modification of the application export file (usually done with a post-export sed or awk script) shouldn't be necessary.
In Application Express 4.0 and higher, the APEX_APPLICATION_INSTALL API is available. This PL/SQL API provides a number of methods to set application attributes during the Application Express application installation process. All export files in Application Express 4.0 and higher contain references to the values set by the APEX_APPLICATION_INSTALL API. However, the methods in this API will only be used to override the default application installation behavior.
Attributes Manipulated by APEX_APPLICATION_INSTALL
The table below lists the attributes that can be set by functions in this API.
Attributes Manipulated by the APEX_APPLICATION_INSTALL API
Attribute | Description |
---|---|
|
Workspace ID of the imported application. See GET_WORKSPACE_ID Function, SET_WORKSPACE_ID Procedure. |
Application ID |
Application ID of the imported application. See GENERATE_APPLICATION_ID Procedure, GET_APPLICATION_ID Function, SET_APPLICATION_ID Procedure. |
|
Offset value used during application import. See GENERATE_OFFSET Procedure, GET_OFFSET Function, SET_OFFSET Procedure. |
Schema |
The parsing schema ("owner") of the imported application. See GET_SCHEMA Function, SET_SCHEMA Procedure. |
Name |
Application name of the imported application. See GET_APPLICATION_NAME Function, SET_APPLICATION_NAME Procedure. |
Alias |
Application alias of the imported application. See GET_APPLICATION_ALIAS Function, SET_APPLICATION_ALIAS Procedure. |
Image Prefix |
The image prefix of the imported application. See GET_IMAGE_PREFIX Function, SET_IMAGE_PREFIX Procedure. |
Proxy |
The proxy server attributes of the imported application. See GET_PROXY Function, SET_PROXY Procedure. |