Red Hat Training

A Red Hat training course is available for Red Hat Decision Manager

Chapter 2. Decision Central data migration

You must migrate your Decision Central data from Red Hat JBoss BRMS 6.4 to Red Hat Decision Manager 7.1 using the Decision Central migration tool provided with this release to accommodate a new data structure in Red Hat Decision Manager 7.1. Additionally, if any of your applications interact with Decision Central spaces (previously known as organizational units), repositories, and projects through Knowledge Store REST API calls (/decision-central/rest/), you must update these API references according to the new endpoints supported in Red Hat Decision Manager 7.1.

Prerequisites

  • A clean Red Hat Decision Manager 7.1 installation exists that does not contain a .niogit folder. If the Red Hat Decision Manager 7.1 installation contains a .niogit folder, the migration will fail. For installation options, see Planning a Red Hat Decision Manager installation.
  • All Decision Central data for Red Hat JBoss BRMS 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.

2.1. Use the Decision Central migration tool

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

2.1.1. Using the migration tool on a .niogit directory

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

Prerequisites

  • Decision Central is not running for either Red Hat JBoss BRMS 6.4 or Red Hat Decision Manager 7.1.
  • 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 Decision Central distribution for Red Hat JBoss BRMS 6.4 and locate the same directory in your new Red Hat Decision Manager 7.1 installation.

    Example:

    $ ~/$JBOSS_HOME/bin/.niogit
    $ ~/$RHDM_HOME/bin/.niogit
  2. In your command terminal, copy the .niogit directory from your current Decision Central distribution for Red Hat JBoss BRMS 6.4 to the bin folder of the new Red Hat Decision Manager 7.1 installation directory:

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

    The copied .niogit folder is the directory that the migration tool will prepare for Red Hat Decision Manager 7.1. The original .niogit folder remains in your Red Hat JBoss BRMS 6.4 installation and will not be modified by the migration tool in this procedure.

  3. In the Red Hat Decision Manager 7.1 bin directory, delete the .index directory. You must delete this folder because Red Hat Decision Manager 7.1 comes with certain updates that are not compatible with Red Hat JBoss BRMS 6.4. The bin directory will be re-indexed after the migration when you start Red Hat Decision Manager 7.1.
  4. Note the path to the copied .niogit directory for Red Hat Decision Manager 7.1. 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/decision-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: Decision Manager
    • Version: 7.1
  7. Download Red Hat Decision Manager 7.1.0 Add-Ons and extract the downloaded rhdm-7.1.0-add-ons.zip file to a temporary directory.
  8. In the extracted rhdm-7.1.0-add-ons folder, extract the rhdm-7.1-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 rhdm-7.1-migration-tool folder and run the migration tool. The $RHDM_NIOGIT_DIR portion is the path to the .niogit directory that you previously copied to the Red Hat Decision Manager 7.1 installation.

    On Linux or UNIX-based systems:

    $ cd $INSTALL_DIR/rhdm-7.1-migration-tool/bin
    $ ./migration-tool.sh -t $RHDM_NIOGIT_DIR

    On Windows:

    $ cd $INSTALL_DIR\rhdm-7.1-migration-tool\bin
    $ migration-tool.bat -t $RHDM_NIOGIT_DIR

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

    • Project structure migration: Migrates the Red Hat JBoss BRMS 6.4 project repository structure to the new project-oriented structure used in Red Hat Decision Manager 7.1.
    • System configuration directory structure migration: Migrates the system.git repository structure used in Red Hat JBoss BRMS 6.4 to the new structure used in Red Hat Decision Manager 7.1. This migration option requires the project structure migration to be executed first.
    • POMs migration: Updates pom.xml files with dependencies required for Red Hat Decision Manager 7.1. This migration option requires the project structure migration and system configuration directory structure 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 Decision 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 Decision Central in Red Hat Decision Manager 7.1. 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.

2.1.2. Using the migration tool on an external Git repository

If you store Decision Central project data in a Git repository outside of your .niogit directory, you can also use the Decision Central migration tool on the external repository to prepare project data for Red Hat Decision Manager 7.1. 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/decision-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: Decision Manager
    • Version: 7.1
  6. Download Red Hat Decision Manager 7.1.0 Add-Ons and extract the downloaded rhdm-7.1.0-add-ons.zip file to a temporary directory.
  7. In the extracted rhdm-7.1.0-add-ons folder, extract the rhdm-7.1-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 rhdm-7.1-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/rhdm-7.1-migration-tool/bin
    $ ./migration-tool.sh -t $GIT_REPO_PATH

    On Windows:

    $ cd $INSTALL_DIR\rhdm-7.1-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 Decision Manager 7.1.

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

    • POMs migration: Updates pom.xml files with dependencies required for Red Hat Decision Manager 7.1.
    • 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 Decision 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 Decision Central in Red Hat Decision Manager 7.1. 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 Decision Central for Red Hat Decision Manager 7.1.
  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.

