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 from Flows v22.2 onwards, 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 support Oracle APEX 20.2 and later. (20.1 is no longer supported as we rely on Automations and other βnewβ features).
- 22.1 and later is required to support APEX Approval Tasks and the Unified Task List.
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): 23.1
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 22.1 version and you want to migrate to 23.1, you have to migrate first from 22.1 to 22.2 and then migrate from 22.2 to 23.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.
- 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 files in sequence.
01_migrate_engine_222_231.sql
02_migrate_engine_222_231.sql
03_migrate_engine_222_231.sql
04_migrate_engine_app_and_data_222_231.sql
05_migrate_engine_app_and_data_222_231.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.
- In Logging, set up the BPMN Logging destination. This is used to store logged / archived copies of your process diagrams so that you can see if there were any diagram changes made, as well as being able to understand archived instance logs in the future.
- In Archiving, do a similar configuration to specify the location for your Instance Archive Summaries. These JSON documents summarise everything that happened when a process instance was run, and can be stored in a database table or in OCI Object Storage.
-
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
-
Using the APEX Application Builder, open the Flows for APEX Application. open Shared Components and go to Automations. It should contain 4 Automations which create archibve summaries, purge logs, create and purge statistics. Enable these automations. See Event Logging and Auditing for firther details.
- 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.