Migration
Migrate your system depending on whether you have SQLNet access to your database.
- If you have SQLNet access, follow section 1 followed by section 3.
- If you do not have SQL*Net access, follow section 2 followed by section 3.
Prerequisites
Database:
- Note that the minimum database configuration for Flows for APEX has increased to 19c with this release, due to the requirements to handle large JSON structures reliably.
- If you are running RDBMS 19.3 to 19.10, you must either upgrade to a more current patch release 19.11 or later (probably good anyhow!) or download and apply patch.31843028 from Oracle Support. This fix is included in 19.11.0.0.210420DBRU onwards.
Oracle APEX:
- We still support Oracle APEX 20.1 and later.
- 22.1 and later is required to support APEX Approval Tasks and the Unified Task Inbox.
1. SQL*Net Access Available
We donโt provide the option to migrate your installation with the packaged app, so this process can only be done with SQLcl or SQL Developer. (SQL*Net Access)
Before performing any migration of Flows for APEX, we recommend that you make a backup of your database or schema to avoid any data loss.
Each release of Flows for APEX comes with a migration script for the previous version. That means we donโt provide scripts for migrating several versions at one time. For example, if your current installation runs the 5.1 version and you want to migrate to 21.1, you have to migrate first from 5.1 to 5.1.2 and then migrate from 5.1.2 to 21.1.
For Windows users, please make sure to set NLS_LANG value correctly by running set NLS_LANG=AMERICAN_AMERICA.UTF8
before using SQLcl.
- Get the full distribution content by cloning the repository or downloading the release source code: zip or tar.gz.
- Ensure you have a full backup of your application data and the Flows for APEX data!
- Connect to you Oracle schema with SQLcl, make sure you are located into the distribution folder.
- Run the migration script.
SQL> @src/migrate_all.sql
- Provide the Workspace Name, Parsing Schema, Application Alias, Application Name, the current version and the version you want to upgrade to.
>> Please enter needed Variables Enter Workspace Name: [FLOWS4APEX] FLOWS4APEX Enter Parsing Schema: [FLOWS4APEX] FLOWS4APEX Enter Application Alias: [FLOWS4APEX] FLOWS4APEX Enter Application Name: [Flows for APEX] Flows for APEX Enter current installed release (e.g., 5.1.2): 22.1 Enter next release to upgrade to (e.g., 21.1): 22.2
If the Pre-migration checks identify any problems, please follow the instructions provided and fix any issues before restarting your migration.
- At the end of the migration, you should see the confirmation that the product have been correctly installed. You can connect to your Oracle APEX builder and run the Flows for APEX application.
>> Finished Installation of Flows4APEX >> ====================================
- Then perform the Post Installation Tasks in section 3. below.
2. SQL*Net Access NOT Available
Each release of Flows for APEX comes with a migration script for the previous version. That means we donโt provide scripts for migrating several versions at one time. For example, if your current installation runs the 5.1 version and you want to migrate to 21.1, you have to migrate first from 5.1 to 5.1.2 and then migrate from 5.1.2 to 21.1.
You will use the Oracle APEX SQL Workshop to migrate.
- Ensure you have a full backup of your application data and the Flows for APEX data.
- Download the file
no_sqlnet_migration.zip
from the release page. - Extract the file.
- Upload all included scripts to APEX SQL Workshop.
- Run
01_premigrate_221_222.sql
for pre-migration verification. ! Do not proceed if this shows any warnings or errors ! - Disable the DBMS_SCHEDULER job that drives Flows for APEX timers so that they do not fire during upgrade.
begin flow_timers_pkg.disable_scheduled_job; end; /
- Run the rest of the files in sequence.
02_migrate_engine_221_222.sql
03_migrate_engine_221_222.sql
04_migrate_engine_app_and_data_221_222.sql
- Install the Flows for APEX application by importing the packaged app (make sure to not run the supporting objects scripts)
- Then perform the Post Installation Tasks in section 3. below.
3. Post Installation Tasks
-
Update Workspace Configuration Parameters
- Open the Flows for APEX application. Navigate to the โConfigurationโ button on the top menu bar.
- Set the default Workspace Name
- Set a default application ID and a default username. The App ID and Username must exist in the specified workspace. These parameters are used to create an APEX session when a Flows for APEX task is started from outside of APEX, for example in a process following a timer event. You can adjust these parameters or remove them before your application goes production if you want - but setting defaults here will ensure that any in-flight timers are able to complete once the timers are restarted.
-
Set Session Parameters for any Set Timers Before they Fire.
If you have any Timer events that were created / set before you started migration, when they fire they will be running in v22.2 and will need to create an APEX session when they fire. In order for this to happen correctly, ensure that you have completed the step above by setting the Configuration Parameters. Then download the
migrate_active_timers.sql
script from the gitbub release assets and run it as the workspace owner.- Download the file
migrate_active_timers.sql
from the Flows for APEX release 22.2 assets at https://github.com/flowsforapex/apex-flowsforapex/releases/tag/v22.2 - Run
migrate_active_timers.sql
- Download the file
- Re-enable the DBMS_SCHEDULER job that drives Flows for APEX timers.
begin flow_timers_pkg.enable_scheduled_job; end; /
- Your system should now be running again.