Red Hat Training

A Red Hat training course is available for Red Hat Process Automation Manager

Chapter 3. Migrating Business Central as design environment only

If you use Business Central to design business assets but do not use Business Central as an execution server with live tasks and process instances in Red Hat JBoss BPM Suite 6.4., then follow the steps in this section to migrate to Red Hat Process Automation Manager 7.0.

If you use Business Central as both a design environment and an execution server with live tasks and process instances, follow the migration steps in Chapter 4, Migrating Business Central as design environment and execution server. A separate migration path is required to transfer execution server functionality to the Process Server for Red Hat Process Automation Manager 7.0, in addition to Business Central data.

Prerequisites

  • Red Hat Process Automation Manager 7.0 is installed on a separate instance from Red Hat JBoss BPM Suite 6.4 (on Red Hat JBoss EAP or other instance). For installation options, see Planning a Red Hat Process Automation Manager installation.
  • All Business Central data for Red Hat JBoss BPM Suite 6.4, including a database used with it (if applicable), has been fully backed up. This is a precaution in case of problems during migration.

3.1. Use the Business Central migration tool

Red Hat Process Automation Manager 7.0 contains a modified data structure and other feature changes that do not support a direct data migration from Red Hat JBoss BPM Suite 6.4. Therefore, Red Hat provides a migration tool that enables you to migrate project data and configurations from Red Hat JBoss BPM Suite 6.4 to Red Hat Process Automation Manager 7.0. You can run the migration tool on the .niogit directory of your Business Central distribution or on an external Git repository. The migration tool prepares your Business Central data for the new data structure and features supported in Red Hat Process Automation Manager 7.0.

3.1.1. Using the migration tool on a .niogit directory

The .niogit directory of your Business Central distribution contains all Business Central data. You can use the Business Central migration tool on your .niogit directory to prepare project data and system configurations for migration to Red Hat Process Automation Manager 7.0.

Prerequisites

  • Business Central is not running for either Red Hat JBoss BPM Suite 6.4 or Red Hat Process Automation Manager 7.0.
  • Java 8 is installed and is available on the path where the project migration tool will be installed.

