26
Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340

Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Java Rules EngineDrools amp iLog

Raed Haltam

Architect

wega Informatik

7340

AGENDA

gt Mot ivat ion

gt What is Rules Engine and BRMS

ndash (Business Rules Management Systems)

gt Marketplace (Rules Engine Providers)

gt JBoss Drools and iLog Side- by- Side

gt Rules Engine and SOA

gt Rules Engine and CEP (Complex Event Processing)

gt Two Projects I implemented using Rules Enginendash Car Leasing Loan Origination at JPMorgan Chase (Using iLog)

ndash Shipment Routing at Union Pacif ic Railroad (CLIPS)

2

Techi Speak ndash Technical Context

bull Business Rules Engine (BRE) bull Inference Engine (IE)bull Reasoning Engines (RE) bull Expert Systems (ES)bull Artif icial Intelligence (AI)

bull headache producing engine (HPE)

3

What I Want To Do is

Sell a rental upgrade w ith a ticket to blue m an bull (because I ju st got them at a very discounted price)

Forw ard Joersquos w orkflow item s to a review er team (Joe m isunderstood the gu idelines)

O il tanker accident in Alaska shygt sell stocks of O ilshycom panies based in Alaska

Reroute all tom atoes shipm ents to New O rleans (They are party ing there w ith tom atoes throwing contest)

Sales Cam paign

W orkflow

Stock Trading

Supply Chain

hellip Please

bull I w ant these changes online tom orrow m orning

bull Not again all these people developers QA PM deployment administrators and and

Solution hellip SVP

For Exam p le

Rules Engine

Many More hellip Rule EnginesLots of im plem entations Vendors O pen Source Research Java etc

ILOG http wwwilogcomHaley Systemshttp haleycomBlaze Advisorhttp wwwfairisaaccom ficx Jesshttp wwwjessrulescom jessPegaRuleshttp wwwpegacomVersatahttp wwwversatacomInRule Technologyhttp wwwinrulecomBizTalk (Microsoft)http wwwmicrosoftcom biztalk Gensym Corporationhttp wwwgensymcomArtemis Alliance Inchttp wwwartemisalliancecomNxBREhttp nxbreorg

Drools JBosshttp wwwjbossorg droolsWitmatehttp witmatecomSimple Rule Enginehttp sourceforgenet projects sdsreIdiom Business rules enginehttp wwwidiomsoftwarecomJaxlab Rules Enginehttp wwwjaxlabcom rulesengineQuickRules BRMShttp wwwyasutechcomRuleBursthttp wwwruleburstcomJLisa ndash A Rule Engine for Javahttp j l isasourceforgenetThe Java Business Rules Communityhttp javarulesorgOpenRuleshttp openrulescom Visual Ruleshttp wwwvisual- rulesde

OFBiz Rule Engine MandaraxAlgernonTyRuBaJTP Java Theorem ProverJEOPSInfoSapientRDFExpertJena 2EulerPellet OWL ReasonerProvaSweetRulesJShop2OpenLexiconHammurapi RulesMINS ReasonerZilonisJCHREspermPrologOpenL TabletsJamochTermwareTake

Definition Rules Engine

A business rules engine is a softw are system that helps m anage business rules

The business rules m ay com e from

legal regulation

(An em ployee can be fired for any reason or no reason but not for an illegal reasonldquo)

com pany policy

(All custom ers that buy m ore than $100 at one tim e w ill receive a 10 discount) or other sources

Core Idea Treat business logic as business data

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 2: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

AGENDA

gt Mot ivat ion

gt What is Rules Engine and BRMS

ndash (Business Rules Management Systems)

gt Marketplace (Rules Engine Providers)

gt JBoss Drools and iLog Side- by- Side

gt Rules Engine and SOA

gt Rules Engine and CEP (Complex Event Processing)

gt Two Projects I implemented using Rules Enginendash Car Leasing Loan Origination at JPMorgan Chase (Using iLog)

