第2章 Decision Central のデータ移行
このリリースで提供されている Decision Central 移行ツールを使用して Red Hat JBoss BRMS 6.4 から Red Hat Decision Manager 7.1 に Decision Central データを移行して、Red Hat Decision Manager 7.1 の新しいデータ構造に対応する必要があります。さらに、お使いのアプリケーションのいずれかが、ナレッジストア REST API コール (/business-central/rest/) を介して Decision Central のスペース (以前のバージョンでは組織単位と呼ばれていました)、リポジトリー、プロジェクトと対話する場合は、Red Hat Decision Manager 7.1 でサポートされている新規エンドポイントに従い、これらの API 参照を更新する必要があります。
前提条件/事前作業
- Red Hat JBoss BPMS 6.4 とは別のインスタンス (Red Hat JBoss EAP またはその他のインスタンス) に Red Hat Decision Manager 7.1 がインストールされている。インストールオプションは『Planning a Red Hat Process Automation Manager installation』を参照してください。
- Red Hat JBoss BRMS 6.4 の全 Decision Central データ (該当する場合はそれに使用するデータベースも含む) の完全バックアップを作成している。これは、移行時に問題が発生した場合の予防措置です。
2.1. Decision Central 移行ツールの使用 リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Decision Manager 7.1 には、修正されたデータ構造と、Red Hat JBoss BRMS 6.4 からの直接のデータ移行をサポートしないその他の機能変更が含まれています。したがって、Red Hat は、Red Hat JBoss BRMS 6.4 から Red Hat Decision Manager 7.1 にプロジェクトデータと設定を移行できる移行ツールを提供します。Decision Central ディストリビューションの .niogit ディレクトリー、または外部の Git リポジトリーで移行ツールを実行できます。移行ツールを使用して、Red Hat Decision Manager 7.1 でサポートされる新しいデータ構造と機能用に Decision Central データを準備します。
2.1.1. .niogit ディレクトリーでの移行ツールの使用 リンクのコピーリンクがクリップボードにコピーされました!
Decision Central ディストリビューションの .niogit ディレクトリーには Decision Central の全データが含まれています。.niogit ディレクトリーで Decision Central の移行ツールを使用して、Red Hat Decision Manager 7.1 への移行に向けてプロジェクトデータおよびシステム設定を準備できます。
前提条件/事前作業
- Decision Central は Red Hat JBoss BRMS 6.4 でも Red Hat Decision Manager 7.1 でも実行されません。
- Java 8 がインストールされていて、プロジェクトの移行ツールをインストールするパスが利用可能になっている。
手順
Red Hat JBoss BPM Suite 6.4 に対する現在の Decision Central ディストリビューションにある
bin/.niogitディレクトリーの位置を特定し、新しい Red Hat Decision Manager 7.1 インストールで同じディレクトリーを見つけます。例:
$ ~/$JBOSS_HOME/bin/.niogit$ ~/$RHDM_HOME/bin/.niogit端末で、Red Hat JBoss BRMS 6.4 の 現在の Decision Central ディストリビューションから、新しい Red Hat Decision Manager 7.1 インストールディレクトリーの
binディレクトリーに、.niogitディレクトリーをコピーします。cp -r /$JBOSS_HOME/bin/.niogit /$RHDM_HOME/bin/コピーした
.niogitディレクトリーは、移行ツールが Red Hat Decision Manager 7.1 に用意するディレクトリーで、オリジナルの.niogitディレクトリーは Red Hat JBoss BRMS 6.4 インストールに残り、この手順で使用する移行ツールでは修正されません。-
Red Hat Decision Manager 7.1 の
binディレクトリーにある.indexディレクトリーを削除します。Red Hat Decision Manager 7.1 には、Red Hat JBoss BRMS 6.4 に準拠していない特定の更新が含まれるため、このディレクトリーは削除する必要があります。binディレクトリーのインデックスは、移行してから Red Hat Decision Manager 7.1 を起動するときに再作成されます。 -
Red Hat で Decision Manager 7.1 にコピーした
.niogitディレクトリーのパスを書き留めます。このパスは、移行ツールを実行する際に必要になります。 プロジェクトの移行時に追加、削除、または更新する特定の
dependencies、repositories、またはpluginRepositoriesがある場合は、これらの要素を含むpom-migration.jsonファイルを作成します。移行ツールを実行すると、移行にこのファイルを含めるかどうかを尋ねるプロンプトが表示されます。pom-migration.jsonファイルには以下のセクションが必要です。-
"dependencies":[] -
"repositories-add":[] -
"repositories-remove":[] -
"repositories-update-urls":[] -
"pluginRepositories-add":[] -
"pluginRepositories-remove":[] -
"pluginRepositories-update-urls":[]
この中の要素のいずれかがプロジェクトに適用されない場合は、解析エラーを回避するために空のセクションとして追加します。
サンプルファイル
pom-migration.json:{ "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":[] }(
依存関係のみを持つ) サンプルファイルpom-migration.json:{ "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":[] }-
Red Hat カスタマーポータルの Software Downloads ページに移動し (ログインが必要)、ドロップダウンオプションから製品およびバージョンを選択します。
- Product: Decision Manager
- Version: 7.1
-
Red Hat Decision Manager 7.1.0 Add-Ons をダウンロードして、ダウンロードした
rhdm-7.1.0-add-ons.zipファイルを一時ディレクトリーに展開します。 -
展開した
rhdm-7.1.0-add-onsディレクトリーに、rhdm-7.1-migration-tool.zipサブディレクトリーを展開します。移行ツールはbinディレクトリーに保存されています。 端末で、
rhdm-7.1-migration-toolディレクトリーを展開した一時ディレクトリーに移動して、移行ツールを実行します。$RHDM_NIOGIT_DIRの部分は、Red Hat Process Automation Manager 7.1 インストールにコピーしておいた.niogitディレクトリーのパスになります。Linux または UNIX ベースのシステムの場合:
$ cd $INSTALL_DIR/rhdm-7.1-migration-tool/bin $ ./migration-tool.sh -t $RHDM_NIOGIT_DIRWindows の場合:
$ cd $INSTALL_DIR\rhdm-7.1-migration-tool\bin $ migration-tool.bat -t $RHDM_NIOGIT_DIRコマンドプロンプトが表示されると、以下のオプションが表示されます。
- Project structure migration: Red Hat JBoss BRMS 6.4 プロジェクトリポジトリー構造を、Red Hat Decision Manager 7.1 で使用される新しいプロジェクト指向の構造に移行します。
-
System configuration directory structure migration: Red Hat JBoss BRMS 6.4 で使用される
system.gitリポジトリー構造を、Red Hat Decision Manager 7.1 で使用される新しい構造に移行します。この移行オプションでは、プロジェクト構造の移行を最初に実行する必要があります。 -
Forms migration: Red Hat Decision Manager 7.1 で必要な依存関係を持つ
pom.xmlファイルを更新します。この移行オプションでは、プロジェクト構造の移行とシステム設定ディレクトリー構造の移行を最初に実行する必要があります。 - All: すべての移行オプションを順番に実行します。
- Exit: 移行ツールを終了します。
All オプションを選択して、移行を順番に実行します。
注記移行オプションを一度に 1 つずつ実行する場合は、最初に実行する移行オプションを実行します。ツールを実行したら、Decision Central 移行ツールを再度実行して、次に実行する移行オプションを選択します。
特定の移行オプションを実行するようにプロンプトが表示されるたびに
yesを入力します。POM 移行オプションで、作成しておいた外部の
pom-migration.jsonファイルのパスを指定する場合は、プロンプトが表示された時にyesを入力して、パスを入力します。ツールの実行が終了したら、Exit オプションを選択して移行ツールを終了します。
.niogitディレクトリー構造は、Red Hat Decision Manager 7.1 の Decision Central と互換性があります。プロジェクトディレクトリーは別のリポジトリーにあり、その他の関連する設定はすべて移行されています。新しい.niogitディレクトリーに移動して、再構築したコンテンツを確認できます。
2.1.2. 外部 Git リポジトリーでの移行ツールの使用 リンクのコピーリンクがクリップボードにコピーされました!
.niogit ディレクトリー外にある Git リポジトリーに Decision Central プロジェクトデータを保存する場合は、外部リポジトリーで Decision Central 移行ツールを使用して、Red Hat Decision Manager 7.1 のプロジェクトデータを準備することもできます。Git リポジトリーのプロジェクトディレクトリー内のファイルだけが移行ツールにより再構築されます。
前提条件/事前作業
Java 8 がインストールされていて、プロジェクトの移行ツールをインストールするパスが利用可能になっている。
手順
(リポジトリーのクローンが作成されていない場合は) ローカルディレクトリーで、移行するプロジェクトを含む Git リポジトリーのクローンを作成します。
$ cd $REPO_DIR/ $ git clone $GIT_REPO_URL- クローンを作成した Git リポジトリーのパスを書き留めます。移行ツールを実行する際にパスが必要になります。
- 移行ツールの実行後に、新たに移行したリポジトリーのコピーを置く出力ディレクトリーを作成します。既存のディレクトリーを出力場所としても使用できます。この出力ディレクトリーのパスを書き留めます。移行ツールは、クローンとして作成したリポジトリーのコピー上で作動します。ツールの実行時に新しい出力ディレクトリーのパスを求めるプロンプトがこのツールにより表示されます。
プロジェクトの移行時に追加、削除、または更新する特定の
dependencies、repositories、またはpluginRepositoriesがある場合は、これらの要素を含むpom-migration.jsonファイルを作成します。移行ツールを実行すると、移行にこのファイルを含めるかどうかを尋ねるプロンプトが表示されます。pom-migration.jsonファイルには以下のセクションが必要です。-
"dependencies":[] -
"repositories-add":[] -
"repositories-remove":[] -
"repositories-update-urls":[] -
"pluginRepositories-add":[] -
"pluginRepositories-remove":[] -
"pluginRepositories-update-urls":[]
この中の要素のいずれかがプロジェクトに適用されない場合は、解析エラーを回避するために空のセクションとして追加します。
サンプルファイル
pom-migration.json:{ "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":[] }(
依存関係のみを持つ) サンプルファイルpom-migration.json:{ "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":[] }-
Red Hat カスタマーポータルの Software Downloads ページに移動し (ログインが必要)、ドロップダウンオプションから製品およびバージョンを選択します。
- Product: Decision Manager
- Version: 7.1
-
Red Hat Decision Manager 7.1.0 Add-Ons をダウンロードして、ダウンロードした
rhdm-7.1.0-add-ons.zipファイルを一時ディレクトリーに展開します。 -
展開した
rhdm-7.1.0-add-onsディレクトリーに、rhdm-7.1-migration-tool.zipサブディレクトリーを展開します。移行ツールはbinディレクトリーに保存されています。 コマンド端末で、
rhdm-7.1-migration-toolディレクトリーを展開した一時ディレクトリーに移動して、移行ツールを実行します。$GIT_REPO_PATHの部分は、作成した Git リポジトリーのパスになります。Linux または UNIX ベースのシステムの場合:
$ cd $INSTALL_DIR/rhdm-7.1-migration-tool/bin $ ./migration-tool.sh -t $GIT_REPO_PATHWindows の場合:
$ cd $INSTALL_DIR\rhdm-7.1-migration-tool\bin $ migration-tool.bat -t $GIT_REPO_PATH表示されるコマンドプロンプトに、移行したリポジトリーのコピーを置く出力ディレクトリーへのパスを入力します。移行ツールは、クローンとして作成したリポジトリーのコピー上で作動し、指定した出力先に新しいリポジトリーを配置します。
出力先を入力後、移行ツールがリポジトリーのコピーを用意し、すべてのプロジェクトディレクトリーが Red Hat Decision Manager 7.1 と互換性を保てるように再構築します。
コマンドプロンプトに、以下の追加移行オプションが表示されます。
-
POMs migration: Red Hat Decision Manager 7.1 で必要な依存関係が含まれる
pom.xmlを更新します。 - All: 残りのすべての移行オプションを順番に実行します。
- Exit: 移行ツールを終了します。
注記出力先で移行ツールを開始するとこのオプションが自動的に実行するため、Project structure migration オプションは表示されません。
-
POMs migration: Red Hat Decision Manager 7.1 で必要な依存関係が含まれる
All オプションを選択して、移行を順番に実行します。
注記移行オプションを一度に 1 つずつ実行する場合は、最初に実行する移行オプションを実行します。ツールを実行したら、Decision Central 移行ツールを再度実行して、次に実行する移行オプションを選択します。
特定の移行オプションを実行するようにプロンプトが表示されるたびに
yesを入力します。POM 移行オプションで、作成しておいた外部の
pom-migration.jsonファイルのパスを指定する場合は、プロンプトが表示された時にyesを入力して、パスを入力します。ツールの実行が終了したら、Exit オプションを選択して移行ツールを終了します。
指定した出力先のプロジェクトディレクトリーは、Red Hat Decision Manager 7.1 の Decision Central と互換性のある個々のリポジトリーに分かれます。新しいプロジェクトリポジトリーは、作業ディレクトリーのないベアリポジトリーであるため、コンテンツファイルを表示しません。各リポジトリーのクローンを作成してベアリポジトリーではないリポジトリーを作成し、ディレクトリーのコンテンツを確認します。
- Red Hat Decision Manager 7.1 の Decision Central にログインします。
- 各プロジェクトに対して、プロジェクトのスペースを作成または選択し、Import Project をクリックします。
新たに構築したプロジェクトリポジトリーの リポジトリー URL を入力します。この URL は、出力先へのローカルファイルパス (移行ツールを実行したワークステーションから直接インポートしている場合)、GitHub URL、またはリポジトリーをアップロードしたその他のファイルのホスト先にできます。
例: ローカルファイルの場所
file:///$OUTPUT_DIR/loan-application.git例: GitHub リポジトリーの場所
https://github.com/$REPO/loan-application.git注記プロジェクトデータで Git
hooksを使用する場合は、移行を調整するhooksスクリプトの更新が必要になる場合があります。
2.2. Decision Central ナレッジストアへの API 参照の更新 リンクのコピーリンクがクリップボードにコピーされました!
ナレッジストア REST API は Red Hat Decision Manager 7.1 では非推奨になっていますが、特定のエンドポイントは依然としてサポートされているため、Decision Central リソースを管理し続けることができます。アプリケーションのいずれかが、ナレッジストア REST API コール (/decision-central/rest/) を介して Decision Central スペース (以前は組織単位と呼ばれていました)、リポジトリー、プロジェクトと対話する場合は、Red Hat Decision Manager 7.1 でサポートされる新しいエンドポイントに従って、これらの API 参照を更新する必要があります。
手順
必要に応じて、アプリケーションコードで、http://<SERVER>:<PORT>/decision-central/rest/<ENDPOINT> 形式の Decision Central ナレッジストアへの古い REST API コールを、「サポートされるナレッジストア REST API エンドポイント」 で対応する新しいナレッジストア REST API コールに置き換えます。
Red Hat Decision Manager 7.1 でコンテンツを再構築した結果、古い Decision Central REST API コールと、Red Hat Decision Manager 7.1 で対応する REST API コールとの間で、エンドポイントが変わる可能性があります。新しいエンドポイントを使用して古い Decision Central REST API コールを置き換えるようにしてください。古いコールを置き換えるための、対応する REST API コールが一覧の中から見つからない場合は、コールが Red Hat Decision Manager 7.1 でサポートされなくなったことを示しています。
以下の例は、スペースに対する、ナレッジストア REST API コールへの更新です。
古いナレッジストア REST API コール:
http://localhost:8080/decision-central/rest/organizational-units
新しいナレッジストア REST API コール:
http://localhost:8080/decision-central/rest/spaces
2.2.1. サポートされるナレッジストア REST API エンドポイント リンクのコピーリンクがクリップボードにコピーされました!
ナレッジストア REST API は、Red Hat Decision Manager 内のスペースおよびプロジェクトを管理し、以前の内 REST API リクエストまたは jobs についての情報を取得するエンドポイントを提供します。
2.2.1.1. スペース リンクのコピーリンクがクリップボードにコピーされました!
ナレッジストア REST API は Decision Central のスペースを管理するための以下のエンドポイントをサポートします。ナレッジストア REST API のベース URL は http://SERVER:PORT/decision-central/rest/ です。ユーザーロール rest-all では、すべてのリクエストで HTTP 基本認証またはトークンベースの認証が必要です。
- [GET] /spaces
Decision Central のすべてのスペースを返します。
サーバーの応答例 (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}
指定したスペースに関する情報を返します。
Expand 表2.1 リクエストパラメーター 名前 説明 タイプ 要件 spaceName取得するスペースの名前
文字列
必須
サーバーの応答例 (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
Decision Central でスペースを作成します。
Expand 表2.2 リクエストパラメーター 名前 説明 タイプ 要件 body
新規スペースの
name、description、owner、defaultGroupId、およびその他のコンポーネント。要求の本文
必須
リクエストボディ (JSON) 例
{ "name": "NewSpace", "description": "My new space.", "owner": "admin", "defaultGroupId": "com.newspace" }サーバーの応答例 (JSON)
{ "jobId": "1541016978154-3", "status": "APPROVED", "spaceName": "NewSpace", "owner": "admin", "defaultGroupId": "com.newspace", "description": "My new space." }- [DELETE] /spaces/{spaceName}
Decision Central からスペースを削除します。
Expand 表2.3 リクエストパラメーター 名前 説明 タイプ 要件 spaceName削除するスペースの名前
文字列
必須
サーバーの応答例 (JSON)
{ "jobId": "1541127032997-8", "status": "APPROVED", "spaceName": "MySpace", "owner": "admin", "description": "My deleted space.", "repositories": null }
2.2.1.2. プロジェクト リンクのコピーリンクがクリップボードにコピーされました!
ナレッジストア REST API は Decision Central のプロジェクトを管理、ビルド、デプロイメントするための以下のエンドポイントをサポートします。ナレッジストア REST API のベース URL は http://SERVER:PORT/decision-central/rest/ です。ユーザーロール rest-all では、すべてのリクエストで HTTP 基本認証またはトークンベースの認証が必要です。
- [GET] /spaces/{spaceName}/projects
指定したスペースにあるプロジェクトを返します。
Expand 表2.4 リクエストパラメーター 名前 説明 タイプ 要件 spaceName取得するプロジェクトのスペース名
文字列
必須
サーバーの応答例 (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}
指定したスペースにある指定したプロジェクト関する情報を返します。
Expand 表2.5 リクエストパラメーター 名前 説明 タイプ 要件 spaceNameプロジェクトのあるスペースの名前
文字列
必須
projectName取得するプロジェクトの名前
文字列
必須
サーバーの応答例 (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
指定したスペースにプロジェクトを作成します。
Expand 表2.6 リクエストパラメーター 名前 説明 タイプ 要件 spaceName新規プロジェクトが作成されるスペース名
文字列
必須
body
新規プロジェクトの
name、groupId、version、description、およびその他のコンポーネント。要求の本文
必須
リクエストボディ (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." }サーバーの応答例 (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}
指定したスペースから指定したプロジェクトを削除します。
Expand 表2.7 リクエストパラメーター 名前 説明 タイプ 要件 spaceNameプロジェクトのあるスペースの名前
文字列
必須
projectName削除するプロジェクトの名前
文字列
必須
サーバーの応答例 (JSON)
{ "jobId": "1541128617727-10", "status": "APPROVED", "projectName": "Employee_Rostering", "spaceName": "MySpace" }- [POST] /spaces/{spaceName}/git/clone
指定した Git アドレスから指定したスペースにプロジェクトのクローンを作成します。
Expand 表2.8 リクエストパラメーター 名前 説明 タイプ 要件 spaceNameプロジェクトのクローンを作成するスペース名
文字列
必須
body
クローンするプロジェクトの
name、description、Git リポジトリーのuserName、password、およびgitURL。要求の本文
必須
リクエストボディ (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" }サーバーの応答例 (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
指定したスペースで指定したプロジェクトをコンパイルします (
mvn compileと同等)。Expand 表2.9 リクエストパラメーター 名前 説明 タイプ 要件 spaceNameプロジェクトのあるスペースの名前
文字列
必須
projectNameコンパイルするプロジェクトの名前
文字列
必須
サーバーの応答例 (JSON)
{ "jobId": "1541128617727-10", "status": "APPROVED", "projectName": "Employee_Rostering", "spaceName": "MySpace" }- [POST] /spaces/{spaceName}/projects/{projectName}/maven/test
指定したスペースで指定したプロジェクトをテストします (
mvn testと同等)。Expand 表2.10 リクエストパラメーター 名前 説明 タイプ 要件 spaceNameプロジェクトのあるスペースの名前
文字列
必須
projectNameテストするプロジェクトの名前
文字列
必須
サーバーの応答例 (JSON)
{ "jobId": "1541132591595-19", "status": "APPROVED", "projectName": "Employee_Rostering", "spaceName": "MySpace" }- [POST] /spaces/{spaceName}/projects/{projectName}/maven/install
指定したスペースで指定したプロジェクトをインストールします (
mvn installと同等)。Expand 表2.11 リクエストパラメーター 名前 説明 タイプ 要件 spaceNameプロジェクトのあるスペースの名前
文字列
必須
projectNameインストールするプロジェクトの名前
文字列
必須
サーバーの応答例 (JSON)
{ "jobId": "1541132668987-20", "status": "APPROVED", "projectName": "Employee_Rostering", "spaceName": "MySpace" }- [POST] /spaces/{spaceName}/projects/{projectName}/maven/deploy
指定したスペースで指定したプロジェクトをデプロイします (
mvn deployと同等)。Expand 表2.12 リクエストパラメーター 名前 説明 タイプ 要件 spaceNameプロジェクトのあるスペースの名前
文字列
必須
projectNameデプロイするプロジェクトの名前
文字列
必須
サーバーの応答例 (JSON)
{ "jobId": "1541132816435-21", "status": "APPROVED", "projectName": "Employee_Rostering", "spaceName": "MySpace" }
2.2.1.3. ジョブ (API リクエスト) リンクのコピーリンクがクリップボードにコピーされました!
ナレッジストア REST API の POST と DELETE リクエストはすべて、返されるリクエスト詳細のほかに、各リクエストに関連付けられたジョブ ID を返します。ジョブ ID を使用すると、リクエストステータスを確認したり、送信されたリクエストを削除することができます。
ナレッジストア REST API リクエストもしくは ジョブ には、以下のステータスがあります。
| ステータス | 説明 |
|---|---|
|
|
リクエストが受け入れられ、処理中である。 |
|
|
リクエストに無効なコンテンツが含まれ、受け入れられなかった。 |
|
|
要求されたリソース (パス) が存在しない。 |
|
|
リソースがすでに存在する。 |
|
|
Decision Server でエラーが発生した。 |
|
|
リクエストが正常に完了した。 |
|
|
リクエストが失敗した。 |
|
|
リクエストが承認された。 |
|
|
リクエストが拒否された。 |
|
|
以下のいずれかの理由でリクエストのジョブ ID が見つからなかった。
|
ナレッジストア REST API は、送信済み API リクエストの取得または削除用の以下のエンドポイントをサポートします。ナレッジストア REST API のベース URL は http://SERVER:PORT/decision-central/rest/ です。ユーザーロール rest-all では、すべてのリクエストで HTTP 基本認証またはトークンベースの認証が必要です。
- [GET] /jobs/{jobId}
指定されたジョブのステータスを返します (以前に送信された API リクエスト)。
Expand 表2.14 リクエストパラメーター 名前 説明 タイプ 要件 jobId取得するジョブの ID (例:
1541010216919-1)文字列
必須
サーバーの応答例 (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}
指定したジョブ (以前に送信された API リクエスト) を削除します。ジョブがまだ処理されていない場合は、このリクエストはジョブをジョブキューから削除します。実行中のジョブがキャンセルされたり停止されたりすることはありません。
Expand 表2.15 リクエストパラメーター 名前 説明 タイプ 要件 jobId削除するジョブの ID (例:
1541010216919-1)文字列
必須
サーバーの応答例 (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. Decision Central での移行の確認 リンクのコピーリンクがクリップボードにコピーされました!
Decision Central のデータをすべて移行した後に、Red Hat Decision Manager 7.1 の新しい Decision Central で移行が成功していることを確認します。
前提条件/事前作業
Decision Central 移行ツールを使用して、Red Hat JBoss BRMS 6.4 からプロジェクトデータを移行している。
手順
お使いのインストールに応じて、Red Hat Decision Manager 7.1 を起動します。
例: Red Hat JBoss EAP を使用したインストール
$ ~/$EAP_HOME/bin/standalone.sh -c standalone-full.xml-
お使いの認証情報を使用して Decision Central にログインして、Menu
Design Projects に移動します。 - すべてのプロジェクトが移行しているのを確認し、各プロジェクトを選択して、移行したプロジェクトアセットを確認します。
- 各プロジェクトに対して、プロジェクトウィンドウの右上にある Build をクリックしてから Deploy をクリックし、移行したプロジェクトデータおよび設定した Decision Server を検証します。
2.3.1. Decision Central 移行問題のトラブルシューティング リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Decision Manager 7.1 への Decision Central の移行で問題が発生したら、以下の点を推奨のトラブルシューティングの内容を確認してください。
-
プロジェクトデータが Decision Central にない場合は、Red Hat Decision Manager 7.1 の
.niogitディレクトリーに再構築したデータが含まれており、Red Hat Decision Manager 7.1 の正しいインストール場所 (例:~/$EAP_HOME/bin/) にあることを確認します。 プロジェクトがビルドできない場合はプロジェクトファイル
pom.xmlを開き、http://<SERVER>:<PORT>/decision-central/maven2/リポジトリーが存在する場合は削除します。このリポジトリーが存在すると、Red Hat Decision Manager 7.1 でプロジェクトが適切にビルドできません。このリポジトリーに保存するプロジェクトデータが含まれている場合は、データ用の新しいリポジトリーを作成し、そのリポジトリーをpom.xmlファイルの依存関係として追加します。削除する
pom.xmlファイルの例:<repository> <id>guvnor-m2-repo</id> <name>Guvnor M2 Repo</name> <url>http://localhost:8080/decision-central/maven2/</url> </repository>- Decision Server にプロジェクトをデプロイできない場合は、Decision Server インストールおよび設定を確認します。詳細は『Planning a Red Hat Process Automation Manager installation』を参照してください。
- 移行問題を解決できない場合は、新しい Red Hat Decision Manager 7.1 インストールで移行プロセスを再実行してください。