Procedure

  1. Locate the bin/.niogit directory in your current Business Central distribution for Red Hat JBoss BPM Suite 6.4 and locate the same directory in your new Red Hat Process Automation Manager 7.0 installation.

    Example:

    $ ~/$JBOSS_HOME/bin/.niogit
    $ ~/$RHPAM_HOME/bin/.niogit
  2. In your command terminal, copy the .niogit directory from your current Business Central distribution for Red Hat JBoss BPM Suite 6.4 to the bin folder of the new Red Hat Process Automation Manager 7.0 installation directory:

    cp -r /$JBOSS_HOME/bin/.niogit  /$RHPAM_HOME/bin/

    The copied .niogit folder is the directory that the migration tool will prepare for Red Hat Process Automation Manager 7.0. The original .niogit folder remains in your Red Hat JBoss BPM Suite 6.4 installation and will not be modified by the migration tool in this procedure.

  3. In the Red Hat Process Automation Manager 7.0 bin directory, delete the .index directory. You must delete this folder because Red Hat Process Automation Manager 7.0 comes with certain updates that are not compatible with Red Hat JBoss BPM Suite 6.4. The bin directory will be re-indexed after the migration when you start Red Hat Process Automation Manager 7.0.
  4. Note the path to the copied .niogit directory for Red Hat Process Automation Manager 7.0. The path will be required when you run the migration tool.
  5. If you have specific dependencies, repositories, or pluginRepositories that you want to add, remove, or update as part of the project migration, create a pom-migration.json file containing these elements. When you run the migration tool, the tool will prompt you if you want to include this file in the migration.

    The pom-migration.json file requires the following sections:

    • "dependencies":[]
    • "repositories-add":[]
    • "repositories-remove":[]
    • "repositories-update-urls":[]
    • "pluginRepositories-add":[]
    • "pluginRepositories-remove":[]
    • "pluginRepositories-update-urls":[]

    If any of these elements do not apply to your project, include them as empty sections to prevent parsing errors.

    Example pom-migration.json file:

    {
      "dependencies":[
    
        {"groupId":"junit", "artifactId":"junit", "version":"4.12", "scope":"test"},
        {"groupId":"com.thoughtworks.xstream", "artifactId":"xstream", "version":"4.12", "scope":"test"}
    
      ],
    
      "repositories-add":[
        {
          "id":"jboss-public-repository-group",
          "name":"JBoss Public Repository Group",
          "url":"http://repository.jboss.org/nexus/content/groups/public/",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":true,
          "snapshotUpdatePolicy":"never"
        },
        {
          "id":"kie-internal-staging-repository-group",
          "name":"KIE Internal Staging Repositories",
          "url":"https://origin-repository.jboss.org/nexus/content/groups/kie-internal-group",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":false,
          "snapshotUpdatePolicy":"never"
        }
      ],
    
      "repositories-remove":[
        {
          "id":"productization-repository", "url":"http://download.lab.bos.redhat.com/brewroot/repos/jb-ip-6.1-build/latest/maven/"
        }
      ],
    
      "repositories-update-urls":[
        {
          "id":"guvnor-m2-repo", "url":"http://localhost:8080/business-central/maven3/"
        }
      ],
    
      "pluginRepositories-add":[
    
        {
          "id":"jboss-public-repository-group",
          "name":"JBoss Public Repository Group",
          "url":"http://repository.jboss.org/nexus/content/groups/public/",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":true,
          "snapshotUpdatePolicy":"never"
        },
        {
          "id":"kie-internal-staging-repository-group",
          "name":"KIE Internal Staging Repositories",
          "url":"https://origin-repository.jboss.org/nexus/content/groups/kie-internal-group",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":false,
          "snapshotUpdatePolicy":"never"
        }
    
      ],
      "pluginRepositories-remove":[],
      "pluginRepositories-update-urls":[]
    }

    Example pom-migration.json file with dependencies only:

    {
      "dependencies":[
    
        {"groupId":"junit", "artifactId":"junit", "version":"4.12", "scope":"test"},
        {"groupId":"com.thoughtworks.xstream", "artifactId":"xstream", "version":"4.12", "scope":"test"}
    
      ],
      "repositories-add":[],
      "repositories-remove":[],
      "repositories-update-urls":[],
      "pluginRepositories-add":[],
      "pluginRepositories-remove":[],
      "pluginRepositories-update-urls":[]
    }
  6. Navigate to the Software Downloads page in the Red Hat Customer Portal (login required), and select the product and version from the drop-down options:

    • Product: Process Automation Manager
    • Version: 7.0
  7. Download Red Hat Process Automation Manager 7.0.0 Add-Ons and extract the downloaded rhpam-7.0.0-add-ons.zip file to a temporary directory.
  8. In the extracted rhpam-7.0.0-add-ons folder, extract the rhpam-7.0-migration-tool.zip sub-folder. The migration tool is in the bin directory.
  9. In your command terminal, navigate to the temporary directory where you extracted the rhpam-7.0-migration-tool folder and run the migration tool. The $RHPAM_NIOGIT_DIR portion is the path to the .niogit directory that you previously copied to the Red Hat Process Automation Manager 7.0 installation.

    On Linux or UNIX-based systems:

    $ cd $INSTALL_DIR/rhpam-7.0-migration-tool/bin
    $ ./migration-tool.sh -t $RHPAM_NIOGIT_DIR

    On Windows:

    $ cd $INSTALL_DIR\rhpam-7.0-migration-tool\bin
    $ migration-tool.bat -t $RHPAM_NIOGIT_DIR

    In the command prompt that appears, the following options are displayed:

    • Project structure migration: Migrates the Red Hat JBoss BPM Suite 6.4 project repository structure to the new project-oriented structure used in Red Hat Process Automation Manager 7.0.
    • System configuration directory structure migration: Migrates the system.git repository structure used in Red Hat JBoss BPM Suite 6.4 to the new structure used in Red Hat Process Automation Manager 7.0. This migration option requires the project structure migration to be executed first.
    • Forms migration: Migrates forms created in the Red Hat JBoss BPM Suite 6.4 forms designer to the new forms designer. This migration option requires the project structure migration and system configuration directory structure migration to be executed first.
    • POMs migration: Updates pom.xml files with dependencies required for Red Hat Process Automation Manager 7.0. This migration option requires the project structure migration, system configuration directory structure migration, and forms migration to be executed first.
    • All: Runs all migration options in sequence.
    • Exit: Exits the migration tool.
  10. Select the option to run All migrations in sequence.

    Note

    If you prefer to run one migration option at a time, select and run the first individual migration option. After the tool runs, re-run the Business Central migration tool and select the next individual migration option in the sequence.

  11. Enter yes each time you are prompted to run a specific migration option.

    For the POMs migration option, if you want to include a path to an external pom-migration.json file that you created previously, enter yes when prompted and enter the path.

  12. After the tool finishes running, enter the option to Exit the migration tool.

    The .niogit directory structure is now compatible with Business Central in Red Hat Process Automation Manager 7.0. Project directories are in separate repositories and all other related configurations have been migrated. You can navigate to the new .niogit directory to inspect the restructured contents.

