mry / brms-loan-realtime-decision-server-demo

This JBoss BRMS demo project will provide you with an example of creating, deploying and leveraging a set of rules (decision table) in a Realtime Decision Server. You will be given examples of calling the rules as if using it from an application with the RestAPI that is exposed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JBoss BRMS Loan Realtime Decision Server Demo

This demo project will provide you with an example of creating, deploying and leveraging a set of rules (decision table) in a Realtime Decision Server. You will be given examples of calling the rules as if using it from an application with the RestAPI that is exposed.

There are two options for you to install this project; local and containerized.

Option 1 - Install on your machine

  1. Download and unzip.

  2. Add products to installs directory.

  3. Run 'init.sh' or 'init.bat' file. 'init.bat' must be run with Administrative privileges.

  4. Start JBoss BRMS Server by running ./target/jboss-eap-6.4/bin/standalone.sh

  5. Login to http://localhost:8080/business-central

    - login for admin and analyst roles (u:erics / p:jbossbrms1!)
    
  6. Project has simple data model (Loan & Applicant) and single decision table credit score rule set.

  7. Build and deploy version 1.0 of project.

  8. View Authoring -> Artifact repository to see deployed loandemo-1.0.jar artifact.

  9. Open rule deployments perspective via menu Deploy -> Rules Deployments

  10. Register a new server by filling in pop-up:

  1. Provision starts by creating a Container, click on DevServer '+' on right.
  • Name: container-loan1.0

  • search button gathers all artifacts available, SELECT loandemo-1.0 to auto-fill rest of fields

  • click on OK

  1. Container is created, click on icon far right to view details.

  2. Select container-loan1.0 and click START to get it up and running, was orange color next to name, should turn green.

  3. See 'Resolved Release Id' section for the container and version that is running and ready for rule queries.

  4. Using Firefox + RESTClient you can see which server containers are available by:

  1. You can view some more information provided by the RestAPI using GET methods:
  1. Now to use POST or PUT methods we need to add a header to RESTClient for our requests:
  • in menu Headers -> Custom Header

  • Name: Content-Type

  • Value: application/xml

  1. Query the Realtime Decision Server with loan rules by using POST method:
  1. You can change the decision table as desired, redeploy a new version, use the Server Management Browser to manage the container using UPGRADE button to pull the latest version.
  • you need to deploy a new version of the rules, for example version 1.1, then enter 1.1 in version field of container-loan1.0 before hitting UPGRADE button.
  1. For creation or deletion of containers in the RestAPI, you need to use PUT methods, see product documentation User Guide for details.

Option 2 - Generate containerized install

The following steps can be used to configure and run the demo in a container

  1. Download and unzip.

  2. Add product installer to installs directory.

  3. Copy contents of support/docker directory to the project root.

  4. Build demo image.

    docker build -t jbossdemocentral/brms-realtime-decicion-server-demo .
    
  5. Start demo container.

    docker run -it -p 8080:8080 -p 9990:9990 jbossdemocentral/brms-realtime-decicion-server-demo
    
  6. Follow instructions from above starting at step 5 replacing localhost with <RH_CONTAINER_HOST> when applicable

Additional information can be found in the jbossdemocentral container developer repository

Notes

You will need some sort of Rest client, such as the RESTClient Firefox extension which is used in this demo (screenshots and videos). After installing RESTClient in Firefox, restart and open it under TOOLS menu.

Supporting Articles

Released versions

See the tagged releases for the following versions of the product:

  • v1.1 JBoss BRMS 6.1 with demo rule project to deploy as Realtime Decision Server and Red Hat Container install option.

  • v1.0 JBoss BRMS 6.1 with demo rule project to deploy as Realtime Decision Server

Digital Sign

Loan Project

Artifact Repo

Deployment View

Kie Server Endpoint

Register Server

Dev Server

Create Container

Container Details

Start Container

Started Container

Restapi Auth

Restapi Containers

Restapi Loan Container

Restapi Request Header

Restapi Loan Request

Restapi Loan Request Response

About

This JBoss BRMS demo project will provide you with an example of creating, deploying and leveraging a set of rules (decision table) in a Realtime Decision Server. You will be given examples of calling the rules as if using it from an application with the RestAPI that is exposed.


Languages

Language:Shell 43.4%Language:Batchfile 42.7%Language:Visual Basic 14.0%