Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik...
Transcript of Java Rules Engine - Jazoon · Java Rules Engine Drools & iLog Raed Haltam Architect wega Informatik...
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Mini Loan App ndash iLog get started
Raed Haltam wwwwega- informatikch
wega Informatik AG raedhaltamwega-informatikch
Raed Haltam wwwwega- informatikch
wega Informatik AG raedhaltamwega-informatikch