3.1.2. Using the migration tool on an external Git repository

If you store Business Central project data in a Git repository outside of your .niogit directory, you can also use the Business Central migration tool on the external repository to prepare project data for Red Hat Process Automation Manager 7.0. Only files in project directories in the Git repository will be restructured by the migration tool.

Prerequisite

Java 8 is installed and is available on the path where the project migration tool will be installed.

Procedure

  1. In a local directory, create a clone of the Git repository containing the projects to be migrated (if the repository has not been cloned already).

    $ cd $REPO_DIR/
    $ git clone $GIT_REPO_URL
  2. Note the path to the cloned Git repository. The path will be required when you run the migration tool.
  3. Create an output directory where a copy of the newly migrated repository or repositories will be placed after the migration tool runs. You can also use an existing directory as an output location. Note the path to this output directory. The migration tool operates on a copy of the cloned repository and will prompt you for the new output directory path when you run the tool.
  4. If you have specific dependencies, repositories, or pluginRepositories that you want to add, remove, or update as part of the project migration, create a pom-migration.json file containing these elements. When you run the migration tool, the tool will prompt you if you want to include this file in the migration.

    The pom-migration.json file requires the following sections:

    • "dependencies":[]
    • "repositories-add":[]
    • "repositories-remove":[]
    • "repositories-update-urls":[]
    • "pluginRepositories-add":[]
    • "pluginRepositories-remove":[]
    • "pluginRepositories-update-urls":[]

    If any of these elements do not apply to your project, include them as empty sections to prevent parsing errors.

    Example pom-migration.json file:

    {
      "dependencies":[
    
        {"groupId":"junit", "artifactId":"junit", "version":"4.12", "scope":"test"},
        {"groupId":"com.thoughtworks.xstream", "artifactId":"xstream", "version":"4.12", "scope":"test"}
    
      ],
    
      "repositories-add":[
        {
          "id":"jboss-public-repository-group",
          "name":"JBoss Public Repository Group",
          "url":"http://repository.jboss.org/nexus/content/groups/public/",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":true,
          "snapshotUpdatePolicy":"never"
        },
        {
          "id":"kie-internal-staging-repository-group",
          "name":"KIE Internal Staging Repositories",
          "url":"https://origin-repository.jboss.org/nexus/content/groups/kie-internal-group",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":false,
          "snapshotUpdatePolicy":"never"
        }
      ],
    
      "repositories-remove":[
        {
          "id":"productization-repository", "url":"http://download.lab.bos.redhat.com/brewroot/repos/jb-ip-6.1-build/latest/maven/"
        }
      ],
    
      "repositories-update-urls":[
        {
          "id":"guvnor-m2-repo", "url":"http://localhost:8080/business-central/maven3/"
        }
      ],
    
      "pluginRepositories-add":[
    
        {
          "id":"jboss-public-repository-group",
          "name":"JBoss Public Repository Group",
          "url":"http://repository.jboss.org/nexus/content/groups/public/",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":true,
          "snapshotUpdatePolicy":"never"
        },
        {
          "id":"kie-internal-staging-repository-group",
          "name":"KIE Internal Staging Repositories",
          "url":"https://origin-repository.jboss.org/nexus/content/groups/kie-internal-group",
          "releasesEnabled":true,
          "releasesUpdatePolicy":"never",
          "snapshotEnabled":false,
          "snapshotUpdatePolicy":"never"
        }
    
      ],
      "pluginRepositories-remove":[],
      "pluginRepositories-update-urls":[]
    }

    Example pom-migration.json file with dependencies only:

    {
      "dependencies":[
    
        {"groupId":"junit", "artifactId":"junit", "version":"4.12", "scope":"test"},
        {"groupId":"com.thoughtworks.xstream", "artifactId":"xstream", "version":"4.12", "scope":"test"}
    
      ],
      "repositories-add":[],
      "repositories-remove":[],
      "repositories-update-urls":[],
      "pluginRepositories-add":[],
      "pluginRepositories-remove":[],
      "pluginRepositories-update-urls":[]
    }
  5. Navigate to the Software Downloads page in the Red Hat Customer Portal (login required), and select the product and version from the drop-down options:

    • Product: Process Automation Manager
    • Version: 7.0
  6. Download Red Hat Process Automation Manager 7.0.0 Add-Ons and extract the downloaded rhpam-7.0.0-add-ons.zip file to a temporary directory.
  7. In the extracted rhpam-7.0.0-add-ons folder, extract the rhpam-7.0-migration-tool.zip sub-folder. The migration tool is in the bin directory.
  8. In your command terminal, navigate to the temporary directory where you extracted the rhpam-7.0-migration-tool folder and run the migration tool. The $GIT_REPO_PATH portion is the path to the cloned Git repository.

    On Linux or UNIX-based systems:

    $ cd $INSTALL_DIR/rhpam-7.0-migration-tool/bin
    $ ./migration-tool.sh -t $GIT_REPO_PATH

    On Windows:

    $ cd $INSTALL_DIR\rhpam-7.0-migration-tool\bin
    $ migration-tool.bat -t $GIT_REPO_PATH
  9. In the command prompt that appears, enter the path to the output directory where the migrated copy of the repository will be placed. The migration tool operates on a copy of the cloned repository and will place the new repository or repositories in the output location that you specify.

    After you enter the output location, the migration tool prepares the repository copy and restructures all project directories to be compatible with Red Hat Process Automation Manager 7.0.

    In the command prompt, the following additional migration options are displayed:

    • Forms migration: Migrates forms created in the Red Hat JBoss BPM Suite 6.4 forms designer to the new forms designer.
    • POMs migration: Updates pom.xml files with dependencies required for Red Hat Process Automation Manager 7.0. This migration option requires the forms migration to be executed first.
    • All: Runs all remaining migration options in sequence.
    • Exit: Exits the migration tool.
    Note

    The Project structure migration option is not displayed because that option was run automatically when you entered the output location to initiate the migration tool.

  10. Select the option to run ALL migrations in sequence.

    Note

    If you prefer to run one migration option at a time, select and run the first individual migration option. After the tool runs, re-run the Business Central migration tool and select the next individual migration option in the sequence.

  11. Enter yes each time you are prompted to run a specific migration option.

    For the POMs migration option, if you want to include a path to an external pom-migration.json file that you created previously, enter yes when prompted and enter the path.

  12. After the tool finishes running, enter the option to Exit the migration tool.

    The project directories in the specified output location are now separated into individual repositories compatible with Business Central in Red Hat Process Automation Manager 7.0. The new project repositories are bare repositories with no working directory, and therefore do not show any content files. You can clone each repository to create non-bare repositories and inspect directory contents.

  13. Log in to Business Central for Red Hat Process Automation Manager 7.0.
  14. For each project, create or select the space for the project and click Import Project.
  15. Enter the Repository URL for the newly structured project repository. This URL may be the local file path to the output location if you are importing directly from the workstation where you ran the migration tool, or a GitHub URL or other file hosting location where you have uploaded the repository.

    Example: Local file location

    file:///$OUTPUT_DIR/loan-application.git

    Example: GitHub repository location

    https://github.com/$REPO/loan-application.git
    Note

    If you use Git hooks with your project data, you may need to update your hooks scripts to accommodate the migration.

