Red Hat Decision Manager Logo


This guide shows you how you can install Decision Manager in your Red Hat OpenShift environment to author, deploy, and execute decision services. This Hello World will show you the step-by-step journey (see Figure 1.0) from installing Decision Manager to deploying it in a Decision Manager environment to testing it inside a cloud environment.

Figure 1.0: Install, deploy, and experience


We'll install Decision Manager on OpenShift, and it will run on top of Red Hat JBoss EAP (WildFly). Once we have Decision Manager up and running, we'll import an existing application to get a view of some of its capabilities. Finally, we'll wrap up our Hello World by deploying the project and testing it! 

1. Setting up your environment


Installing Business Automation Operator

The  Business Automation Operator is the most effective way to deploy Decision Manager in an OpenShift environment. When using the Business Automation Operator, we can delegate all of the application management and all of its components. 

First off, we'll need to subscribe to Business Automation Operator within the OperatorHub. Once we do this, we'll be able to create a new KieApp, which is a custom resource that represents the set of resources required to run our applications, e.g., volume claims, routes, services, and deployment configurations.

When we deploy a KieApp, we can choose between a set of recommended setups to deploy our Decision Manager environment. In this guide, we'll use the ephemeral template rhdm-trial, which deploys Decision Manager and a Kie Server. 

Note: If you want more information on the available template options, we recommend you take a look at the official Red Hat Decision Manager documentation.

Now that we understand what we are going to deploy, let's get started.

Subscribing to the Operator

Let's install the Business Automation operator in three easy steps. 

  1. Login to your OpenShift environment.
  2. Create a new OpenShift project (see Figure 1). On the left menu, select Projects. Next, click Create Project.
  3. Insert the Name, the Display Name, and the Description of the project, then click Create (see Figure 2).
Figure 1: Select Projects, then Create Project




Display Name

Getting Started with RHDM


This is a getting started project with Red Hat Decision Manager

Figure 2: Create Project screen


This operator is installed by namespace and only affects the project to which it's installed. Let's install the Business Automation operator in our hello-rhdm project. 

On the left margin, expand the Operators menu, and click OperatorHub. In OperatorHub (see Figure 3), search for Business Automation.

Figure 3: OperatorHub dashboard


Select Business Automation. You should see, as in Figure 4,  a description of the operator along with its version and current capabilities. Click Install.

Figure 4: Click Install on the Install Operator screen


You should be redirected to the Installed Operators list (see Figure 5). Click on the Business Automation Operator to see more details.

Figure 5: Installed Operators. Select the Business Automation operator.


Congratulations, you've installed the Business Automation operator in your cluster. You're now ready to install Decision Manager in your cloud!


2. Deploy a new KieApp 

Now it's time to install Decision Manager in this environment using the operator.  TIP: Remember, we're using the rhdm-trial template, which is a template that allows us to quickly test Decision Manager. This template is ephemeral and its data will not stay persistent.

In the Operator Details screen (see Figure 6), locate KieApp and click Create Instance.

Figure 6: Operator Details. Locate KieApp and click Create Instance.


Switch to the YAML View, and fill in the template option. Change it from rhpam-trial to rhdm-trial. The result should look like Figure 7.

Figure 7: YAML View. Change template options.


Click Create

You should see a new KieApp, rhdm-trial, being provisioned. We now have in this RHDM environment a Decision Central where we can author, build, and deploy our decision apps, and a KIE Server that can execute our rules and decisions and that exposes APIs to integrate with client applications. TIP: Besides these two main components, you can also find secrets, deployment configurations, routes, services, service accounts, roles, and role bindings. All these resources are created by the operator for the base configuration which includes the exposure of services to the outside network and guarantees the security of the passwords.

See Figure 8. In the menu on the left, expand Networking and click Routes.

Figure 8: From the left menu, expand Networking and click Routes.


These routes are exposing our services to the outside world. Let's try accessing the Decision Central route.

Open the rhdm-trial-rhdmcentr-http route link in a new tab (see Figure 9).

Figure 9: The trial route link in a new tab


If everything went well, a new tab should open in your browser with Decision Central available for you! These are the credentials for Decision Central:

  • User: adminUser
  • Password: RedHat

TIP: Can't access Decision Central? Take a look at the pod log to check if it's still bootstrapping. Once it's finished, give it another try.  If you're running MacOS and face any certificate issues in Chrome, try accessing your MacOS in Firefox.

Congratulations, you've successfully installed Decision Manager in OpenShift. Now, let's import the loan project, build it, and run it! 


3.  Explore 

You have two key components deployed in OpenShift: Decision Central and KIE Server. Decision Central is the component that allows you to develop business rules and decisions, to manage projects, and to build and package them. Finally, you can deploy it in KIE Server, the rules and decision engine.  KIE Server is a lightweight component capable of executing the rules and decisions. It can be easily integrated with your services, for example via REST or JMS.

Authoring with Decision Manager

Let's start by accessing Decision Central (see Figure 10).  Click on Design, create and modify projects and select MySpace.

Figure 10: Decision Manager Business Central dashboard


Click Import Project (see Figure 11).

Figure 11: Import Project


Insert the following repository URL and click Import. Select loan-application (see Figure 12) and click Ok.

Figure 12: Business Central. Select Import Projects.


