XamFlow Server Upgrade Guide

This upgrade guide describes the process to upgrade an existing XamFlow and SWAP Server and related client applications to a newer version without losing existing data.

Upgrade

Please perform the following steps in the given order:

Close Interactive Client Applications

  • Instruct all users to close all interactive client applications such as XamFlow Desktop, Evaluation, Visualizer, Report Generator, etc.

Stop Job Services

For each installed Job Service instance do the following:

  • Open the Windows Services dialog.

  • Pause the Scanco Job Service so it doesn’t poll new jobs.

  • Wait until Scanco Job Service has finished any running job (check the log file).

  • Stop Scanco Job Service.

  • In the service details change startup type to Manual to prevent Scanco Job Service from being inadvertently started upon operating system reboots during the upgrade.

Stop XamFlow Worker Services

For each installed XamFlow Worker Service instance do the following:

  • Open the Windows Services dialog.

  • Pause the XamFlow Worker Service so it doesn’t poll new jobs.

  • Wait until XamFlow Worker Service has finished any running job (check the log file).

  • Stop XamFlow Worker Service.

  • In the service details change startup type to Manual to prevent XamFlow Worker Service from being inadvertently started upon operating system reboots during the upgrade.

Stop Web Server

  • Open IIS Manager.

  • Stop the entire server.

Upgrade PostgreSQL

Minor version upgrade

For a minor PostgreSQL version upgrade (e.g. 15.1 → 15.4) simply replace the existing binaries by running the setup of the new version.

Major version upgrade

For a major PostgreSQL version upgrade (e.g. 12.x → 15.x) perform the following steps:

  • In the Windows Services dialog stop the old PostgreSQL service and change its startup type to Manual.

  • Run the setup of the new PostgreSQL version.

    • Use the same password as for the old version. (The steps below assume the password is postgres.)

    • Use the same port as for the old version (44308).

    • Use the same locale as for the old version (English (United States)).

  • Stop the new PostgreSQL service in the Windows Services dialog.

  • Make sure you have a file %APPDATA%\postgresql\pgpass.conf with following content:

    localhost:44308:*:postgres:postgres

  • Create a temporary folder (e.g. C:\Data\DbUpgrade) and grant the Windows user group Users modify rights to it.

  • Open a console in that folder and run the following commands [1] [2]:

    set PG_BIN="C:\XamFlow\PostgreSQL\15\bin"

    set PG_DATA="C:\XamFlow\Database\15"

    set PG_PORT=44308

    set PG_OLD_BIN="C:\Program Files\PostgreSQL\12\bin"

    set PG_OLD_DATA="C:\Program Files\PostgreSQL\12\data"

    set PG_OLD_PORT=5432

    %PG_BIN%\pg_upgrade.exe -b %PG_OLD_BIN% -B %PG_BIN% -d %PG_OLD_DATA% -D %PG_DATA% -p %PG_OLD_PORT% -P %PG_PORT% -U postgres

  • Start the new PostgreSQL service in the Windows Services dialog.

  • If appropriate, run some of the batch files created by pg_upgrade, e.g.:

    • analyze_new_cluster.bat

  • In the Windows Services dialog change the startup type of the old PostgreSQL service to Disabled.

  • When it’s clear the new service is running correctly and only if a backup is no longer needed consider the following:

    • Run the data deletion batch file created by pg_upgrade (delete_old_cluster.bat).

    • Uninstall the old PostgreSQL binaries.

    • Delete the temporary folder used for pg_upgrade (e.g. C:\Data\DbUpgrade).

Footnotes

Required PostgreSQL version

XF Server

PostgreSQL

1.8.9.0 - current

15

1.6.0.0 - 1.8.8.0

12

1.3.2.0 - 1.5.3.0

11

1.2.0.0 - 1.3.1.0

10

1.0.0.0 - 1.1.0.0

9.5

Migrate Database

  • Run the appropriate database upgrade scripts for SWAP and XamFlow.

  • For each of these upgrade scripts run the following SQL command, adjust the module name and target version number accordingly:

    SELECT public.complete_migration('xamflow', '0123');

Install New Server Prerequisites

  • Install any new server prerequisites (e.g. a new .NET version).

Replace Webserver binaries

  • Replace the existing webserver binaries in the following folders with those extracted from the corresponding webserver release zips:

    • C:\inetpub\apps\webapi\

    • C:\inetpub\apps\webadmin\

    • C:\inetpub\apps\xamflow\

    • C:\inetpub\apps\filestorage\

Restart Web Server

  • Open IIS Manager.

  • Start the entire server.

Upgrade Interactive Client Applications

  • Run the installer to upgrade to the new version.

Upgrade XamFlow Packages

  • Install new task type and workflow packages.

Upgrade Job Services

  • Run the installer to upgrade to the new version.

Upgrade and Resume XamFlow Worker Services

  • Run the XamFlow Worker Service installer to upgrade to the new version. (This automatically starts the service and uses startup type Automatic.)

  • If no new version is installed, start the XamFlow Worker Service and change the startup type back to Automatic.

  • Install new dependency packages.