3.2. Upgrade your database

Red Hat Process Automation Manager 7.0 contains updates to the database schema for optimal performance with the new Business Central and Process Server. You must update the Red Hat JBoss BPM Suite 6.4 database to be used with Red Hat Process Automation Manager 7.0 using one of the upgrade scripts provided with this release to accommodate the change.

Prerequisites

  • The Red Hat Process Automation Manager 7.0.0 Add-Ons distribution has been downloaded from the Red Hat Customer Portal and extracted to a temporary directory.
  • The database has been backed up, as a precaution.

Procedure

  1. Navigate to the extracted rhpam-7.0.0-add-ons folder in your temporary directory and extract the rhpam-7.0-migration-tool.zip sub-folder (if not extracted already).
  2. Navigate to the extracted rhpam-7.0-migration-tool folder and open the upgrade-scripts folder. This folder contains database upgrade scripts that are required for applying changes to the database model made in Red Hat Process Automation Manager 7.0.
  3. Log on to the Red Hat JBoss BPM Suite 6.4 database to be used with Red Hat Process Automation Manager 7.0 and run the relevant Red Hat Process Automation Manager 7.0 upgrade script, according to the supported database type. This prepares the database for Red Hat Process Automation Manager 7.0.
  4. If you use Quartz as your scheduling service, additionally run the quartz-upgrade.sql script provided in the relevant database folder within the upgrade-scripts folder. This script updates your Quartz version to 2.2.3 in compliance with Red Hat Process Automation Manager 7.0 requirements.

