3.6. Starting a service in KIE Server
If you have deployed Red Hat Decision Manager assets from a Maven or Java project outside of Business Central, you use a KIE Server REST API call to start the KIE container (deployment unit) and the services in it. You can use the KIE Server REST API to start services regardless of your deployment type, including deployment from Business Central, but projects deployed from Business Central either are started automatically or can be started within the Business Central interface.
Prerequisites
-
KIE Server is installed and
kie-serveruser access is configured. For installation options, see Planning a Red Hat Decision Manager installation.
Procedure
In your command terminal, run the following API request to load a service into a KIE container in the KIE Server and to start it:
$ curl --user "<username>:<password>" -H "Content-Type: application/json" -X PUT -d '{"container-id" : "<containerID>","release-id" : {"group-id" : "<groupID>","artifact-id" : "<artifactID>","version" : "<version>"}}' http://<serverhost>:<serverport>/kie-server/services/rest/server/containers/<containerID>
Replace the following values:
-
<username>, <password>: The user name and password of a user with the
kie-serverrole. - <containerID>: The identifier for the KIE container (deployment unit). You can use any random identifier but it must be the same in both places in the command (the URL and the data).
- <groupID>, <artifactID>, <version>: The project GAV values.
-
<serverhost>: The host name for the KIE Server, or
localhostif you are running the command on the same host as the KIE Server. - <serverport>: The port number for the KIE Server.
Example:
curl --user "rhdmAdmin:password@1" -H "Content-Type: application/json" -X PUT -d '{"container-id" : "kie1","release-id" : {"group-id" : "org.kie.server.testing","artifact-id" : "container-crud-tests1","version" : "2.1.0.GA"}}' http://localhost:39043/kie-server/services/rest/server/containers/kie1