2.2. Update API references to Decision Central Knowledge Store

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

Procedure

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

As a result of the restructured content in Red Hat Decision Manager 7.1, the endpoints may differ between the legacy Decision Central REST API calls and the corresponding REST API calls in Red Hat Decision Manager 7.1. Be sure to use the new endpoints to replace your legacy Decision 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 Decision Manager 7.1.

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

Legacy Knowledge Store REST API call:

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

New Knowledge Store REST API call:

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

2.2.1. Supported Knowledge Store REST API endpoints

The Knowledge Store REST API provides endpoints for managing spaces and projects in Red Hat Decision Manager and for retrieving information about previous Knowledge Store REST API requests, or jobs.

2.2.1.1. Spaces

The Knowledge Store REST API supports the following endpoints for managing spaces in Decision Central. The Knowledge Store REST API base URL is http://SERVER:PORT/decision-central/rest/. All requests require HTTP Basic authentication or token-based authentication for the rest-all user role.

[GET] /spaces

Returns all spaces in Decision Central.

Example server response (JSON)

[
  {
    "name": "MySpace",
    "description": null,
    "projects": [
      {
        "name": "Employee_Rostering",
        "spaceName": "MySpace",
        "groupId": "employeerostering",
        "version": "1.0.0-SNAPSHOT",
        "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill.",
        "publicURIs": [
          {
            "protocol": "git",
            "uri": "git://localhost:9418/MySpace/example-Employee_Rostering"
          },
          {
            "protocol": "ssh",
            "uri": "ssh://localhost:8001/MySpace/example-Employee_Rostering"
          }
        ]
      },
      {
        "name": "Mortgage_Process",
        "spaceName": "MySpace",
        "groupId": "mortgage-process",
        "version": "1.0.0-SNAPSHOT",
        "description": "Getting started loan approval process in BPMN2, decision table, business rules, and forms.",
        "publicURIs": [
          {
            "protocol": "git",
            "uri": "git://localhost:9418/MySpace/example-Mortgage_Process"
          },
          {
            "protocol": "ssh",
            "uri": "ssh://localhost:8001/MySpace/example-Mortgage_Process"
          }
        ]
      }
    ],
    "owner": "admin",
    "defaultGroupId": "com.myspace"
  },
  {
    "name": "MySpace2",
    "description": null,
    "projects": [
      {
        "name": "IT_Orders",
        "spaceName": "MySpace",
        "groupId": "itorders",
        "version": "1.0.0-SNAPSHOT",
        "description": "Case Management IT Orders project",
        "publicURIs": [
          {
            "protocol": "git",
            "uri": "git://localhost:9418/MySpace/example-IT_Orders-1"
          },
          {
            "protocol": "ssh",
            "uri": "ssh://localhost:8001/MySpace/example-IT_Orders-1"
          }
        ]
      }
    ],
    "owner": "admin",
    "defaultGroupId": "com.myspace"
  }
]

[GET] /spaces/{spaceName}

Returns information about a specified space.

Table 2.1. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space to be retrieved

String

Required

Example server response (JSON)