ndash Shipment Routing at Union Pacif ic Railroad (CLIPS)

2

Techi Speak ndash Technical Context

bull Business Rules Engine (BRE) bull Inference Engine (IE)bull Reasoning Engines (RE) bull Expert Systems (ES)bull Artif icial Intelligence (AI)

bull headache producing engine (HPE)

3

What I Want To Do is

Sell a rental upgrade w ith a ticket to blue m an bull (because I ju st got them at a very discounted price)

Forw ard Joersquos w orkflow item s to a review er team (Joe m isunderstood the gu idelines)

O il tanker accident in Alaska shygt sell stocks of O ilshycom panies based in Alaska

Reroute all tom atoes shipm ents to New O rleans (They are party ing there w ith tom atoes throwing contest)

Sales Cam paign

W orkflow

Stock Trading

Supply Chain

hellip Please

bull I w ant these changes online tom orrow m orning

bull Not again all these people developers QA PM deployment administrators and and

Solution hellip SVP

For Exam p le

Rules Engine

Many More hellip Rule EnginesLots of im plem entations Vendors O pen Source Research Java etc

ILOG http wwwilogcomHaley Systemshttp haleycomBlaze Advisorhttp wwwfairisaaccom ficx Jesshttp wwwjessrulescom jessPegaRuleshttp wwwpegacomVersatahttp wwwversatacomInRule Technologyhttp wwwinrulecomBizTalk (Microsoft)http wwwmicrosoftcom biztalk Gensym Corporationhttp wwwgensymcomArtemis Alliance Inchttp wwwartemisalliancecomNxBREhttp nxbreorg

Drools JBosshttp wwwjbossorg droolsWitmatehttp witmatecomSimple Rule Enginehttp sourceforgenet projects sdsreIdiom Business rules enginehttp wwwidiomsoftwarecomJaxlab Rules Enginehttp wwwjaxlabcom rulesengineQuickRules BRMShttp wwwyasutechcomRuleBursthttp wwwruleburstcomJLisa ndash A Rule Engine for Javahttp j l isasourceforgenetThe Java Business Rules Communityhttp javarulesorgOpenRuleshttp openrulescom Visual Ruleshttp wwwvisual- rulesde

OFBiz Rule Engine MandaraxAlgernonTyRuBaJTP Java Theorem ProverJEOPSInfoSapientRDFExpertJena 2EulerPellet OWL ReasonerProvaSweetRulesJShop2OpenLexiconHammurapi RulesMINS ReasonerZilonisJCHREspermPrologOpenL TabletsJamochTermwareTake

Definition Rules Engine

A business rules engine is a softw are system that helps m anage business rules

The business rules m ay com e from

legal regulation

(An em ployee can be fired for any reason or no reason but not for an illegal reasonldquo)

com pany policy

(All custom ers that buy m ore than $100 at one tim e w ill receive a 10 discount) or other sources

Core Idea Treat business logic as business data

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 3: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Techi Speak ndash Technical Context

bull Business Rules Engine (BRE) bull Inference Engine (IE)bull Reasoning Engines (RE) bull Expert Systems (ES)bull Artif icial Intelligence (AI)

bull headache producing engine (HPE)

3

What I Want To Do is

Sell a rental upgrade w ith a ticket to blue m an bull (because I ju st got them at a very discounted price)

Forw ard Joersquos w orkflow item s to a review er team (Joe m isunderstood the gu idelines)

O il tanker accident in Alaska shygt sell stocks of O ilshycom panies based in Alaska

Reroute all tom atoes shipm ents to New O rleans (They are party ing there w ith tom atoes throwing contest)

Sales Cam paign

W orkflow

Stock Trading

Supply Chain

hellip Please

bull I w ant these changes online tom orrow m orning

bull Not again all these people developers QA PM deployment administrators and and

Solution hellip SVP

For Exam p le

Rules Engine

Many More hellip Rule EnginesLots of im plem entations Vendors O pen Source Research Java etc