After the project has been imported, you should see four assets in the assets list.

  • Three Data Models (Recommendation, Loan, and Applicant)
  • A simple decision implemented using DMN (recommendation)
  • And a traditional Guided Decision Table (loan-approval)

Open the loan-approval Decision Table (see Figure 13), and inspect the four rules defined in the table.

Figure 13: Decision Table


The rules control whether the “Loan” gets approved based on the amount of the loan and the credit score of the application. More specifically, when the application gets approved, the approved field of the “Loan” will be set to true.

Close this file, and select the Recommendation Decision Modeling Notation (DMN) file (see Figure 14). The DMN specification is a well-established pattern recognized by the Object Management Group (OMG) and it's platform-agnostic. The DMN file is specially created so that business teams can design decisions in a more intuitive way.

Figure 14: Recommendation Decision Modeling Notation (DMN) file


This DMN file has one input: Credit Score. Based on this Credit Score, the output will be a Recommendation about the loan amount.  Click the Recommendation decision node  as shown in Figure 15, and choose Edit.

Figure 15: Select the Recommendation decision node, then Edit.


You'll see the Decision Table (see Figure 16) responsible for determining the output based on the provided credit score.

Figure 16: Decision Table that determines output


Close your open files. Now that we explored our project rules and decisions, let's build and deploy the project. 

Deploying the rules

We're now working with a traditional Maven project. We need to build and package it into a Knowledge Java Archive (Kjar), the Decision Deployment Unit which contains the model and rules. Once packaged, this application can be deployed in the engine. Luckily, Decision Central as shown in Figure 17, can help us with this task. 

Click Deploy to build and deploy the project on the execution server that is running in another OpenShift pod:

Figure 17: Loan application deployment


Once the build and deployment have finished, you'll see, as shown in Figure 18, a successful deployment message. Click View deployment details.

Figure 18: A successful deployment message


The page will show a running “default-kie-server” with the “loan_application_1.2.0” container deployed (see Figure 19).

Our project is now available to be consumed by client applications! Let's have a look at how we can consume this decision service.

3. Explore

The KIE Server comes with a Swagger user interface (UI) that allows us to test the RESTful endpoints of the engine and consume rules deployed on it. Let's use this UI to test our rules.

Let's start by checking the deployed projects for this KIE Server: In your OpenShift console, open the Routes option under Networking. Locate the rhdm-trial-kieserver-http route, and open the URL in a new tab.

Access the KIE Server Swagger UI by adding "/docs" in your URL. Your credentials are: 

Verify that the rules have been correctly deployed on the KIE Server by navigating to "KIE Server and KIE containers",  and locate the "GET" "/server/containers" option (see Figure 21). 

Click Try it out.

Figure 21: Navigate to KIE Server and KIE containers. locate the right option, and select Try it out


Leave the parameters empty and select Execute. If asked, use these credentials:

  • User: adminUser
  • Password: RedHat 

The page that looks like Figure 22 will show a response with Success code "200" and a response body that lists the container id "loan-application_1.2.0" container.

Figure 22: Success code 200 and the container id loan-application


Consuming business rules

Now, let's use the REST API to consume our rules implemented with Guided Decision Tables.

To send a request to the Decision Service, navigate to KIE session assets as seen in Figure 23, and search for POST "/server/containers/instances/{containerId}. 

Figure 23: KIE session assets


Click Try it out and fill the request parameters:

  • "Parameter content-type" and "Response content type" to “application/json”;
  • "containerId" to "loan-application_1.2.0" (the ID of the KIE container);
  • In the "body", insert the following:

"lookup" : "default-stateless-ksession",







"name":"Jim Whitehurst"

























Click Execute (see Figure 24).

Figure 24: KIE Sessions window with parameters


The page will show a response with code 200 and a response body that lists the result of the rule execution. Especially, the “Loan” object’s Approved field should now read as True, and the "reason" should bring the message in Figure 25: Congratulation your loan is approved,  which is the outcome of the rule evaluation.

Figure 25: Page response


Consuming decisions

Now that we tested our business rule, let's try out our decision implemented with DMN. In order to do that, we'll use the decision engine REST API. In the KIE Server Swagger UI, navigate to DMN Assets as shown in Figure 26 and locate POST /server/containers/{containerId}/dmn.

Figure 26: DMN Assets in the KIE Server Swagger UI.


Click Try it out, and fill in these parameters:

  • ContainerID: loan-application_1.2.0
  • Change the Parameter content type and the Response content type to application/json.
  • Body:

"model-namespace" : "",

"model-name" : "recommendation",

"decision-name" : [ ],

"decision-id" : [ ],

"dmn-context" : {"Credit Score": 100}


Notice we are sending a "Credit Score" value of 100. Based on this input, the engine will make a Decision and give us the output. Click Execute and observe the output (see Figure 27). 

Figure 27: Click Execute and observe the output


In the body, change the Credit Score to 400, click Execute, and check the execution result.


This concludes our Hello World. We installed Red Hat Decision Manager in OpenShift using the Business Automation Operator. We also imported a project directly from GitHub, we checked Guided Decision Tables and DMN, two of the many possible ways of implementing business logic, and we ended our Hello World by deploying and testing our services. 

Last updated: June 17, 2021