{
  "name": "MySpace",
  "description": null,
  "projects": [
    {
      "name": "Mortgage_Process",
      "spaceName": "MySpace",
      "groupId": "mortgage-process",
      "version": "1.0.0-SNAPSHOT",
      "description": "Getting started loan approval process in BPMN2, decision table, business rules, and forms.",
      "publicURIs": [
        {
          "protocol": "git",
          "uri": "git://localhost:9418/MySpace/example-Mortgage_Process"
        },
        {
          "protocol": "ssh",
          "uri": "ssh://localhost:8001/MySpace/example-Mortgage_Process"
        }
      ]
    },
    {
      "name": "Employee_Rostering",
      "spaceName": "MySpace",
      "groupId": "employeerostering",
      "version": "1.0.0-SNAPSHOT",
      "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill.",
      "publicURIs": [
        {
          "protocol": "git",
          "uri": "git://localhost:9418/MySpace/example-Employee_Rostering"
        },
        {
          "protocol": "ssh",
          "uri": "ssh://localhost:8001/MySpace/example-Employee_Rostering"
        }
      ]
    },
    {
      "name": "Evaluation_Process",
      "spaceName": "MySpace",
      "groupId": "evaluation",
      "version": "1.0.0-SNAPSHOT",
      "description": "Getting started Business Process for evaluating employees",
      "publicURIs": [
        {
          "protocol": "git",
          "uri": "git://localhost:9418/MySpace/example-Evaluation_Process"
        },
        {
          "protocol": "ssh",
          "uri": "ssh://localhost:8001/MySpace/example-Evaluation_Process"
        }
      ]
    },
    {
      "name": "IT_Orders",
      "spaceName": "MySpace",
      "groupId": "itorders",
      "version": "1.0.0-SNAPSHOT",
      "description": "Case Management IT Orders project",
      "publicURIs": [
        {
          "protocol": "git",
          "uri": "git://localhost:9418/MySpace/example-IT_Orders"
        },
        {
          "protocol": "ssh",
          "uri": "ssh://localhost:8001/MySpace/example-IT_Orders"
        }
      ]
    }
  ],
  "owner": "admin",
  "defaultGroupId": "com.myspace"
}

[POST] /spaces

Creates a space in Decision Central.

Table 2.2. Request parameters

NameDescriptionTypeRequirement

body

The name, description, owner, defaultGroupId, and any other components of the new space

Request body

Required

Example request body (JSON)

{
  "name": "NewSpace",
  "description": "My new space.",
  "owner": "admin",
  "defaultGroupId": "com.newspace"
}

Example server response (JSON)

{
  "jobId": "1541016978154-3",
  "status": "APPROVED",
  "spaceName": "NewSpace",
  "owner": "admin",
  "defaultGroupId": "com.newspace",
  "description": "My new space."
}

[DELETE] /spaces/{spaceName}

Deletes a specified space from Decision Central.

Table 2.3. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space to be deleted

String

Required

Example server response (JSON)

{
  "jobId": "1541127032997-8",
  "status": "APPROVED",
  "spaceName": "MySpace",
  "owner": "admin",
  "description": "My deleted space.",
  "repositories": null
}

2.2.1.2. Projects

The Knowledge Store REST API supports the following endpoints for managing, building, and deploying projects in Decision Central. The Knowledge Store REST API base URL is http://SERVER:PORT/decision-central/rest/. All requests require HTTP Basic authentication or token-based authentication for the rest-all user role.

[GET] /spaces/{spaceName}/projects

Returns projects in a specified space.

Table 2.4. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space for which you are retrieving projects

String

Required

Example server response (JSON)

[
  {
    "name": "Mortgage_Process",
    "spaceName": "MySpace",
    "groupId": "mortgage-process",
    "version": "1.0.0-SNAPSHOT",
    "description": "Getting started loan approval process in BPMN2, decision table, business rules, and forms.",
    "publicURIs": [
      {
        "protocol": "git",
        "uri": "git://localhost:9418/MySpace/example-Mortgage_Process"
      },
      {
        "protocol": "ssh",
        "uri": "ssh://localhost:8001/MySpace/example-Mortgage_Process"
      }
    ]
  },
  {
    "name": "Employee_Rostering",
    "spaceName": "MySpace",
    "groupId": "employeerostering",
    "version": "1.0.0-SNAPSHOT",
    "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill.",
    "publicURIs": [
      {
        "protocol": "git",
        "uri": "git://localhost:9418/MySpace/example-Employee_Rostering"
      },
      {
        "protocol": "ssh",
        "uri": "ssh://localhost:8001/MySpace/example-Employee_Rostering"
      }
    ]
  },
  {
    "name": "Evaluation_Process",
    "spaceName": "MySpace",
    "groupId": "evaluation",
    "version": "1.0.0-SNAPSHOT",
    "description": "Getting started Business Process for evaluating employees",
    "publicURIs": [
      {
        "protocol": "git",
        "uri": "git://localhost:9418/MySpace/example-Evaluation_Process"
      },
      {
        "protocol": "ssh",
        "uri": "ssh://localhost:8001/MySpace/example-Evaluation_Process"
      }
    ]
  },
  {
    "name": "IT_Orders",
    "spaceName": "MySpace",
    "groupId": "itorders",
    "version": "1.0.0-SNAPSHOT",
    "description": "Case Management IT Orders project",
    "publicURIs": [
      {
        "protocol": "git",
        "uri": "git://localhost:9418/MySpace/example-IT_Orders"
      },
      {
        "protocol": "ssh",
        "uri": "ssh://localhost:8001/MySpace/example-IT_Orders"
      }
    ]
  }
]

