Skip to content

Execute an IBM ODM Decision Service bundled into your JSE application

License

Notifications You must be signed in to change notification settings

DecisionsDev/decisions-ruleapp-embedded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Execute an IBM ODM Decision Service bundled into your JSE application

Build Status License

Follow us on slack

This Java SE sample illustrates how to execute a decision service bundled in your JSE application with IBM Operational Decision Manager.

It makes use of:

The sample architecture and workflow are as follows:

Sample Architecture and Workflow

  1. The ODM Java Rule session API is invoked to execute the ruleset whose ruleset path is passed as argument (i.e. /test_deployment/loan_validation_with_score_and_grade).
  2. The Rule Session API delegates the ruleset execution to the RES Execution Unit (XU).
  3. The XU fetches the ruleset from the RES memory persistence.
  4. As there is no such ruleset, the RES memory persistence looks up a matching RuleApp packaged in the application's classloader resources.
  5. The RES memory persistence loads the content of the RuleApp archive test-deployment.jar.
  6. The RES memory persistence returns the target ruleset to the XU.
  7. The XU retrieves the Java Execution Object Model (XOM) from the application classloader.
  8. The XU finally executes the ruleset and passes the available output results to the Rule Session API.

Pre-requisites

You'll need IBM Operational Decision Manager, version 8.9.2 or higher.

Defining the ODM 8.9.2 installation directory

To build and run this sample you'll need to set the ibm.odm.install.dir maven property so that it points to the actual location where ODM 8.9.2 is installed.

Building

To build the source code, type the maven command:

mvn clean install -Dibm.odm.install.dir="<ODM_INSTALL_DIR>"

Running

To run the sample, type the following maven command:

mvn exec:java -Dexec.mainClass="j2serulesession.Sample" -Dexec.args="/test_deployment/loan_validation_with_score_and_grade" -Dexec.classpathScope="test" -Dibm.odm.install.dir="<ODM_INSTALL_DIR>"

License

Apache 2.0

Notice

© Copyright IBM Corporation 2018.

Build Status License