Setting up workspaces
The APEX import mechanism allows us to import any full application export to any APEX workspace we need. However, when dealing with individual application components, for example a single page or a shared component, it only allows importing it into an identical workspace as the component's original workspace. This means that if we want to easily port applications and application components between several APEX instances, like our Development, Test, and Production environments, we must define identical workspaces in all of them.
Workspaces in APEX are allocated a unique number ID (referenced in the code as security_group_id)
. To setup identical workspaces across all our environments we first need to create the workspace that we'll use for development. Then, we can use the Export Workspace wizard to generate a script that includes all the necessary statements to create a new APEX workspace (including its defined users). This script can be used by the Import Workspace...