Databases Reference
In-Depth Information
You typically use an identical setup in all three environments: all environments use the exact same
workspace name, workspace id, and application id, as well as the parsing schema. This approach was
mandatory to support a script-based deployment in all releases prior to APEX 4.0.
The reason for that can be seen in an APEX application export file; the relevant commands are
outlined in Listing 9-2. In order to install the application into another APEX instance you can either go
through the APEX Application Builder wizard or run the application export file from SQL*Plus on the
command line. For the latter approach you have to connect to the database as the owner of the
application (parsing schema) or as the owner of APEX itself (e.g., APEX_030200). As you can see, the
workspace id and the application id as well as the parsing schema are hard-coded in the application file.
Listing 9-2. APEX Application Export File
-- Import:
-- Using application builder
-- or
-- Using SQL*Plus as the Oracle user APEX 030200 or as the owner (parsing schema)
-- of the application.
prompt Set Credentials...
wwv flow api.set security group id(p security group id => 1635506190835543);
-- SET APPLICATION ID
wwv flow.g flow id := 100;
wwv flow api.g id offset := 0;
-- Remove Application
wwv flow api.remove flow(100);
--application/create application
wwv flow api.create flow(
p id => 100,
p display id=> 100,
p owner => 'FM',
p name => 'Application Lifecycle Management Sample (v2.0.0.0)',
p alias => 'F104116 1',
...
);
There are situations where you would want to change some of these parameters. Your setup might
be different in the different environments (development, test, production) or you might want to set up
an identical training environment for multiple users. Starting with APEX 4.0 the new package
APEX APPLICATION INSTALL has been added for that purpose.
Thus you could use the following source code in Listing 9-3 to install the facility management
application in version 2.0.0.0 in a different system, using alternative values for these parameters .
Listing 9-3. Override Values in the Application Export Using APEX APPLICATION INSTALL
declare
l workspace id number;
begin
-- determine the workspace id for the workspace FM in the target system
Search WWH ::




Custom Search