Red Hat xPaaS Intelligent Process Server Image
Develop with the Intelligent Process Server (BPM Suite) image
Legal Notice
Abstract
Chapter 1. Introduction to the Intelligent Process Server Image
1.1. What Is the Red Hat JBoss BPM Suite intelligent process server?
The Red Hat JBoss BPM Suite intelligent process server xPaaS image provides a platform for executing business processes on JBoss BPMS Intelligent Process Server 6.3, which is a modular, standalone server component that can be used to instantiate and execute rules and processes. It exposes this functionality through REST, JMS and Java interfaces to client application.
Red Hat offers nine Intelligent Process Server application templates:
| Template | Description |
|---|---|
| processserver63-basic-s2i | template provides HTTP and JMS (via HornetQ) interfaces with a simple H2 database. |
| processserver63-mysql-s2i | template provides HTTP and JMS (via HornetQ) interfaces with a simple MySQL database. |
| processserver63-mysql-persistent-s2i | template provides HTTP and JMS (via HornetQ) interfaces with a MySQL persistence volume. |
| processserver63-postgresql-s2i | template provides HTTP and JMS (via HornetQ) interfaces with a simple PostgreSQL database. |
| processserver63-postgresql-persistent-s2i | template provides HTTP and JMS (via HornetQ) interfaces with a PostgresQL persistence volume. |
| processserver63-amq-mysql-s2i | template provides HTTP, HTTPS, and JMS (via ActiveMQ) interfaces with a simple MySQL database. |
| processserver63-amq-mysql-persistent-s2i | template provides HTTP, HTTPS, and JMS (via ActiveMQ) interfaces with a MySQL persistence volume. |
| processserver63-amq-postgresql-s2i | template provides HTTP, HTTPS, and JMS (via ActiveMQ) interfaces with a simple PostgreSQL database. |
| processserver63-amq-postgresql-persistent-s2i | template provides HTTP, HTTPS, and JMS (via ActiveMQ) interfaces with a PostgresQL persistence volume. |
Chapter 2. Before You Begin
2.1. Comparison: Intelligent Process Server xPaaS Image and Red Hat JBoss Intelligent Process Server
This topic details the differences between the Intelligent Process Server xPaaS image and the full, non-PaaS release of JBoss BPMS, and provides instructions specific to running and configuring the Intelligent Process Server xPaaS image.
Documentation for other JBoss Intelligent Process Server functionality not specific to the Intelligent Process Server xPaaS image can be found in the JBoss BPM Suite documentation on the Red Hat Customer Portal.
2.1.1. Functionality Differences for Intelligent Process Server xPaaS Images
There are several major functionality differences between the regular release of Red Hat JBoss Intelligent Process Server and the OpenShift Intelligent Process Server xPaaS image:
- The Intelligent Process Server xPaaS image extends the OpenShift EAP image, and any capabilities or limitations it has are also found in the Intelligent Process Server image.
- Business Central is not included in the xPaaS image. To connect to the Intelligent Process Server web console, click the Open Java Console button in OpenShift 3.2.
- Authoring of any content through the BPMS Console or API is not supported.
-
There is no support for the
Singletonstrategy for maintaining a single instance of theRuntimeEngine.
2.1.2. Managing Intelligent Process Server xPaaS Images
As the Intelligent Process Server image is built off the OpenShift JBoss EAP xPaaS image, the JBoss EAP Management CLI is accessible from within the container for troubleshooting purposes.
First open a remote shell session to the running pod:
$ oc rsh <pod_name>
Then run the following from the remote shell session to launch the JBoss EAP Management CLI:
$ /opt/eap/bin/jboss-cli.sh
Any configuration changes made using the JBoss EAP Management CLI on a running container will be lost when the container restarts.
2.2. Security in the Intelligent Process Server xPaaS Image
Access is limited to users with the kie-server authorization role. A user with this role can be specified via the KIE_SERVER_USER and KIE_SERVER_PASSWORD environment variables.
The HTTP/REST endpoint is configured to only allow the execution of KIE containers and querying of KIE Server resources. Administrative functions like creating or disposing Containers, updating ReleaseIds or Scanners, etc. are restricted. The JMS endpoint currently does not support these restrictions. In the future, more fine-grained security configuration should be available for both endpoints.
Chapter 3. Using the Intelligent Process Server xPaaS Image Streams and Application Templates
The Red Hat xPaaS middleware images were automatically created during the installation of OpenShift along with the other default image streams and templates.
3.1. Version Compatibility and Support
See the xPaaS part of the OpenShift and Atomic Platform Tested Integrations page for details about OpenShift image version compatibility.
3.2. Initial Setup
The Tutorials in this guide follow on from and assume an OpenShift instance similar to that created in the OpenShift Primer.
Chapter 4. Get Started
4.1. Using the Intelligent Process Server xPaaS Image Streams and Application Templates
The Red Hat xPaaS middleware images were automatically created during the installation of OpenShift along with the other default image streams and templates.
4.2. Deployment Considerations for the Intelligent Process Server xPaas Image
4.2.1. Creating the Service Account
The Intelligent Process Server xPaaS image requires a service account for deployments. For multiple node deployments, the service account must have the view role enabled so that it can manage the various pods in the cluster. In addition, you will need to configure SSL to enable connections to Intelligent Process Server from outside of the OpenShift instance.
Create the service account:
$ echo '{"kind": "ServiceAccount", "apiVersion": "v1", "metadata": {"name": "<service-account-name>"}}' | oc create -f -OpenShift 3.2 users can use the following command to create the service account:
$ oc create serviceaccount <service-account-name>Add the view role to the service account:
$ oc policy add-role-to-user view system:serviceaccount:<project-name>:<service-account-name>
4.2.2. Configuring Keystores
The Intelligent Process Server image requires two keystores:
-
An SSL keystore to provide private and public keys for https traffic encryption
- A JGroups keystore to provide private and public keys for network traffic encryption between nodes in the cluster
These keystores are expected by the Intelligent Process Server image, even if the application uses only http on a single-node OpenShift instance. Note that self-signed certificates do not provide secure communication and are intended for internal testing purposes.
For production environments Red Hat recommends that you use your own SSL certificate purchased from a verified Certificate Authority (CA) for SSL-encrypted connections (HTTPS).
See Generate a SSL Encryption Key and Certificate for more information on how to create a keystore with self-signed or purchased SSL certificates.
4.2.3. Generating the Secret
OpenShift uses objects called Secrets to hold sensitive information, such as passwords or keystores. See the Secrets chapter in the OpenShift documentation for more information.
The Intelligent Process Server image requires a secret that holds the two keystores described earlier. This provides the necessary authorization to applications in the project.
Use the Java and JGroups keystore files to create a secret for the project:
$ oc create secret generic <ips-secret-name> --from-file=<jgroups.jceks> --from-file=<keystore.jks>
After the secret has been generated, it can be associated with a service account.
4.2.4. Creating the Service Account
The service account allows users to associate certain secrets and roles with applications in a project namespace. This provides the application with the necessary authorization to run with all required privileges.
Create a service account to be used for the Intelligent Process Server deployment:
$ oc create serviceaccount <service-account-name>Add the view role to the service account. This enables the service account to view all the resources in the application namespace in OpenShift, which is necessary for managing the cluster.
$ oc policy add-role-to-user view system:serviceaccount:<project-name>:<service-account-name>
Add the secret created for the project to the service account:
$ oc secret add sa/<service-account-name> secret/<ips-secret-name>
4.2.5. Configuring the Project Remote Repository
The project must be configured to use a remote repository so that Business Central can push changes and OpenShift can pull the repository to build the application. In the application repository files:
The pom.xml must be configured to use a remote repository so that OpenShift can access it.
... <distributionManagement> <repository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/deployment/filepath/</url> </repository> <snapshotRepository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/snapshots/filepath/</url> </snapshotRepository> </distributionManagement> ...For more information, see the Red Hat JBoss BPM Suite Administration and Configuration Guide.
The configuration/settings.xml file must have the remote repository defined so that OpenShift can download the application artifacts.
... <profiles> <profile> <id>openshift-mirror-repositories</id> <repositories> <repository> <id>openshift-mirror</id> <url>http://maven.example/public/filepath/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>openshift-mirror</id> <url>http://maven.example/public/filepath/</url> </pluginRepository> </pluginRepositories> </profile> </profiles> ...For more information, see the Red Hat JBoss BPM Suite Installation Guide.
The hidden .s2i/environment file defines the KIE container deployment, including which KIE jars to use and the location from which to retrieve them. When OpenShift deploys the built image, the pod name is derived from the deployment alias defined in this file:
KIE_CONTAINER_DEPLOYMENT=<alias>=<group_id>:<artifact_id>:<version>
For example:
KIE_CONTAINER_DEPLOYMENT=ApplicationTest=com.example.openshift:example_workflow:1.0
4.3. Updating Processes
Each image is built from a snapshot of a specific Maven repository. When a new process is added, or an existing process modified, a new image must be created and deployed for the modifications to take effect.
Updating the Application
The KIE_CONTAINER_DEVELOPMENT_OVERRIDE variable can be used to explicitly override the KIE_CONTAINER_DEPLOYMENT variable set in the original deployment.
When an application has been modified and is ready to be deployed, include the updated version details for the KIE_CONTAINER_DEPLOYMENT_OVERRIDE variable in the .s2i/environment file. This can then be pushed to your repository to be built as an image.
Alternatively, start a binary build from the local repo:
$ oc start-build <RulesTest> --from-repo=</repository/filepath>
This sends the contents of the Git repository directly to OpenShift. If Incremental Builds has been configured, the new build pulls the image previously used, extracts the Maven repository for the new pod, and downloads the missing content.
4.3.1. Recreate Update Strategy
Use the Recreate Update Strategy for the Intelligent Process Server deployment. This update strategy automatically scales down the old deployment to 0 and deploys the new version. After the new version is validated, the new deployment is automatically scaled up to the replica size of the old deployment.
The Recreate update strategy supports Lifecycle Hooks and is set as the default update strategy in the Intelligent Process Server application templates.
The Intelligent Process Server will be inactive during the Recreate update process, until the new deployment has been validated and scaled. During this period, REST clients may return 503 service unavailable errors and A-MQ clients may experience timeouts.
The Rolling Update Strategy is not supported for the Intelligent Process Server xPaaS image. Although multiple concurrent versions of an application are supported in a deployment, a cluster can only support valid routing to pods of the same version.
4.4. Multiple Concurrent Versions
An application may contain multiple concurrent KIE containers of different versions. Each container has a classloader environment and a unique identifier. The unique identifier is one of either a container ID or a deployment ID, which are synonymous.
Multiple versions are deployed using the KIE_CONTAINER_DEPLOYMENT variable, specifying the <alias>=<group_id>:<artifact_id>:<version> for each version of the application, separated by a pipe ( | ) in the .s2i/environment file.
For example:
KIE_CONTAINER_DEPLOYMENT=ApplicationTest=com.example.openshift:example_workflow:1.0|ApplicationTest=com.example.openshift:example_workflow:1.1
would create the following:
KIE_CONTAINER_DEPLOYMENT=ApplicationTest=com.example.openshift:example_workflow:1.0|ApplicationTest=com.example.openshift:example_workflow:1.1 KIE_CONTAINER_DEPLOYMENT_ORIGINAL: KIE_CONTAINER_DEPLOYMENT_OVERRIDE: ApplicationTest=com.example.openshift:example_workflow:1.0|ApplicationTest=com.example.openshift:example_workflow:1.1 KIE_CONTAINER_DEPLOYMENT_COUNT: 2 KIE_CONTAINER_ID_0: be690712c7a5808a0696926088ff18b2 KIE_CONTAINER_KJAR_GROUP_ID_0: com.example.openshift KIE_CONTAINER_KJAR_ARTIFACT_ID_0: example_workflow KIE_CONTAINER_KJAR_VERSION_0: 1.0 KIE_CONTAINER_ID_1: 72978ef7154f52df289ef01cbdb51c4d KIE_CONTAINER_KJAR_GROUP_ID_1: com.example.openshift KIE_CONTAINER_KJAR_ARTIFACT_ID_1: example_workflow KIE_CONTAINER_KJAR_VERSION_1: 1.0 KIE_CONTAINER_REDIRECT_ENABLED: true
or, as represented in XML format:
<kie-server-state>
<containers>
<container>
<containerId>be690712c7a5808a0696926088ff18b2</containerId>
<releaseId>
<groupId>com.example.openshift</groupId>
<artifactId>example_workflow</artifactId>
<version>1.0</version>
</releaseId>
<status>STARTED</status>
<configItems/>
<messages/>
</container>
<container>
<containerId>72978ef7154f52df289ef01cbdb51c4d</containerId>
<releaseId>
<groupId>com.example.openshift</groupId>
<artifactId>example_workflow</artifactId>
<version>1.1</version>
</releaseId>
<status>STARTED</status>
<configItems/>
<messages/>
</container>
</containers>
</kie-server-state>To deploy multiple concurrent versions, the KIE_CONTAINER_REDIRECT_ENABLED variable must be set to true. This variable defaults to true and only needs to be explicitly included in the .s2i/environment file if setting to false.
The KIE_CONTAINER_REDIRECT_ENABLED variable enables override of the container ID. When set to true, a unique md5 sum hash is generated from the <alias>=<group_id>:<artifact_id>:<version> for each version of the application. It also enables alias redirection so that client requests using the deployment alias are redirected to the container of the correct version.
If set to false, the deployment alias is used as the container ID and multiple concurrent versions are not possible. If multiple versions of an application are specified for KIE_CONTAINER_DEPLOYMENT, and KIE_CONTAINER_REDIRECT_ENABLED is set to false, only the latest version of the application will be deployed and alias redirection will be disabled.
Changing the KIE_CONTAINER_REDIRECT_ENABLED variable in the .s2i/environment file of a running application generates a new container ID for the running application, which may make it incompatible with any clients using the old container ID.
4.4.1. Container ID
The container ID is an md5 sum hash generated from the <alias>=<group_id>:<artifact_id>:<version> of the application, and is used for client communication. In the case of multiple versions, each version of the application will have a unique container ID, but share the deployment alias name.
4.4.2. Adding, Overriding, or Updating Multiple Versions
If an application has already been deployed, use the KIE_CONTAINER_DEPLOYMENT_OVERRIDE variable in the .s2i/environment file, and specify the <alias>=<group_id>:<artifact_id>:<version> for each version of the application to override the KIE_CONTAINER_DEPLOYMENT variable in the json application template. This is useful for preserving older versions of an application that are still in use.
For example, the ApplicationTest application example:
KIE_CONTAINER_DEPLOYMENT=ApplicationTest=com.example.openshift:example_workflow:1.0
To maintain this version of the application, but to add an updated version, update the .s2i/environment file:
KIE_CONTAINER_DEPLOYMENT_OVERRIDE=ApplicationTest=com.example.openshift:example_workflow:1.0|ApplicationTest=com.example.openshift:example_workflow:1.1
See Example Workflow: Deploying an Updated Version Concurrently with Original Application for an example on deploying an updated application alongside the older version.
4.4.3. Request Targeting for Multiple Versions
In most cases, clients must target a particular container by name to execute server-side functions. This can be done by specifying the full deployment name, the container ID hash, or the deployment alias.
For example:
- Full Deployment Name: ApplicationTest=com.example.openshift:example_workflow:1.0
- Container ID Hash: be690712c7a5808a0696926088ff18b2
- Deployment Alias: ApplicationTest
Specifying either the full deployment name or the container ID targets the appropriate container. Specifying the deployment alias, which is used by all the containers in the KIE server, requires a multi-stage resolution process to target the correct version container.
4.4.4. Alias Redirection
In a multi-version deployment, all applications share the same deployment alias. Requests that use the deployment alias of the application require a resolution process in order to redirect the request to the container of the correct version.
Resolution Process Hierarchy
The multi-stage resolution process depends on the method invoked by the client, and the ID associated with the request:
Process Hierarchy (in descending order):
- Process Instance ID (specific to IPS/BPM)
- Correlation Key (specific to IPS/BPM)
- Task Instance ID (specific to IPS/BPM)
- Work Item ID (specific to IPS/BPM)
- Job Request ID (specific to IPS/BPM)
- Conversation ID
- Default Container ID
Clients
Multiple clients can be used to invoke the server, depending on the client interaction type:
| Client | Interaction |
|---|---|
| KIE interaction | org.kie.server.client.KieServicesClient |
| Intelligent Process Server interaction |
org.kie.server.client.ProcessServicesClient |
Conversation ID
A conversation represents interactions between KIE Services Java clients and the server. When a client initiates a conversation, the response from the server includes an encoded multi-part heading. The client will then use this heading in subsequent requests to the server. This conversation header contains the conversation ID, which is used by the Servlet Filter in the REST interface, or the EJB Interceptor in the JMS interface, to determine the correct version of the application to invoke.
Due to a bug in the KIE client, client classes do not share the conversation ID for all services and therefore, users will be unable to complete the conversation. This issue is fixed in BPM Suite 6.3.1 or higher. It is recommended that you use this version of BPM Suite in your BOM file, as shown here:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.bom.brms</groupId>
<artifactId>jboss-brms-bpmsuite-platform-bom</artifactId>
<version>6.3.1.GA-redhat-2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>Default Container ID
The final stage in the process hierarchy is the default container ID. If a specific container ID cannot be resolved, the default container ID is determined as the application with the latest version (based on <alias>=<group_id>:<artifact_id>:<version>).
Chapter 5. Tutorials
5.1. Example Workflow: Deploying a JBoss BPMS Project as an xPaaS Intelligent Process Server xPaaS Image
Business Central, the JBoss BPMS console that provides a unified web-based environment for managing projects, is not part of the Intelligent Process Server xPaaS image. An external repository is required to integrate projects between Business Central and OpenShift. This tutorial presumes that a project has already been set up in Business Central.
5.1.1. Preparing the JBoss BPMS Project
Prepare a Git repository for the project configuration files. The repository is used to store the Maven repository and KIE container deployment files. The Git repository has the following file hierarchy:
- ../configuration/settings.xml for the Maven repository
- ../.s2i/environment for the KIE container deployment
Preparation of the BPMS project may require some prior knowledge with the Red Hat JBoss BPM Suite. Refer to the Red Hat JBoss BPM Suite User Guide for more information on any of these tasks.
- Log in to Red Hat JBoss BPM Suite: Business Central web console.
Clone the existing repository to ensure it is up-to-date.
-
Authoring→Administration -
Repositories→Clone Repository -
Provide the Repository Name, Organizational Unit, and the Git URL and click the
Clonebutton.
-
Using Repository View, ensure the pom.xml is configured to use a remote repository by containing xml similar to the following:
... <distributionManagement> <repository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/content/repo/deployments/</url> </repository> <snapshotRepository> <id>deployment</id> <name>OpenShift Maven repo</name> <url>http://maven.example/content/repo/snapshots/</url> </snapshotRepository> </distributionManagement> ...For more information, see the Red Hat JBoss BRMS Administration and Configuration Guide.
In the application repository, ensure the configuration/settings.xml and the .s2i/environment files define the Maven repository and the KIE container deployment respectively:
The Maven repository should be defined in the configuration/settings.xml so that OpenShift can download the application artifacts. It should contain xml similar to the following:
... <profiles> <profile> <id>openshift-mirror-repositories</id> <repositories> <repository> <id>openshift-mirror</id> <url>http://maven.example/content/group/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>openshift-mirror</id> <url>http://maven.example/content/group/public/</url> </pluginRepository> </pluginRepositories> </profile> </profiles> ...For more information, see the Red Hat JBoss BRMS Installation Guide.
The .s2i/environment file must define the KIE container deployment, including which KIE jars to use and the location from which to retrieve them. The pod name is derived from the deployment alias, which is defined as ipsDemo in this example:
KIE_CONTAINER_DEPLOYMENT=ipsDemo=com.example.openshift:example_workflow:1.0
- Click Save if any changes have been made to the project.
- Click Open Project Editor → Build → Build and Deploy. This will push the project artifacts into the Maven repository so that it is ready to be deployed on OpenShift.
5.1.2. Preparing Intelligent Process Server Deployment
Create a new project:
$ oc new-project ips-app-demo
Create a service account to be used for the IPS deployment:
$ oc create serviceaccount ips-service-account
Add the view role to the service account. This enables the service account to view all the resources in the ips-app-demo namespace, which is necessary for managing the cluster.
$ oc policy add-role-to-user view system:serviceaccount:ips-app-demo:ips-service-account
The Intelligent Process Server template requires an SSL keystore and a JGroups keystore.
These keystores are expected even if the application will not use https.
This example uses ‘keytool’, a package included with the Java Development Kit, to generate self-signed certificates for these keystores. The following commands will prompt for passwords.
Generate a secure key for the SSL keystore:
$ keytool -genkeypair -alias https -storetype JKS -keystore keystore.jks
Generate a secure key for the JGroups keystore:
$ keytool -genseckey -alias jgroups -storetype JCEKS -keystore jgroups.jceks
Use the SSL and JGroup keystore files to create the secret for the project:
$ oc create secret generic ips-app-secret --from-file=jgroups.jceks --from-file=keystore.jks
Add the secret to the service account created earlier:
$ oc secret add sa/ips-service-account secret/ips-app-secret
5.1.3. Deployment
- Log in to the OpenShift web console and select the ips-app-demo project space.
- Click Add to Project to list all of the default image streams and templates.
-
Use the Filter by keyword search bar to limit the list to those that match
processserver. You may need to click See all to show the desired application template. -
Select and configure the desired template.
The SOURCE_REPOSITORY_URL must be set to the Git repository for the deployment, so that the application can pull the configuration/settings.xml and .s2i/environment files. - Click Deploy.
During the build, the Maven repository is downloaded and build into the container so that no additional packages or dependencies are downloaded at runtime.
The application is available once the pod is running.
5.2. Example Workflow: Deploying an Updated Version Concurrently with Original Application
This example workflow follows on from Example Workflow: Deploying a JBoss BPMS Project as an xPaaS Intelligent Process Server xPaaS Image, in which the 1.0 version of the example_workflow artifact was deployed with a deployment alias of ipsDemo. This example deploys a 1.1 version of the of the example_workflow artifact alongside the 1.0 version so that both versions of the example_workflow artifact are running simultaneously, both with the ipsDemo deployment alias.
- Update the repository with the new version of the server.
Edit the .s2i/environment file for the application:
- Change the KIE_CONTAINER_DEPLOYMENT variable to KIE_CONTAINER_DEPLOYMENT_OVERRIDE
Add the new version to the end of the value string, separated from the older version with a pipe.
KIE_CONTAINER_DEPLOYMENT_OVERRIDE=ipsDemo=com.example.openshift:example_workflow:1.0|ipsDemo=com.example.openshift:example_workflow:1.1
- Save the changes.
If the project has GitHub Webhooks configured, the new version will be deployed automatically alongside the older running applicaiton. Otherwise it can be manually built:
$ oc start-build ips-app-demo
Once the build has completed, the two different versions of the application will be running simultaneously using the same deployment alias. See Request Targeting for Multiple Versions for more information on how client requests are redirected to the correct version of the application.
Chapter 6. Reference
6.1. Application Template Parameters
| Variable | Description |
|---|---|
| APPLICATION_NAME | The name for the application. |
| KIE_SERVER_PROTOCOL | The protocol to access the KIE Server REST interface. |
| KIE_SERVER_PORT | The port to access the KIE Server REST interface. |
| KIE_SERVER_USER | The user name to access the KIE Server REST or JMS interface. |
| KIE_SERVER_PASSWORD | The password to access the KIE Server REST or JMS interface. Must be different than username; must not be root, admin, or administrator; must contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), and 1 non-alphanumeric symbol(s). |
| KIE_SERVER_DOMAIN | JAAS LoginContext domain that shall be used to authenticate users when using JMS. |
| KIE_SERVER_JMS_QUEUES_REQUEST | JNDI name of request queue for JMS. |
| KIE_SERVER_JMS_QUEUES_RESPONSE | JNDI name of response queue for JMS. |
| KIE_SERVER_EXECUTOR_JMS_QUEUE | JNDI name of executor queue for JMS. |
| KIE_SERVER_PERSISTENCE_DIALECT | Hibernate persistence dialect. |
| HOSTNAME_HTTP | Custom hostname for http service route. Leave blank for default hostname, e.g., <application-name>-<project>.<default-domain-suffix> |
| HOSTNAME_HTTPS | Custom hostname for https service route. Leave blank for default hostname, e.g., secure-<application-name>-<project>.<default-domain-suffix> |
| SOURCE_REPOSITORY_URL | Git source URI for application. |
| SOURCE_REPOSITORY_REF | Git branch/tag reference. |
| CONTEXT_DIR | Path within Git project to build; empty for root project directory. |
| DB_JNDI | Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/ExampleDS |
| DB_DATABASE | Database name. |
| VOLUME_CAPACITY | Size of persistent storage for database volume. |
| MQ_JNDI | JNDI name for connection factory used by applications to connect to the broker, e.g. java:/JmsXA |
| MQ_PROTOCOL |
Broker protocols to configure, separated by commas. Allowed values are: |
| MQ_QUEUES | Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP. |
| MQ_TOPICS | Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP. |
| HTTPS_SECRET | The name of the secret containing the keystore file. |
| HTTPS_KEYSTORE | The name of the keystore file within the secret. |
| HTTPS_NAME | The name associated with the server certificate. |
| HTTPS_PASSWORD | The password for the keystore and certificate. |
| DB_USERNAME | Database user name. |
| DB_PASSWORD | Database user password |
| DB_MIN_POOL_SIZE | Sets xa-pool/min-pool-size for the configured datasource. |
| DB_MAX_POOL_SIZE | Sets xa-pool/max-pool-size for the configured datasource. |
| DB_TX_ISOLATION | Sets transaction-isolation for the configured datasource. |
| POSTGRESQL_MAX_CONNECTIONS | The maximum number of client connections allowed. This also sets the maximum number of prepared transactions. |
| POSTGRESQL_SHARED_BUFFERS | Configures how much memory is dedicated to PostgreSQL for caching data. |
| MQ_USERNAME | User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated. |
| MQ_PASSWORD | Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated. |
| AMQ_ADMIN_USERNAME | User name for broker admin. If left empty, it will be generated. |
| AMQ_ADMIN_PASSWORD | Password for broker admin. If left empty, it will be generated. |
| GITHUB_WEBHOOK_SECRET | GitHub trigger secret. |
| GENERIC_WEBHOOK_SECRET | Generic build trigger secret. |
| IMAGE_STREAM_NAMESPACE | Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you’ve installed the ImageStreams in a different namespace/project. |
6.2. Logging
In addition to viewing the OpenShift logs, you can troubleshoot a running Intelligent Process Server image by viewing the logs that are outputted to the container’s console:
$ oc logs -f <pod-name>6.3. Endpoints
Clients can access the Intelligent Process Server xPaaS Image via multiple endpoints; by default the provided templates include support for REST, HornetQ, and ActiveMQ.
6.3.1. REST
Clients can use the REST API in various ways:
6.3.1.1. Browser
- Current server state: http://host/kie-server/services/rest/server
- List of containers: http://host/kie-server/services/rest/server/containers
- Specific container state: http://host/kie-server/services/rest/server/containers/processserver-library
6.3.1.2. Java
// LibraryClient.java
KieServicesConfiguration config = KieServicesFactory.newRestConfiguration(
"http://host/kie-server/services/rest/server", "kieserverUser", "kieserverPassword");
config.setMarshallingFormat(MarshallingFormat.XSTREAM);
ProcessServicesClient client =
KieServicesFactory.newKieServicesClient(config).getServicesClient(ProcessServicesClient.class);
Map<String,Object> params = new HashMap<String,Object>();
LoanRequest loanRequest = new LoanRequest();
loanRequest.setIsbn("978-0-307-35193-7");
params.put("loanRequest", loanRequest);
Long processInstanceId = client.startProcess("processserver-library", "LibraryProcess", params);6.3.2. JMS
Client can also use the Java Messaging Service, as demonstrated below:
6.3.2.1. Java (HornetQ)
// LibraryClient.java
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.naming.remote.client.InitialContextFactory");
props.setProperty(Context.PROVIDER_URL, "remote://host:4447");
props.setProperty(Context.SECURITY_PRINCIPAL, "kieserverUser");
props.setProperty(Context.SECURITY_CREDENTIALS, "kieserverPassword");
InitialContext context = new InitialContext(props);
KieServicesConfiguration config =
KieServicesFactory.newJMSConfiguration(context, "hornetqUser", "hornetqPassword");
config.setMarshallingFormat(MarshallingFormat.XSTREAM);
ProcessServicesClient client =
KieServicesFactory.newKieServicesClient(config).getServicesClient(ProcessServicesClient.class);
Map<String,Object> params = new HashMap<String,Object>();
LoanRequest loanRequest = new LoanRequest();
loanRequest.setIsbn("978-0-307-35193-7");
params.put("loanRequest", loanRequest);
Long processInstanceId = client.startProcess("processserver-library", "LibraryProcess", params);6.3.2.2. Java (ActiveMQ)
// LibraryClient.java
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
props.setProperty(Context.PROVIDER_URL, "tcp://host:61616");
props.setProperty(Context.SECURITY_PRINCIPAL, "kieserverUser");
props.setProperty(Context.SECURITY_CREDENTIALS, "kieserverPassword");
InitialContext context = new InitialContext(props);
ConnectionFactory connectionFactory = (ConnectionFactory)context.lookup("ConnectionFactory");
Queue requestQueue = (Queue)context.lookup("dynamicQueues/queue/KIE.SERVER.REQUEST");
Queue responseQueue = (Queue)context.lookup("dynamicQueues/queue/KIE.SERVER.RESPONSE");
KieServicesConfiguration config = KieServicesFactory.newJMSConfiguration(
connectionFactory, requestQueue, responseQueue, "activemqUser", "activemqPassword");
config.setMarshallingFormat(MarshallingFormat.XSTREAM);
ProcessServicesClient client =
KieServicesFactory.newKieServicesClient(config).getServicesClient(ProcessServicesClient.class);
Map<String,Object> params = new HashMap<String,Object>();
LoanRequest loanRequest = new LoanRequest();
loanRequest.setIsbn("978-0-307-35193-7");
params.put("loanRequest", loanRequest);
Long processInstanceId = client.startProcess("processserver-library", "LibraryProcess", params);6.4. Troubleshooting
In addition to viewing the OpenShift logs, you can troubleshoot a running Intelligent Process Server xPaaS Image container by viewing its logs. These are outputted to the container’s standard out, and are accessible with the following command:
$ oc logs -f <pod_name>
By default, the OpenShift Intelligent Process Server xPaaS image does not have a file log handler configured. Logs are only sent to the container’s standard out.