ILOG http wwwilogcomHaley Systemshttp haleycomBlaze Advisorhttp wwwfairisaaccom ficx Jesshttp wwwjessrulescom jessPegaRuleshttp wwwpegacomVersatahttp wwwversatacomInRule Technologyhttp wwwinrulecomBizTalk (Microsoft)http wwwmicrosoftcom biztalk Gensym Corporationhttp wwwgensymcomArtemis Alliance Inchttp wwwartemisalliancecomNxBREhttp nxbreorg

Drools JBosshttp wwwjbossorg droolsWitmatehttp witmatecomSimple Rule Enginehttp sourceforgenet projects sdsreIdiom Business rules enginehttp wwwidiomsoftwarecomJaxlab Rules Enginehttp wwwjaxlabcom rulesengineQuickRules BRMShttp wwwyasutechcomRuleBursthttp wwwruleburstcomJLisa ndash A Rule Engine for Javahttp j l isasourceforgenetThe Java Business Rules Communityhttp javarulesorgOpenRuleshttp openrulescom Visual Ruleshttp wwwvisual- rulesde

OFBiz Rule Engine MandaraxAlgernonTyRuBaJTP Java Theorem ProverJEOPSInfoSapientRDFExpertJena 2EulerPellet OWL ReasonerProvaSweetRulesJShop2OpenLexiconHammurapi RulesMINS ReasonerZilonisJCHREspermPrologOpenL TabletsJamochTermwareTake

Definition Rules Engine

A business rules engine is a softw are system that helps m anage business rules

The business rules m ay com e from

legal regulation

(An em ployee can be fired for any reason or no reason but not for an illegal reasonldquo)

com pany policy

(All custom ers that buy m ore than $100 at one tim e w ill receive a 10 discount) or other sources

Core Idea Treat business logic as business data

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 4: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

What I Want To Do is

Sell a rental upgrade w ith a ticket to blue m an bull (because I ju st got them at a very discounted price)

Forw ard Joersquos w orkflow item s to a review er team (Joe m isunderstood the gu idelines)

O il tanker accident in Alaska shygt sell stocks of O ilshycom panies based in Alaska

Reroute all tom atoes shipm ents to New O rleans (They are party ing there w ith tom atoes throwing contest)

Sales Cam paign

W orkflow

Stock Trading

Supply Chain

hellip Please

bull I w ant these changes online tom orrow m orning

bull Not again all these people developers QA PM deployment administrators and and

Solution hellip SVP

For Exam p le

Rules Engine

Many More hellip Rule EnginesLots of im plem entations Vendors O pen Source Research Java etc

ILOG http wwwilogcomHaley Systemshttp haleycomBlaze Advisorhttp wwwfairisaaccom ficx Jesshttp wwwjessrulescom jessPegaRuleshttp wwwpegacomVersatahttp wwwversatacomInRule Technologyhttp wwwinrulecomBizTalk (Microsoft)http wwwmicrosoftcom biztalk Gensym Corporationhttp wwwgensymcomArtemis Alliance Inchttp wwwartemisalliancecomNxBREhttp nxbreorg

Drools JBosshttp wwwjbossorg droolsWitmatehttp witmatecomSimple Rule Enginehttp sourceforgenet projects sdsreIdiom Business rules enginehttp wwwidiomsoftwarecomJaxlab Rules Enginehttp wwwjaxlabcom rulesengineQuickRules BRMShttp wwwyasutechcomRuleBursthttp wwwruleburstcomJLisa ndash A Rule Engine for Javahttp j l isasourceforgenetThe Java Business Rules Communityhttp javarulesorgOpenRuleshttp openrulescom Visual Ruleshttp wwwvisual- rulesde

OFBiz Rule Engine MandaraxAlgernonTyRuBaJTP Java Theorem ProverJEOPSInfoSapientRDFExpertJena 2EulerPellet OWL ReasonerProvaSweetRulesJShop2OpenLexiconHammurapi RulesMINS ReasonerZilonisJCHREspermPrologOpenL TabletsJamochTermwareTake