3.3. Update API references to Business Central Knowledge Store

The Knowledge Store REST API has been deprecated in Red Hat Process Automation Manager 7.0, but certain endpoints are still supported so that you can continue to manage Business Central resources. If any of your applications interact with Business Central spaces (previously organizational units), repositories, and projects through Knowledge Store REST API calls (/business-central/rest/), you must update these API references according to the new endpoints supported in Red Hat Process Automation Manager 7.0.

Procedure

Wherever applicable in your application code, replace any legacy REST API calls to the Business Central Knowledge Store in the format http://<SERVER>:<PORT>/business-central/rest/<ENDPOINT> with the new corresponding Knowledge Store REST API calls listed in Section 3.3.1, “Supported calls to Knowledge Store REST API”.

As a result of the restructured content in Red Hat Process Automation Manager 7.0, the endpoints may differ between the legacy Business Central REST API calls and the corresponding REST API calls in Red Hat Process Automation Manager 7.0. Be sure to use the new endpoints to replace your legacy Business Central REST API calls. If you cannot find a corresponding REST API call in the list to replace a legacy call, then that call is no longer supported in Red Hat Process Automation Manager 7.0.

The following example is an update to a Knowledge Store REST API call for spaces.

Legacy Knowledge Store REST API call:

http://localhost:8080/business-central/rest/organizational-units

New Knowledge Store REST API call:

http://localhost:8080/business-central/rest/spaces

3.3.1. Supported calls to Knowledge Store REST API

The following table lists the Knowledge Store REST API calls supported in Red Hat Process Automation Manager 7.0. The base URL for each listed endpoint is http://<SERVER>:<PORT>/business-central/rest/.

