Git Product home page Git Product logo

nelvadas / brms-loan-realtime-decision-server-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbossdemocentral/brms-loan-realtime-decision-server-demo

0.0 3.0 0.0 19.03 MB

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.

PowerShell 55.20% Shell 39.71% Visual Basic 5.09%

brms-loan-realtime-decision-server-demo's Introduction

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 Docker.

Software

The following software is required to run this demo:

Option 1 - Install on your machine

  1. Download and unzip.

  2. Add products to installs directory.

  3. Run 'init.sh' or 'init.ps1' file.

  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:brmsAdmin / 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. Click on "Open Project Editor", and in the project editor click on "Build -> Build and Deploy".

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

  9. Open "Execution Servers" perspective via menu Deploy -> Execution Servers

  10. The view shows one registered Decision Server 'local-server-123'. We will provision a container on this server which will serve our loandemo rules project. Click on the '+' sign on the right of the Decision Server and enter the following details in the pop-up:

  • Name: container-loan1.0

  • search button gathers all artifacts available, SELECT loandemo-1.0 to auto-fill rest of fields (group name, artifact id and version)

  • click on OK

  1. The container definition is created, but is not yet started. Click on the "Start" button to start the container instance on the Decision Server.

  2. Click on the container to show additional information about the container.

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

  1. You can view some more information provided by the RESTful API using GET methods:
  1. A full description of all available RESTful resources and operations exposed by the Decision Server can be found by opening this URL: http://localhost:8080/kie-server/docs

  2. Now to use POST or PUT methods we need to add a header to RESTClient for our requests:

  • in menu Headers -> Custom Header

  • Name: Accept; Value: application/xml

  • Name: Content-Type; Value: application/xml

  • Name: X-KIE-ContentType; Value: xstream

  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 Version Configuration tab of the container definition 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 RESTful API, you need to use PUT methods, see product documentation User Guide for details.

Option 2 - Run in Docker

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. Run the 'init-docker.sh' or 'init-docker.ps1' file.

  4. Start the container: docker run -it -p 8080:8080 -p 9990:9990 jbossdemocentral/brms-realtime-decicion-server-demo

  5. 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.4 JBoss BRMS 6.4.0.GA on JBoss EAP 7.0.0.GA with demo rule project to deploy as Realtime Decision Server.

  • v1.3 JBoss BRMS 6.2.0-BZ-1299002 on JBoss EAP 6.4.4 with demo rule project to deploy as Realtime Decision Server.

  • v1.2 JBoss BRMS 6.2.0, JBoss EAP 6.4.4 and demo rule project to deploy as Realtime Decision Server.

  • 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

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

brms-loan-realtime-decision-server-demo's People

Contributors

dantheman720 avatar ddoyle-redhat avatar duncandoyle avatar eschabell avatar sabre1041 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.