Definition Rules Engine

A business rules engine is a softw are system that helps m anage business rules

The business rules m ay com e from

legal regulation

(An em ployee can be fired for any reason or no reason but not for an illegal reasonldquo)

com pany policy

(All custom ers that buy m ore than $100 at one tim e w ill receive a 10 discount) or other sources

Core Idea Treat business logic as business data

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 5: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Solution hellip SVP

For Exam p le

Rules Engine

Many More hellip Rule EnginesLots of im plem entations Vendors O pen Source Research Java etc

ILOG http wwwilogcomHaley Systemshttp haleycomBlaze Advisorhttp wwwfairisaaccom ficx Jesshttp wwwjessrulescom jessPegaRuleshttp wwwpegacomVersatahttp wwwversatacomInRule Technologyhttp wwwinrulecomBizTalk (Microsoft)http wwwmicrosoftcom biztalk Gensym Corporationhttp wwwgensymcomArtemis Alliance Inchttp wwwartemisalliancecomNxBREhttp nxbreorg

Drools JBosshttp wwwjbossorg droolsWitmatehttp witmatecomSimple Rule Enginehttp sourceforgenet projects sdsreIdiom Business rules enginehttp wwwidiomsoftwarecomJaxlab Rules Enginehttp wwwjaxlabcom rulesengineQuickRules BRMShttp wwwyasutechcomRuleBursthttp wwwruleburstcomJLisa ndash A Rule Engine for Javahttp j l isasourceforgenetThe Java Business Rules Communityhttp javarulesorgOpenRuleshttp openrulescom Visual Ruleshttp wwwvisual- rulesde

OFBiz Rule Engine MandaraxAlgernonTyRuBaJTP Java Theorem ProverJEOPSInfoSapientRDFExpertJena 2EulerPellet OWL ReasonerProvaSweetRulesJShop2OpenLexiconHammurapi RulesMINS ReasonerZilonisJCHREspermPrologOpenL TabletsJamochTermwareTake

Definition Rules Engine

A business rules engine is a softw are system that helps m anage business rules

The business rules m ay com e from

legal regulation

(An em ployee can be fired for any reason or no reason but not for an illegal reasonldquo)

com pany policy

(All custom ers that buy m ore than $100 at one tim e w ill receive a 10 discount) or other sources

Core Idea Treat business logic as business data

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 6: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Many More hellip Rule EnginesLots of im plem entations Vendors O pen Source Research Java etc

ILOG http wwwilogcomHaley Systemshttp haleycomBlaze Advisorhttp wwwfairisaaccom ficx Jesshttp wwwjessrulescom jessPegaRuleshttp wwwpegacomVersatahttp wwwversatacomInRule Technologyhttp wwwinrulecomBizTalk (Microsoft)http wwwmicrosoftcom biztalk Gensym Corporationhttp wwwgensymcomArtemis Alliance Inchttp wwwartemisalliancecomNxBREhttp nxbreorg

Drools JBosshttp wwwjbossorg droolsWitmatehttp witmatecomSimple Rule Enginehttp sourceforgenet projects sdsreIdiom Business rules enginehttp wwwidiomsoftwarecomJaxlab Rules Enginehttp wwwjaxlabcom rulesengineQuickRules BRMShttp wwwyasutechcomRuleBursthttp wwwruleburstcomJLisa ndash A Rule Engine for Javahttp j l isasourceforgenetThe Java Business Rules Communityhttp javarulesorgOpenRuleshttp openrulescom Visual Ruleshttp wwwvisual- rulesde

OFBiz Rule Engine MandaraxAlgernonTyRuBaJTP Java Theorem ProverJEOPSInfoSapientRDFExpertJena 2EulerPellet OWL ReasonerProvaSweetRulesJShop2OpenLexiconHammurapi RulesMINS ReasonerZilonisJCHREspermPrologOpenL TabletsJamochTermwareTake