Example call URL for spaces:

http://localhost:8080/business-central/rest/spaces

Table 3.1. Knowledge Store REST API operations

CategoryEndpointHTTP methodDescription

Job calls

/jobs/JOB_ID

GET

Returns a job status

/jobs/JOB_ID

DELETE

Removes a job

Project calls

/projects

GET

Returns a list of all projects

/spaces/SPACE_NAME/projects/PROJECT_NAME

GET

Returns information about a specific project

/spaces/SPACE_NAME/projects/PROJECT_NAME

POST

Creates a project

/spaces/SPACE_NAME/projects/PROJECT_NAME

DELETE

Removes a specified project

/spaces/SPACE_NAME/projects

GET

Returns a list of projects in a given space

/spaces/SPACE_NAME/git/clone

POST

Clones a project into the space from a given Git address

/spaces/SPACE_NAME/projects/PROJECT_NAME

DELETE

Removes a specific project from a given space

Space calls

/spaces

GET

Returns a list of all spaces

/spaces/SPACE_NAME

GET

Returns information about a specific space

/spaces

POST

Creates a space

/spaces/SPACE_NAME

DELETE

Removes a specified space

Maven calls

/spaces/SPACE_NAME/projects/PROJECT_NAME/maven/compile

POST

Compiles a project

/spaces/SPACE_NAME/projects/PROJECT_NAME/maven/test

POST

Tests a project

/spaces/SPACE_NAME/projects/PROJECT_NAME/maven/install

POST

Installs a project

/spaces/SPACE_NAME/projects/PROJECT_NAME/maven/deploy

POST

Deploys a project

3.4. Verify the migration in Business Central

After you use the Business Central migration tool to migrate project data and you upgrade your Red Hat JBoss BPM Suite 6.4 database, verify that the migration was successful in the new Business Central for Red Hat Process Automation Manager 7.0.

Prerequisites

  • Project data from Red Hat JBoss BPM Suite 6.4 has been migrated using the Business Central migration tool.
  • The database configured for Red Hat JBoss BPM Suite has been upgraded.

Procedure

  1. Start Red Hat Process Automation Manager 7.0 depending on your installation.

    Example: Installation with Red Hat JBoss EAP

    $ ~/$EAP_HOME/bin/standalone.sh -c standalone-full.xml
  2. Log in to Business Central with your credentials and navigate to Menu → Design → Projects.
  3. Verify that all projects have been migrated and select each project to verify the migrated project assets.
  4. For each project, click Build and then Deploy in the upper-right corner of the project window to validate the migrated project data and the configured Process Server.

3.4.1. Troubleshooting Business Central migration problems

If you encounter problems with your Business Central migration to Red Hat Process Automation Manager 7.0, review the following troubleshooting suggestions:

  • If any project data is missing from Business Central, ensure that the .niogit directory for Red Hat Process Automation Manager 7.0 contains the restructured data and is in the correct installation location for Red Hat Process Automation Manager 7.0 (for example, ~/$EAP_HOME/bin/).
  • If projects fail to build, open the project pom.xml file and remove the http://<SERVER>:<PORT>/business-central/maven2/ repository, if present. The use of this repository can prevent projects from building properly in Red Hat Process Automation Manager 7.0. If this repository contains project data that you want to preserve, create a new repository for the data and add the repository as a dependency in the pom.xml file.

    Example repository to be removed from pom.xml file:

    <repository>
      <id>guvnor-m2-repo</id>
      <name>Guvnor M2 Repo</name>
      <url>http://localhost:8080/business-central/maven2/</url>
    </repository>
  • If projects fail to deploy to Process Server, review your Process Server installation and configuration. For more information, see Planning a Red Hat Process Automation Manager installation.
  • If you encounter other migration problems, review Chapter 6, Other migration considerations.
  • If you cannot resolve migration problems, complete the migration process again on a new Red Hat Process Automation Manager 7.0 installation.