[GET] /spaces/{spaceName}/projects/{projectName}

Returns information about a specified project in a specified space.

Table 2.5. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space where the project is located

String

Required

projectName

Name of the project to be retrieved

String

Required

Example server response (JSON)

{
  "name": "Employee_Rostering",
  "spaceName": "MySpace",
  "groupId": "employeerostering",
  "version": "1.0.0-SNAPSHOT",
  "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill.",
  "publicURIs": [
    {
      "protocol": "git",
      "uri": "git://localhost:9418/MySpace/example-Employee_Rostering"
    },
    {
      "protocol": "ssh",
      "uri": "ssh://localhost:8001/MySpace/example-Employee_Rostering"
    }
  ]
}

[POST] /spaces/{spaceName}/projects

Creates a project in a specified space.

Table 2.6. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space in which the new project will be created

String

Required

body

The name, groupId, version, description, and any other components of the new project

Request body

Required

Example request body (JSON)

{
  "name": "Employee_Rostering",
  "groupId": "employeerostering",
  "version": "1.0.0-SNAPSHOT",
  "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill."
}

Example server response (JSON)

{
  "jobId": "1541017411591-6",
  "status": "APPROVED",
  "spaceName": "MySpace",
  "projectName": "Employee_Rostering",
  "projectGroupId": "employeerostering",
  "projectVersion": "1.0.0-SNAPSHOT",
  "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill."
}

[DELETE] /spaces/{spaceName}/projects/{projectName}

Deletes a specified project from a specified space.

Table 2.7. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space where the project is located

String

Required

projectName

Name of the project to be deleted

String

Required

Example server response (JSON)

{
  "jobId": "1541128617727-10",
  "status": "APPROVED",
  "projectName": "Employee_Rostering",
  "spaceName": "MySpace"
}

[POST] /spaces/{spaceName}/git/clone

Clones a project into a specified space from a specified Git address.

Table 2.8. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space to which you are cloning a project

String

Required

body

The name, description, and Git repository userName, password, and gitURL for the project to be cloned

Request body

Required

Example request body (JSON)

{
  "name": "Employee_Rostering",
  "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill.",
  "userName": "baAdmin",
  "password": "password@1",
  "gitURL": "git://localhost:9418/MySpace/example-Employee_Rostering"
}

Example server response (JSON)

{
  "jobId": "1541129488547-13",
  "status": "APPROVED",
  "cloneProjectRequest": {
    "name": "Employee_Rostering",
    "description": "Employee rostering problem optimisation using Planner. Assigns employees to shifts based on their skill.",
    "userName": "baAdmin",
    "password": "password@1",
    "gitURL": "git://localhost:9418/MySpace/example-Employee_Rostering"
  },
  "spaceName": "MySpace2"
}

[POST] /spaces/{spaceName}/projects/{projectName}/maven/compile

Compiles a specified project in a specified space (equivalent to mvn compile).

Table 2.9. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space where the project is located

String

Required

projectName

Name of the project to be compiled

String

Required

Example server response (JSON)

{
  "jobId": "1541128617727-10",
  "status": "APPROVED",
  "projectName": "Employee_Rostering",
  "spaceName": "MySpace"
}

[POST] /spaces/{spaceName}/projects/{projectName}/maven/test

Tests a specified project in a specified space (equivalent to mvn test).

Table 2.10. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space where the project is located

String

Required

projectName

Name of the project to be tested

String

Required

Example server response (JSON)

{
  "jobId": "1541132591595-19",
  "status": "APPROVED",
  "projectName": "Employee_Rostering",
  "spaceName": "MySpace"
}

[POST] /spaces/{spaceName}/projects/{projectName}/maven/install

Installs a specified project in a specified space (equivalent to mvn install).

Table 2.11. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space where the project is located

String

Required

projectName

Name of the project to be installed

String

Required

Example server response (JSON)

{
  "jobId": "1541132668987-20",
  "status": "APPROVED",
  "projectName": "Employee_Rostering",
  "spaceName": "MySpace"
}

[POST] /spaces/{spaceName}/projects/{projectName}/maven/deploy

