第3章 Red Hat Decision Manager での Decision Server および KIE コンテナーのコマンド
Red Hat Decision Manager は、サーバー情報を取得したり、コンテナーの作成や削除など、サーバー関連またはコンテナー関連の操作のために Decision Server に送信するサーバーコマンドをサポートしています。サポートされる Decision Server 設定コマンドの全一覧は、Red Hat Decision Manager インスタンスの org.kie.server.api.commands
パッケージにあります。
Decision Server REST API では、org.kie.server.api.commands
コマンドを http://SERVER:PORT/kie-server/services/rest/server/config
への POST
要求の本文として使用します。Decision Server REST API の使用に関する詳細情報は、1章KIE コンテナーおよびビジネスアセット用の Decision Server REST API を参照してください。
Decision Server Java クライアント API では、親 KieServicesClient
Java クライアントで対応するメソッドを Java アプリケーションで埋め込み API 要求として使用します。Decision Server コマンドはすべて Java クライアント API で提供されるメソッドが実行するので、実際の Decision Server コマンドを Java アプリケーションに埋め込む必要はありません。Decision Server Java クライアント API の使用に関する詳細情報は、2章KIE コンテナーおよびビジネスアセット用の Decision Server Java クライアント API を参照してください。
3.1. Decision Server および KIE コンテナーのコマンドサンプル
以下は、Decision Server で Decision Server REST API または Java クライアント API のサーバー関連もしくはコンテナー関連操作に使用可能な Decision Server コマンドのサンプルです。
-
GetServerInfoCommand
-
GetServerStateCommand
-
CreateContainerCommand
-
GetContainerInfoCommand
-
ListContainersCommand
-
CallContainerCommand
-
DisposeContainerCommand
-
GetScannerInfoCommand
-
UpdateScannerCommand
-
UpdateReleaseIdCommand
サポートされる Decision Server 設定および管理コマンドの全一覧は、Red Hat Decision Manager インスタンスの org.kie.server.api.commands
パッケージにあります。
Decision Server コマンドは個別に実行するか、バッチ REST API 要求またはバッチ Java API 要求として実行することができます。
KIE コンテナー (JSON) を作成、呼び出し、破棄するバッチ REST API 要求
{ "commands": [ { "create-container": { "container": { "status": "STARTED", "container-id": "command-script-container", "release-id": { "version": "1.0", "group-id": "com.redhat", "artifact-id": "Project1" } } } }, { "call-container": { "payload": "{\n \"commands\" : [ {\n \"fire-all-rules\" : {\n \"max\" : -1,\n \"out-identifier\" : null\n }\n } ]\n}", "container-id": "command-script-container" } }, { "dispose-container": { "container-id": "command-script-container" } } ] }
{
"commands": [
{
"create-container": {
"container": {
"status": "STARTED",
"container-id": "command-script-container",
"release-id": {
"version": "1.0",
"group-id": "com.redhat",
"artifact-id": "Project1"
}
}
}
},
{
"call-container": {
"payload": "{\n \"commands\" : [ {\n \"fire-all-rules\" : {\n \"max\" : -1,\n \"out-identifier\" : null\n }\n } ]\n}",
"container-id": "command-script-container"
}
},
{
"dispose-container": {
"container-id": "command-script-container"
}
}
]
}
KIE コンテナーを取得、破棄、再作成するバッチ Java API 要求
public void disposeAndCreateContainer() { System.out.println("== Disposing and creating containers =="); // Retrieve list of KIE containers List<KieContainerResource> kieContainers = kieServicesClient.listContainers().getResult().getContainers(); if (kieContainers.size() == 0) { System.out.println("No containers available..."); return; } // Dispose KIE container KieContainerResource container = kieContainers.get(0); String containerId = container.getContainerId(); ServiceResponse<Void> responseDispose = kieServicesClient.disposeContainer(containerId); if (responseDispose.getType() == ResponseType.FAILURE) { System.out.println("Error disposing " + containerId + ". Message: "); System.out.println(responseDispose.getMsg()); return; } System.out.println("Success Disposing container " + containerId); System.out.println("Trying to recreate the container..."); // Re-create KIE container ServiceResponse<KieContainerResource> createResponse = kieServicesClient.createContainer(containerId, container); if(createResponse.getType() == ResponseType.FAILURE) { System.out.println("Error creating " + containerId + ". Message: "); System.out.println(responseDispose.getMsg()); return; } System.out.println("Container recreated with success!"); }
public void disposeAndCreateContainer() {
System.out.println("== Disposing and creating containers ==");
// Retrieve list of KIE containers
List<KieContainerResource> kieContainers = kieServicesClient.listContainers().getResult().getContainers();
if (kieContainers.size() == 0) {
System.out.println("No containers available...");
return;
}
// Dispose KIE container
KieContainerResource container = kieContainers.get(0);
String containerId = container.getContainerId();
ServiceResponse<Void> responseDispose = kieServicesClient.disposeContainer(containerId);
if (responseDispose.getType() == ResponseType.FAILURE) {
System.out.println("Error disposing " + containerId + ". Message: ");
System.out.println(responseDispose.getMsg());
return;
}
System.out.println("Success Disposing container " + containerId);
System.out.println("Trying to recreate the container...");
// Re-create KIE container
ServiceResponse<KieContainerResource> createResponse = kieServicesClient.createContainer(containerId, container);
if(createResponse.getType() == ResponseType.FAILURE) {
System.out.println("Error creating " + containerId + ". Message: ");
System.out.println(responseDispose.getMsg());
return;
}
System.out.println("Container recreated with success!");
}
本セクションの各コマンドには、Decision Server REST API 用の REST 要求の本文例 (JSON) と Decision Server Java クライアント API 用の KieServicesClient
Java クライアント空の埋め込みメソッド例が含まれています。
- GetServerInfoCommand
Decision Server についての情報を返します。
REST 要求のボディ (JSON) の例
{ "commands" : [ { "get-server-info" : { } } ] }
{ "commands" : [ { "get-server-info" : { } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
KieServerInfo serverInfo = kieServicesClient.getServerInfo();
KieServerInfo serverInfo = kieServicesClient.getServerInfo();
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Kie Server info", "result": { "kie-server-info": { "id": "default-kieserver", "version": "7.11.0.Final-redhat-00001", "name": "default-kieserver", "location": "http://localhost:8080/kie-server/services/rest/server", "capabilities": [ "KieServer", "BRM", "BPM", "CaseMgmt", "BPM-UI", "BRP", "DMN", "Swagger" ], "messages": [ { "severity": "INFO", "timestamp": { "java.util.Date": 1538502533321 }, "content": [ "Server KieServerInfo{serverId='default-kieserver', version='7.11.0.Final-redhat-00001', name='default-kieserver', location='http://localhost:8080/kie-server/services/rest/server', capabilities=[KieServer, BRM, BPM, CaseMgmt, BPM-UI, BRP, DMN, Swagger], messages=null}started successfully at Tue Oct 02 13:48:53 EDT 2018" ] } ] } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Kie Server info", "result": { "kie-server-info": { "id": "default-kieserver", "version": "7.11.0.Final-redhat-00001", "name": "default-kieserver", "location": "http://localhost:8080/kie-server/services/rest/server", "capabilities": [ "KieServer", "BRM", "BPM", "CaseMgmt", "BPM-UI", "BRP", "DMN", "Swagger" ], "messages": [ { "severity": "INFO", "timestamp": { "java.util.Date": 1538502533321 }, "content": [ "Server KieServerInfo{serverId='default-kieserver', version='7.11.0.Final-redhat-00001', name='default-kieserver', location='http://localhost:8080/kie-server/services/rest/server', capabilities=[KieServer, BRM, BPM, CaseMgmt, BPM-UI, BRP, DMN, Swagger], messages=null}started successfully at Tue Oct 02 13:48:53 EDT 2018" ] } ] } } } ] }
Copy to Clipboard Copied! - GetServerStateCommand
Decision Server の現在の状態と設定についての情報を返します。
REST 要求のボディ (JSON) の例
{ "commands" : [ { "get-server-state" : { } } ] }
{ "commands" : [ { "get-server-state" : { } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
KieServerStateInfo serverStateInfo = kieServicesClient.getServerState();
KieServerStateInfo serverStateInfo = kieServicesClient.getServerState();
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Successfully loaded server state for server id default-kieserver", "result": { "kie-server-state-info": { "controller": [ "http://localhost:8080/decision-central/rest/controller" ], "config": { "config-items": [ { "itemName": "org.kie.server.location", "itemValue": "http://localhost:8080/kie-server/services/rest/server", "itemType": "java.lang.String" }, { "itemName": "org.kie.server.controller.user", "itemValue": "controllerUser", "itemType": "java.lang.String" }, { "itemName": "org.kie.server.controller", "itemValue": "http://localhost:8080/decision-central/rest/controller", "itemType": "java.lang.String" } ] }, "containers": [ { "container-id": "employee-rostering", "release-id": { "group-id": "employeerostering", "artifact-id": "employeerostering", "version": "1.0.0-SNAPSHOT" }, "resolved-release-id": null, "status": "STARTED", "scanner": { "status": "STOPPED", "poll-interval": null }, "config-items": [ { "itemName": "KBase", "itemValue": "", "itemType": "BPM" }, { "itemName": "KSession", "itemValue": "", "itemType": "BPM" }, { "itemName": "MergeMode", "itemValue": "MERGE_COLLECTIONS", "itemType": "BPM" }, { "itemName": "RuntimeStrategy", "itemValue": "SINGLETON", "itemType": "BPM" } ], "messages": [], "container-alias": "employeerostering" } ] } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Successfully loaded server state for server id default-kieserver", "result": { "kie-server-state-info": { "controller": [ "http://localhost:8080/decision-central/rest/controller" ], "config": { "config-items": [ { "itemName": "org.kie.server.location", "itemValue": "http://localhost:8080/kie-server/services/rest/server", "itemType": "java.lang.String" }, { "itemName": "org.kie.server.controller.user", "itemValue": "controllerUser", "itemType": "java.lang.String" }, { "itemName": "org.kie.server.controller", "itemValue": "http://localhost:8080/decision-central/rest/controller", "itemType": "java.lang.String" } ] }, "containers": [ { "container-id": "employee-rostering", "release-id": { "group-id": "employeerostering", "artifact-id": "employeerostering", "version": "1.0.0-SNAPSHOT" }, "resolved-release-id": null, "status": "STARTED", "scanner": { "status": "STOPPED", "poll-interval": null }, "config-items": [ { "itemName": "KBase", "itemValue": "", "itemType": "BPM" }, { "itemName": "KSession", "itemValue": "", "itemType": "BPM" }, { "itemName": "MergeMode", "itemValue": "MERGE_COLLECTIONS", "itemType": "BPM" }, { "itemName": "RuntimeStrategy", "itemValue": "SINGLETON", "itemType": "BPM" } ], "messages": [], "container-alias": "employeerostering" } ] } } } ] }
Copy to Clipboard Copied! - CreateContainerCommand
Decision Server の KIE コンテナーを作成します。
表3.1 コマンドの属性 Name 説明 要件 container
container-id
、release-id
データ (グループ ID、アーティファクト ID、バージョン)、status
、および新規 KIE コンテナーの他のコンポーネントを含むマップ。必須
REST 要求のボディ (JSON) の例
{ "commands" : [ { "create-container" : { "container" : { "status" : null, "messages" : [ ], "container-id" : "command-script-container", "release-id" : { "version" : "1.0", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "config-items" : [ ] } } } ] }
{ "commands" : [ { "create-container" : { "container" : { "status" : null, "messages" : [ ], "container-id" : "command-script-container", "release-id" : { "version" : "1.0", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "config-items" : [ ] } } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
ServiceResponse<KieContainerResource> response = kieServicesClient.createContainer("command-script-container", resource);
ServiceResponse<KieContainerResource> response = kieServicesClient.createContainer("command-script-container", resource);
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Container command-script-container successfully deployed with module com.redhat:Project1:1.0.", "result": { "kie-container": { "container-id": "command-script-container", "release-id": { "version" : "1.0", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "resolved-release-id": { "version" : "1.0", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "status": "STARTED", "scanner": { "status": "DISPOSED", "poll-interval": null }, "config-items": [], "messages": [ { "severity": "INFO", "timestamp": { "java.util.Date": 1538762455510 }, "content": [ "Container command-script-container successfully created with module com.redhat:Project1:1.0." ] } ], "container-alias": null } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Container command-script-container successfully deployed with module com.redhat:Project1:1.0.", "result": { "kie-container": { "container-id": "command-script-container", "release-id": { "version" : "1.0", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "resolved-release-id": { "version" : "1.0", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "status": "STARTED", "scanner": { "status": "DISPOSED", "poll-interval": null }, "config-items": [], "messages": [ { "severity": "INFO", "timestamp": { "java.util.Date": 1538762455510 }, "content": [ "Container command-script-container successfully created with module com.redhat:Project1:1.0." ] } ], "container-alias": null } } } ] }
Copy to Clipboard Copied! - GetContainerInfoCommand
Decision Server の指定された KIE コンテナーについての情報を返します。
表3.2 コマンドの属性 Name 説明 要件 container-id
KIE コンテナーの ID
必須
REST 要求のボディ (JSON) の例
{ "commands" : [ { "get-container-info" : { "container-id" : "command-script-container" } } ] }
{ "commands" : [ { "get-container-info" : { "container-id" : "command-script-container" } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
ServiceResponse<KieContainerResource> response = kieServicesClient.getContainerInfo("command-script-container");
ServiceResponse<KieContainerResource> response = kieServicesClient.getContainerInfo("command-script-container");
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Info for container command-script-container", "result": { "kie-container": { "container-id": "command-script-container", "release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "resolved-release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "status": "STARTED", "scanner": { "status": "DISPOSED", "poll-interval": null }, "config-items": [ ], "container-alias": null } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Info for container command-script-container", "result": { "kie-container": { "container-id": "command-script-container", "release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "resolved-release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "status": "STARTED", "scanner": { "status": "DISPOSED", "poll-interval": null }, "config-items": [ ], "container-alias": null } } } ] }
Copy to Clipboard Copied! - ListContainersCommand
Decision Server で作成された KIE コンテナー一覧を返します。
表3.3 コマンドの属性 Name 説明 要件 kie-container-filter
release-id-filter
、container-status-filter
、および結果のフィルターリングに使用する他の KIE コンテナープロパティーを含むオプションのマップ。任意
REST 要求のボディ (JSON) の例
{ "commands" : [ { "list-containers" : { "kie-container-filter" : { "release-id-filter" : { }, "container-status-filter" : { "accepted-status" : ["FAILED"] } } } } ] }
{ "commands" : [ { "list-containers" : { "kie-container-filter" : { "release-id-filter" : { }, "container-status-filter" : { "accepted-status" : ["FAILED"] } } } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
KieContainerResourceFilter filter = new KieContainerResourceFilter.Builder() .status(KieContainerStatus.FAILED) .build(); KieContainerResourceList containersList = kieServicesClient.listContainers(filter);
KieContainerResourceFilter filter = new KieContainerResourceFilter.Builder() .status(KieContainerStatus.FAILED) .build(); KieContainerResourceList containersList = kieServicesClient.listContainers(filter);
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "List of created containers", "result": { "kie-containers": { "kie-container": [ { "container-id": "command-script-container", "release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "resolved-release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "status": "STARTED", "scanner": { "status": "STARTED", "poll-interval": 5000 }, "config-items": [ { "itemName": "RuntimeStrategy", "itemValue": "SINGLETON", "itemType": "java.lang.String" }, { "itemName": "MergeMode", "itemValue": "MERGE_COLLECTIONS", "itemType": "java.lang.String" }, { "itemName": "KBase", "itemValue": "", "itemType": "java.lang.String" }, { "itemName": "KSession", "itemValue": "", "itemType": "java.lang.String" } ], "messages": [ { "severity": "INFO", "timestamp": { "java.util.Date": 1538504619749 }, "content": [ "Container command-script-container successfully created with module com.redhat:Project1:1.0." ] } ], "container-alias": null } ] } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "List of created containers", "result": { "kie-containers": { "kie-container": [ { "container-id": "command-script-container", "release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "resolved-release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.0" }, "status": "STARTED", "scanner": { "status": "STARTED", "poll-interval": 5000 }, "config-items": [ { "itemName": "RuntimeStrategy", "itemValue": "SINGLETON", "itemType": "java.lang.String" }, { "itemName": "MergeMode", "itemValue": "MERGE_COLLECTIONS", "itemType": "java.lang.String" }, { "itemName": "KBase", "itemValue": "", "itemType": "java.lang.String" }, { "itemName": "KSession", "itemValue": "", "itemType": "java.lang.String" } ], "messages": [ { "severity": "INFO", "timestamp": { "java.util.Date": 1538504619749 }, "content": [ "Container command-script-container successfully created with module com.redhat:Project1:1.0." ] } ], "container-alias": null } ] } } } ] }
Copy to Clipboard Copied! - CallContainerCommand
KIE コンテナーを呼び出し、1 つ以上のランタイムコマンドを実行します。Red Hat Decision Manager ランタイムコマンドの情報は、4章Red Hat Decision Manager のランタイムコマンド を参照してください。
表3.4 コマンドの属性 Name 説明 要件 container-id
呼び出される KIE コンテナーの ID
必須
payload
KIE コンテナーで実行される
BatchExecutionCommand
ラッパー内の 1 つ以上のコマンド必須
REST 要求のボディ (JSON) の例
{ "commands" : [ { "call-container" : { "payload" : "{\n \"lookup\" : \"defaultKieSession\",\n \"commands\" : [ {\n \"fire-all-rules\" : {\n \"max\" : -1,\n \"out-identifier\" : null\n }\n } ]\n}", "container-id" : "command-script-container" } } ] }
{ "commands" : [ { "call-container" : { "payload" : "{\n \"lookup\" : \"defaultKieSession\",\n \"commands\" : [ {\n \"fire-all-rules\" : {\n \"max\" : -1,\n \"out-identifier\" : null\n }\n } ]\n}", "container-id" : "command-script-container" } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
List<Command<?>> commands = new ArrayList<Command<?>>(); BatchExecutionCommand batchExecution1 = commandsFactory.newBatchExecution(commands, "defaultKieSession"); commands.add(commandsFactory.newFireAllRules()); ServiceResponse<ExecutionResults> response1 = ruleClient.executeCommandsWithResults("command-script-container", batchExecution1);
List<Command<?>> commands = new ArrayList<Command<?>>(); BatchExecutionCommand batchExecution1 = commandsFactory.newBatchExecution(commands, "defaultKieSession"); commands.add(commandsFactory.newFireAllRules()); ServiceResponse<ExecutionResults> response1 = ruleClient.executeCommandsWithResults("command-script-container", batchExecution1);
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Container command-script-container successfully called.", "result": "{\n \"results\" : [ ],\n \"facts\" : [ ]\n}" } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Container command-script-container successfully called.", "result": "{\n \"results\" : [ ],\n \"facts\" : [ ]\n}" } ] }
Copy to Clipboard Copied! - DisposeContainerCommand
Decision Server の指定された KIE コンテナーを破棄します。
表3.5 コマンドの属性 Name 説明 要件 container-id
破棄される KIE コンテナーの ID
必須
REST 要求のボディ (JSON) の例
{ "commands" : [ { "dispose-container" : { "container-id" : "command-script-container" } } ] }
{ "commands" : [ { "dispose-container" : { "container-id" : "command-script-container" } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
ServiceResponse<Void> response = kieServicesClient.disposeContainer("command-script-container");
ServiceResponse<Void> response = kieServicesClient.disposeContainer("command-script-container");
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Container command-script-container successfully disposed.", "result": null } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Container command-script-container successfully disposed.", "result": null } ] }
Copy to Clipboard Copied! - GetScannerInfoCommand
該当する場合は、指定された KIE コンテナー内の自動更新に使用される KIE スキャナーに関する情報を返します。
表3.6 コマンドの属性 Name 説明 要件 container-id
KIE スキャナーを使用する KIE コンテナーの ID
必須
REST 要求のボディ (JSON) の例
{ "commands" : [ { "get-scanner-info" : { "container-id" : "command-script-container" } } ] }
{ "commands" : [ { "get-scanner-info" : { "container-id" : "command-script-container" } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
ServiceResponse<KieScannerResource> response = kieServicesClient.getScannerInfo("command-script-container");
ServiceResponse<KieScannerResource> response = kieServicesClient.getScannerInfo("command-script-container");
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Scanner info successfully retrieved", "result": { "kie-scanner": { "status": "DISPOSED", "poll-interval": null } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Scanner info successfully retrieved", "result": { "kie-scanner": { "status": "DISPOSED", "poll-interval": null } } } ] }
Copy to Clipboard Copied! - UpdateScannerCommand
更新済み KIE コンテナーデプロイメントのポーリングを制御する KIE スキャナーを起動または停止します。
注記ビジネスプロセスと KIE スキャナーを併用しないようにしてください。プロセスで KIE スキャナーを使用すると、予期せぬ更新が発生し、プロセスインスタンスの実行と互換性のない変更が加えられた場合に、長時間実行中のプロセスでエラーが発生する可能性があります。
表3.7 コマンドの属性 Name 説明 要件 container-id
KIE スキャナーを使用する KIE コンテナーの ID
必須
status
KIE スキャナーに設定するステータス (
STARTED
、STOPPED
)必須
poll-interval
ポーリングの時間 (単位: ミリ秒)
スキャナーの起動時にのみ必須
REST 要求のボディ (JSON) の例
{ "commands" : [ { "update-scanner" : { "scanner" : { "status" : "STARTED", "poll-interval" : 10000 }, "container-id" : "command-script-container" } } ] }
{ "commands" : [ { "update-scanner" : { "scanner" : { "status" : "STARTED", "poll-interval" : 10000 }, "container-id" : "command-script-container" } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
KieScannerResource scannerResource = new KieScannerResource(); scannerResource.setPollInterval(10000); scannerResource.setStatus(KieScannerStatus. STARTED); ServiceResponse<KieScannerResource> response = kieServicesClient.updateScanner("command-script-container", scannerResource);
KieScannerResource scannerResource = new KieScannerResource(); scannerResource.setPollInterval(10000); scannerResource.setStatus(KieScannerStatus. STARTED); ServiceResponse<KieScannerResource> response = kieServicesClient.updateScanner("command-script-container", scannerResource);
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Kie scanner successfully created.", "result": { "kie-scanner": { "status": "STARTED", "poll-interval": 10000 } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Kie scanner successfully created.", "result": { "kie-scanner": { "status": "STARTED", "poll-interval": 10000 } } } ] }
Copy to Clipboard Copied! - UpdateReleaseIdCommand
指定した KIE コンテナーのリリース ID データ (グループ ID、アーティファクト ID、バージョン) を更新します。
表3.8 コマンドの属性 Name 説明 要件 container-id
更新される KIE コンテナーの ID
必須
releaseId
KIE コンテナーに適用される更新済み GAV (グループ ID、アーティファクト ID、バージョン) データ
必須
REST 要求のボディ (JSON) の例
{ "commands" : [ { "update-release-id" : { "releaseId" : { "version" : "1.1", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "container-id" : "command-script-container" } } ] }
{ "commands" : [ { "update-release-id" : { "releaseId" : { "version" : "1.1", "group-id" : "com.redhat", "artifact-id" : "Project1" }, "container-id" : "command-script-container" } } ] }
Copy to Clipboard Copied! Java クライアントメソッドの例
ServiceResponse<ReleaseId> response = kieServicesClient.updateReleaseId("command-script-container", "com.redhat:Project1:1.1");
ServiceResponse<ReleaseId> response = kieServicesClient.updateReleaseId("command-script-container", "com.redhat:Project1:1.1");
Copy to Clipboard Copied! サーバーの応答例 (JSON)
{ "response": [ { "type": "SUCCESS", "msg": "Release id successfully updated", "result": { "release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.1" } } } ] }
{ "response": [ { "type": "SUCCESS", "msg": "Release id successfully updated", "result": { "release-id": { "group-id": "com.redhat", "artifact-id": "Project1", "version": "1.1" } } } ] }
Copy to Clipboard Copied!