Definition Rules Engine

A business rules engine is a softw are system that helps m anage business rules

The business rules m ay com e from

legal regulation

(An em ployee can be fired for any reason or no reason but not for an illegal reasonldquo)

com pany policy

(All custom ers that buy m ore than $100 at one tim e w ill receive a 10 discount) or other sources

Core Idea Treat business logic as business data

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 7: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Definition Rules Engine

A business rules engine is a softw are system that helps m anage business rules

The business rules m ay com e from

legal regulation

(An em ployee can be fired for any reason or no reason but not for an illegal reasonldquo)

com pany policy

(All custom ers that buy m ore than $100 at one tim e w ill receive a 10 discount) or other sources

Core Idea Treat business logic as business data

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 8: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Rules Engine Explained hellipRule Engine provides more than an Engine to execute rules

hellip it stores versions secures etc hellip therefore hellip it is a Business Rules Management System (BRMS)

Contains Rules TextO racle SQ L Server etc

W eblogic JBO SS etc

Java API

W eb Service eclipseW ebshybased

D eveloper

Business M anager(W eb

Application Tibco M sg JM S

ESB)

Trigger

Rules Team Server

Policy Server

Collaborative W eb

Environm ent

Rules Scenario Manager

Testing Environm ent

Business M anager

Rules D eveloper

Rules Engine Rules Editor Scenario Manager

Rules Repository

Business Object Model (BOM)Execution Object Model (XOM)

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 9: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

BOM vs XOM9

BOM = Business Object Model

XOM = Execution Object Model

Account customer shipment order lineitem etc

It is the Runtime representation of BOM

Java Value Object EJB XML DocumentAccount customer shipment order lineitem etc

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 10: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Overview Diagram iLog From Vendor

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 11: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

iLog

Side- by- Side JBoss Drools amp IBM iLog

DroolsAlgorithm RETE RETE

Java Yes Yes

Eclipse Plug- In Yes Yes

BRMS Yes Yes

Web Editor Team Server Guvnor

Test Server Scenario Manager Guvnor

Java XOM (Execution Object Model) Yes YesCustom Business Language

Rule Verbalization Pluggeable Dialects

Rule Templates Yes Yes

Core Capabilit ies

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 12: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Business Rules Format12

when lt conditionsgt then lt actionsgt

when an honest Polit ician exists

then logically assert Hope

when Hope exists

then print Hurrah Democracy Lives

when Hope does not exist

then print Democracy is Doomed

Examples

Most Business Rule Engines (BRE) are based on Charles Forgys Rete algorithm

when accountbalance higher withdraw amount

then dispense cash

ExecutionObject Model

(XOM)

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 13: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Web- based BRMS (Drools)13

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 14: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Web- based BRMS - iLog

Editor

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 15: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Rule set Package BOM and Rule Flow

Rule set 1

Rule set 2

Rule set 3

Rule Package 1 Rule Package 2

Rule set 4

Rule set 5

Rule Flow

Sam ple Rule Flow

Customer

Order

BOM Package 1

Customer EJB

Order XML-Doc

XOM Package 1

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 16: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Advanced Features - 1

Custom Higher Level or Business Language

gt The ability to define higher level (business- specif ic) language

bull JPMorganChase verbiagendash The positive portfolio value under

runs asset provision request

bull Cit ibank verbiagendash Balance request offsets secured

value

bull What is meant ndash Loan request gt account balance

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 17: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Advanced Features - 2Rule Security

gt Rule edit ing can be secured on statement level

Branch Managerndash Can add a new

branch

Customer Account Manager

ndash Can only modify ratio value

Car Loans Program Manager

ndash Can add remove condition

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 18: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

How to Invoke iLog from Java (1) prepare the connection to the Rules Engine