Deploys a specified project in a specified space (equivalent to mvn deploy).

Table 2.12. Request parameters

NameDescriptionTypeRequirement

spaceName

Name of the space where the project is located

String

Required

projectName

Name of the project to be deployed

String

Required

Example server response (JSON)

{
  "jobId": "1541132816435-21",
  "status": "APPROVED",
  "projectName": "Employee_Rostering",
  "spaceName": "MySpace"
}

2.2.1.3. Jobs (API requests)

All POST and DELETE requests in the Knowledge Store REST API return a job ID associated with each request, in addition to the returned request details. You can use a job ID to view the request status or delete a sent request.

Knowledge Store REST API requests, or jobs, can have the following statuses:

Table 2.13. Job statuses (API request statuses)

StatusDescription

ACCEPTED

The request was accepted and is being processed.

BAD_REQUEST

The request contained incorrect content and was not accepted.

RESOURCE_NOT_EXIST

The requested resource (path) does not exist.

DUPLICATE_RESOURCE

The resource already exists.

SERVER_ERROR

An error occurred in Decision Server.

SUCCESS

The request finished successfully.

FAIL

The request failed.

APPROVED

The request was approved.

DENIED

The request was denied.

GONE

The job ID for the request could not be found due to one of the following reasons:

  • The request was explicitly removed.
  • The request finished and has been deleted from a status cache. A request is removed from a status cache after the cache has reached its maximum capacity.
  • The request never existed.

The Knowledge Store REST API supports the following endpoints for retrieving or deleting sent API requests. The Knowledge Store REST API base URL is http://SERVER:PORT/decision-central/rest/. All requests require HTTP Basic authentication or token-based authentication for the rest-all user role.

[GET] /jobs/{jobId}

Returns the status of a specified job (a previously sent API request).

Table 2.14. Request parameters

NameDescriptionTypeRequirement

jobId

ID of the job to be retrieved (example: 1541010216919-1)

String

Required

Example server response (JSON)

{
  "status": "SUCCESS",
  "jobId": "1541010216919-1",
  "result": null,
  "lastModified": 1541010218352,
  "detailedResult": [
    "level:INFO, path:null, text:Build of module 'Mortgage_Process' (requested by system) completed.\n Build: SUCCESSFUL"
  ]
}

[DELETE] /jobs/{jobId}

Deletes a specified job (a previously sent API request). If the job is not being processed yet, this request removes the job from the job queue. This request does not cancel or stop an ongoing job.

Table 2.15. Request parameters

NameDescriptionTypeRequirement

jobId

ID of the job to be deleted (example: 1541010216919-1)

String

Required

Example server response (JSON)

{
  "status": "GONE",
  "jobId": "1541010216919-1",
  "result": null,
  "lastModified": 1541132054916,
  "detailedResult": [
    "level:INFO, path:null, text:Build of module 'Mortgage_Process' (requested by system) completed.\n Build: SUCCESSFUL"
  ]
}

2.3. Verify the migration in Decision Central

After you have migrated all Decision Central data, verify that the migration was successful in the new Decision Central for Red Hat Decision Manager 7.1.

Prerequisite

Project data from Red Hat JBoss BRMS 6.4 has been migrated using the Decision Central migration tool.

Procedure

  1. Start Red Hat Decision Manager 7.1 depending on your installation.

    Example: Installation with Red Hat JBoss EAP

    $ ~/$EAP_HOME/bin/standalone.sh -c standalone-full.xml
  2. Log in to Decision 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 Decision Server.

2.3.1. Troubleshooting Decision Central migration problems

If you encounter problems with your Decision Central migration to Red Hat Decision Manager 7.1, review the following troubleshooting suggestions:

  • If any project data is missing from Decision Central, ensure that the .niogit directory for Red Hat Decision Manager 7.1 contains the restructured data and is in the correct installation location for Red Hat Decision Manager 7.1 (for example, ~/$EAP_HOME/bin/).
  • If projects fail to build, open the project pom.xml file and remove the http://<SERVER>:<PORT>/decision-central/maven2/ repository, if present. The use of this repository can prevent projects from building properly in Red Hat Decision Manager 7.1. 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/decision-central/maven2/</url>
    </repository>
  • If projects fail to deploy to Decision Server, review your Decision Server installation and configuration. For more information, see Planning a Red Hat Decision Manager installation.
  • If you cannot resolve migration problems, complete the migration process again on a new Red Hat Decision Manager 7.1 installation.