String sessionType = IlrRuleSessionProviderFactorySIMPLE_RULESESSION_PROVIDER

IlrRuleSessionProvider provider = new IlrRuleSessionProviderFactoryBuilder(sessionType)build()

IlrStatelessRuleSession session = providercreateStatelessRuleSession()

(2) prepare a new request String rulesetPath = miniloanruleappminiloanrules

IlrSessionRequest request = new IlrSessionRequest(rulesetPath) requestgetSessionDescriptor()enableTrace()

(3) set the ruleset parameters in the request HashMap map = new HashMap() mapput(loan loan) mapput(borrower borrower) requestgetExecutionSettings()setParameters(map)

(4) execute the rulesession and get the response for this request

IlrSessionResponse response = sessionexecuteRules(request)

(5) transfer the information from the response back to the JSF Bean retrieve output parameter state loan = (Loan) responsegetExecutionResult()getOutputParameters()getObjectValue(loan)

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 19: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

19

Rules Engine and SOA

gt Monitoring of SLAs (Service Level Agreements) ndash Compliance and Non- compliance

gt Enforcement of contract terms by denying business or reward compliance by increasing work order to specif ic provider

gt Business Process Rout ing ndash Decision steps can invoke a web service and let Rules Engine make the decision

More capable than attribute- based routing

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 20: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

20

Rules Engine and CEP

gt CEP = Complex Event Processing

gt Almost all vendors I know have a CEP Engine (IBM TIBCO BEA Oracle Jboss Webmethods etc

gt CEP detects the occurrence of events based on a defined event pat terns by correlat ing events by t ime ex istence and or at t ributes

gt JBoss ut ilizes its Drools Rules Engine to def ine patterns and detect them at runt ime

gt I know TIBCO uses a Rules Engine in CEP Engine

gt One can assume deduct that Oracle Weblogic IBM etc use Rule Engine in their CEP Plat forms

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 21: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

21

Projects I implemented using Rules Engine

gt Autoleasing Loan Originat ion at JPMorganChase ndash Using iLog

gt Shipment rout ing Union Pacif ic Railroad ndash Using (CLIPS)

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 22: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

22

Car Leasing Loan Origination at JPMorgan Chasegt Business Case

minus Banks donrsquot quote or approve loans on Saturdays 60 of cars in US are sold on Saturdays Car dealerships have their own programs Solution is be used by 200 Banks and over 12000 car dealerships

minus Need a quote engine to quote on behalf of banks

gt Solut ionminus iLog Rules Engine 12 Rules Templates 200 Rules Sets EJB Value Objectminus New Rules are entered on 8PM deployed midnight ready for business 8AMminus Wrong quotes

minus JPMorgan Chase will pay difference Penalty for wrong quotes

minus Car Buyers are guarantied minimum 10 f inancing options to choose from

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 23: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

23

Shipment Routing at Union Pacific Railroad

gt Business Case minus ConAgra Foods

minuswants to reduce loss perishable food (fruits fresh dairy etc)minuswants to better supply goods to stores based on demand (Nebraska is running low on Watermelons There lots of melons going to California)

minus Union Pacif ic minuswants to increase their profit and increase use of intermodal (Rail and Truck) minusUnion Pacific wants to respond better to flash floods in Arizona

gt Solut ionminus CLIPS Rules Engine 8 Rules Templates 80+ Rules Sets Value Object XML-

Castorminus Web Frontend provided to ConAgraminus Rules dialect to provide business language

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 24: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

24

Want to Hear More about Rule Engines

gt Google for iLog or JBoss Drools

gt Download iLog and do the Quick Start thingy

gt Talk to me (Raed Haltam) hellip

ndash raedhaltamwega- informatikch

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 25: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Mini Loan App ndash iLog get started

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch

Page 26: Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik 7340. AGENDA > Motivation > What is Rules Engine and BRMS? – (Business Rules

Raed Haltam wwwwega- informatikch

wega Informatik AG raedhaltamwega-informatikch