Boston JUG
Zero to Hero with JBoss Business Rules

January 30, 2014
Eric D. Schabell
JBoss Technology Evangelist

1
Agenda

●

The Basics
–

●

what is a BRMS, CEP,
BPMS?

The Concepts
–

what is inference?

–

what is a rule?

–

how does engine work?

●

●

2

Demo
Questions
What is a BRMS?

3
The BRMS Solution
FINANCIAL SERVICES
COMPANY

Product
Request

4
Example
FINANCIAL SERVICES
COMPANY

Product
Request

5

Problems:
1. Business rules are hidden
in applications
Example
FINANCIAL SERVICES
COMPANY

Product
Request

6

Problems:
1. Business rules are hidden
in applications
2. It takes too long to
change business rules
Example
FINANCIAL SERVICES
COMPANY

Product
Request

Problems:
1. Business rules are hidden
in applications
2. It takes too long to
change business rules
3. People interpret rules
inconsistently

7
The BRMS Solution

1. Separate the business rules
from the applications
Rule
Repository

8
The BRMS Solution

1. Separate the business rules
from the applications
AHA!

9

Rule
Repository

2. Express rules in terms that
the
business can readily
understand - visibility
The BRMS Solution

1. Separate the business rules
from the applications
AHA!

Rule
Repository

2. Express rules in terms that
the business can readily
understand - visibility
3. Empower business and IT
experts to collaborate agility

10
The BRMS Solution

1. Separate the business rules
from the applications
AHA!

Rule
Repository

2. Express rules in terms that
the business can readily
understand - visibility
3. Empower business and IT
experts to collaborate agility
4. Support all the rules consistency

11
What is CEP?

12
Example: Multiple Customer Touch Points

Problems:
Hard to derive business relevant
data from available information
Important patterns go undetected
Business fails to respond to
changes in its environment

13
Complex Event Processing
Detect events of significance to a business by recognizing time-based patterns in
one or more real-time data feeds...

Business Rules

“Weather delay in London”

14
What is a BPMS?

15
A Business Process
An activity or set of activities that will accomplish a specific organizational goal...

Shipping

Catalog

Financials

Inventory

Orders

16

Packaged Apps
(e.g. SAP)
The BPMS Solution

Catalog

Shipping

1. Automate interactions with LoB Systems...

17

Packaged Apps
The BPMS Solution

Catalog

Shipping

1. Automate interactions with LoB Systems...
2. Drive the business process from a model...

18

Packaged Apps
The BPMS Solution

Catalog

Shipping

1. Automate interactions with LoB Systems...
2. Drive the business process from a model...

3. Manage user
participation...

19

Packaged Apps
The BPMS Solution

Catalog

Shipping

Packaged Apps

1. Automate interactions with LoB Systems...
2. Drive the business process from a model...

3. Manage user
participation...

20

4. Provide visibility
into process
execution data
The Concepts

21
JBoss BRMS
What is inferencing?
●

22

We want to take all of our data (facts) and combine it with our
knowledge (rules) and come up with some conclusions
(inferencing)
JBoss BRMS
What is inferencing?
●

23

We want to take all of our data (facts) and combine it with our
knowledge (rules) and come up with some conclusions
(inferencing)
JBoss BRMS
What is inferencing?
●

24

We want to take all of our data (facts) and combine it with our
knowledge (rules) and come up with some conclusions
(inferencing)
JBoss BRMS
What is inferencing?
●

25

We want to take all of our data (facts) and combine it with our
knowledge (rules) and come up with some conclusions
(inferencing)
JBoss BRMS
What is inferencing?
●

26

We want to take all of our data (facts) and combine it with our
knowledge (rules) and come up with some conclusions
(inferencing)
JBoss BRMS
What is a rule?

●

●

●

●

27

In short, a rule is an premise and conclusion
– If it is raining, then the ground must be wet
A rule is made of conditions and actions. When all the
conditions are met, a rule may “fire”.
The conditions are collectively referred to as the LHS (left
hand side) and the actions are referred to as the RHS (right
hand side, or consequence).
A rule operates on facts (data). In our case, these facts are
instances of objects in our application.
JBoss BRMS
Inference Engine
●

●
●

28

The brain of a Production Rule System is an Inference Engine
which matches facts against Production Rules.
When matches are found, the rules actions are fired.
Actions most often change the state of the facts, or perform
some external action on the application.
Conceptual example

Knowledge
Base

Rule package
(artifacts)

29

Stateless
Knowledge
Session

Agenda
Example: real BPM

Knowledge
Base

Process
Definition

30

Stateful
Knowledge
Session

Process
Instance
JBoss BRMS
How it Works

Agenda
Rule
Rule
Rule
Rule
Rule

Activation

1.Parse DRL

RuleBase

Activation

2. Create

3. Assert Facts

Rule

Fact
Fact

WorkingMemory
Fact
Fact
Fact
Fact
Fact

4.
Fi
re

A

ll
R

ul

es

Fact
Fact
Fact
Fact
Fact

Fact

Rule

31

(5) activation
Rule
-> consequence
Rule
Rule
Rule
Rule
The Architecture

32
JBoss BRMS Vs BPM Suite
Target:
Process Automation
Service Enabled Orchestration
Intelligent Business Operations

JBoss BPM Suite 6.0

JBoss BRMS 6.0

33

Target - Realtime Decision Management

JBoss BRMS 6.0
JBoss BRMS - Components

34
JBoss BPM Suite – Components

35
36
Components
Real-time data &
event feeds

Authoring tools
for business
users
Repository

Business
analysts

Event
processor

Business
rule
definitions

Rules
engine

Authoring tools
for developers

Developers

37

Business
data

Client
applications
New in 6.0
Real-time data &
event feeds

Authoring tools
for business
users
Repository

Business
analysts

Event
processor

UberFire

Business
rule
definitions

Client
applications

Rules
engine

Authoring tools
for developers
Drools 6.0

Developers

38

Technology Preview

Business
data
BRMS Components
Business Events

Authoring Tools
for Business
Users

Enterprise
Applications
Repository

Business
Analysts

Event
Processor
Business
Process
Manager

Business
Rule
Definitions

Web Services

Rule
Engine

Java

Business
Data

Business
Users

Authoring Tools
for Developers

Developers
Business
Central
Operations

39
BRMS Components
Business Events

Authoring Tools
for Business
Users

Enterprise
Applications
Repository

Business
Analysts

Event
Processor
Business
Process
Manager

Business
Rule
Definitions

Web Services

Rule
Engine

Java

Business
Data

Business
Users

Authoring Tools
for Developers

Developers
Business
Central
Operations

40
BRMS Components
Business Events

Authoring Tools
for Business
Users

Enterprise
Applications
Repository

Business
Analysts

Event
Processor
Business
Process
Manager

Business
Rule
Definitions

Web Services

Rule
Engine

Java

Business
Data

Business
Users

Authoring Tools
for Developers

Developers
Business
Central
Operations

41
42
Components
Business Events
Authoring tools
for business
users

Enterprise
Applications
Repository

Event
processor

Business
rule
definitions

Business
analysts

Business
Process
Manager

Rules
engine

Web Services

Java

Authoring tools
for developers

Developers

Business
data
BAM
Business
users

43

Business
users
New in 6.0
Business Events

Authoring Tools
for Business
Users

Enterprise
Applications
Repository

Business
Analysts

Event
Processor
Business
Process
Manager

Business
Logic
Definitions

Data Modeler
Forms Designer

Web Services
jBPM 6.0

Rule
Engine

Java

Business
Data

Business
Users

Authoring Tools
for Developers

Developers
Business
Central
Business
Operations/
Analysts

44
Business Resource
Optimizer

45
Core Services: Business Resource Optimizer (TP)

46
Core Services: Business Resource Optimizer (TP)

47
Demo

48
Questions?

Eric D. Schabell
JBoss Technology Evangelist (Integration & BPM)
@ericschabell / erics@redhat.com
49
`



JBoss BRMS & BPM Suite Articles:






http://schabell.org/search/label/BRMS
http://schabell.org/search/label/BPMS

JBoss BPM Suite Demos:




http://www.schabell.org/2013/11/jboss-bpm-suite-automated-lending-generic-loan-demo.html



http://www.schabell.org/2013/12/bpms-examining-migrated-customer-evaluation-demo.html



https://github.com/eschabell/business-resource-optimizer-demo





http://www.schabell.org/2013/10/jboss-bpm-suite-rocking-the-mortgage-demo.html

https://github.com/eschabell/bpms-customer-evaluation-demo (migration from BRMS 5.3)

JBoss xPaaS Demos:




50

https://github.com/eschabell/bpms-bam-dashboard
https://github.com/eschabell/openshift-bpm-bam-dashboard

Zero to Hero with the JBoss Business Rules Primer

  • 1.
    Boston JUG Zero toHero with JBoss Business Rules January 30, 2014 Eric D. Schabell JBoss Technology Evangelist 1
  • 2.
    Agenda ● The Basics – ● what isa BRMS, CEP, BPMS? The Concepts – what is inference? – what is a rule? – how does engine work? ● ● 2 Demo Questions
  • 3.
    What is aBRMS? 3
  • 4.
    The BRMS Solution FINANCIALSERVICES COMPANY Product Request 4
  • 5.
  • 6.
    Example FINANCIAL SERVICES COMPANY Product Request 6 Problems: 1. Businessrules are hidden in applications 2. It takes too long to change business rules
  • 7.
    Example FINANCIAL SERVICES COMPANY Product Request Problems: 1. Businessrules are hidden in applications 2. It takes too long to change business rules 3. People interpret rules inconsistently 7
  • 8.
    The BRMS Solution 1.Separate the business rules from the applications Rule Repository 8
  • 9.
    The BRMS Solution 1.Separate the business rules from the applications AHA! 9 Rule Repository 2. Express rules in terms that the business can readily understand - visibility
  • 10.
    The BRMS Solution 1.Separate the business rules from the applications AHA! Rule Repository 2. Express rules in terms that the business can readily understand - visibility 3. Empower business and IT experts to collaborate agility 10
  • 11.
    The BRMS Solution 1.Separate the business rules from the applications AHA! Rule Repository 2. Express rules in terms that the business can readily understand - visibility 3. Empower business and IT experts to collaborate agility 4. Support all the rules consistency 11
  • 12.
  • 13.
    Example: Multiple CustomerTouch Points Problems: Hard to derive business relevant data from available information Important patterns go undetected Business fails to respond to changes in its environment 13
  • 14.
    Complex Event Processing Detectevents of significance to a business by recognizing time-based patterns in one or more real-time data feeds... Business Rules “Weather delay in London” 14
  • 15.
    What is aBPMS? 15
  • 16.
    A Business Process Anactivity or set of activities that will accomplish a specific organizational goal... Shipping Catalog Financials Inventory Orders 16 Packaged Apps (e.g. SAP)
  • 17.
    The BPMS Solution Catalog Shipping 1.Automate interactions with LoB Systems... 17 Packaged Apps
  • 18.
    The BPMS Solution Catalog Shipping 1.Automate interactions with LoB Systems... 2. Drive the business process from a model... 18 Packaged Apps
  • 19.
    The BPMS Solution Catalog Shipping 1.Automate interactions with LoB Systems... 2. Drive the business process from a model... 3. Manage user participation... 19 Packaged Apps
  • 20.
    The BPMS Solution Catalog Shipping PackagedApps 1. Automate interactions with LoB Systems... 2. Drive the business process from a model... 3. Manage user participation... 20 4. Provide visibility into process execution data
  • 21.
  • 22.
    JBoss BRMS What isinferencing? ● 22 We want to take all of our data (facts) and combine it with our knowledge (rules) and come up with some conclusions (inferencing)
  • 23.
    JBoss BRMS What isinferencing? ● 23 We want to take all of our data (facts) and combine it with our knowledge (rules) and come up with some conclusions (inferencing)
  • 24.
    JBoss BRMS What isinferencing? ● 24 We want to take all of our data (facts) and combine it with our knowledge (rules) and come up with some conclusions (inferencing)
  • 25.
    JBoss BRMS What isinferencing? ● 25 We want to take all of our data (facts) and combine it with our knowledge (rules) and come up with some conclusions (inferencing)
  • 26.
    JBoss BRMS What isinferencing? ● 26 We want to take all of our data (facts) and combine it with our knowledge (rules) and come up with some conclusions (inferencing)
  • 27.
    JBoss BRMS What isa rule? ● ● ● ● 27 In short, a rule is an premise and conclusion – If it is raining, then the ground must be wet A rule is made of conditions and actions. When all the conditions are met, a rule may “fire”. The conditions are collectively referred to as the LHS (left hand side) and the actions are referred to as the RHS (right hand side, or consequence). A rule operates on facts (data). In our case, these facts are instances of objects in our application.
  • 28.
    JBoss BRMS Inference Engine ● ● ● 28 Thebrain of a Production Rule System is an Inference Engine which matches facts against Production Rules. When matches are found, the rules actions are fired. Actions most often change the state of the facts, or perform some external action on the application.
  • 29.
  • 30.
  • 31.
    JBoss BRMS How itWorks Agenda Rule Rule Rule Rule Rule Activation 1.Parse DRL RuleBase Activation 2. Create 3. Assert Facts Rule Fact Fact WorkingMemory Fact Fact Fact Fact Fact 4. Fi re A ll R ul es Fact Fact Fact Fact Fact Fact Rule 31 (5) activation Rule -> consequence Rule Rule Rule Rule
  • 32.
  • 33.
    JBoss BRMS VsBPM Suite Target: Process Automation Service Enabled Orchestration Intelligent Business Operations JBoss BPM Suite 6.0 JBoss BRMS 6.0 33 Target - Realtime Decision Management JBoss BRMS 6.0
  • 34.
    JBoss BRMS -Components 34
  • 35.
    JBoss BPM Suite– Components 35
  • 36.
  • 37.
    Components Real-time data & eventfeeds Authoring tools for business users Repository Business analysts Event processor Business rule definitions Rules engine Authoring tools for developers Developers 37 Business data Client applications
  • 38.
    New in 6.0 Real-timedata & event feeds Authoring tools for business users Repository Business analysts Event processor UberFire Business rule definitions Client applications Rules engine Authoring tools for developers Drools 6.0 Developers 38 Technology Preview Business data
  • 39.
    BRMS Components Business Events AuthoringTools for Business Users Enterprise Applications Repository Business Analysts Event Processor Business Process Manager Business Rule Definitions Web Services Rule Engine Java Business Data Business Users Authoring Tools for Developers Developers Business Central Operations 39
  • 40.
    BRMS Components Business Events AuthoringTools for Business Users Enterprise Applications Repository Business Analysts Event Processor Business Process Manager Business Rule Definitions Web Services Rule Engine Java Business Data Business Users Authoring Tools for Developers Developers Business Central Operations 40
  • 41.
    BRMS Components Business Events AuthoringTools for Business Users Enterprise Applications Repository Business Analysts Event Processor Business Process Manager Business Rule Definitions Web Services Rule Engine Java Business Data Business Users Authoring Tools for Developers Developers Business Central Operations 41
  • 42.
  • 43.
    Components Business Events Authoring tools forbusiness users Enterprise Applications Repository Event processor Business rule definitions Business analysts Business Process Manager Rules engine Web Services Java Authoring tools for developers Developers Business data BAM Business users 43 Business users
  • 44.
    New in 6.0 BusinessEvents Authoring Tools for Business Users Enterprise Applications Repository Business Analysts Event Processor Business Process Manager Business Logic Definitions Data Modeler Forms Designer Web Services jBPM 6.0 Rule Engine Java Business Data Business Users Authoring Tools for Developers Developers Business Central Business Operations/ Analysts 44
  • 45.
  • 46.
    Core Services: BusinessResource Optimizer (TP) 46
  • 47.
    Core Services: BusinessResource Optimizer (TP) 47
  • 48.
  • 49.
    Questions? Eric D. Schabell JBossTechnology Evangelist (Integration & BPM) @ericschabell / erics@redhat.com 49
  • 50.
    `  JBoss BRMS &BPM Suite Articles:    http://schabell.org/search/label/BRMS http://schabell.org/search/label/BPMS JBoss BPM Suite Demos:   http://www.schabell.org/2013/11/jboss-bpm-suite-automated-lending-generic-loan-demo.html  http://www.schabell.org/2013/12/bpms-examining-migrated-customer-evaluation-demo.html  https://github.com/eschabell/business-resource-optimizer-demo   http://www.schabell.org/2013/10/jboss-bpm-suite-rocking-the-mortgage-demo.html https://github.com/eschabell/bpms-customer-evaluation-demo (migration from BRMS 5.3) JBoss xPaaS Demos:   50 https://github.com/eschabell/bpms-bam-dashboard https://github.com/eschabell/openshift-bpm-bam-dashboard

Editor's Notes

  • #2 <number>
  • #4 <number>
  • #5 <number>
  • #6 <number>
  • #7 <number>
  • #8 <number>
  • #9 <number>
  • #10 <number>
  • #11 <number>
  • #12 <number>
  • #13 <number>
  • #14 <number>
  • #15 <number>
  • #16 <number>
  • #17 <number>
  • #18 <number>
  • #19 <number>
  • #20 <number>
  • #21 <number>
  • #22 <number>
  • #33 <number>
  • #34 JBoss Enteprise BRMS (new in 2009) Enables critical business rules to be managed in a more centralized manner (e.g. Insurance = policy risk assess and pricing; Heathcare = claims processing annual regulatory changes) Avoids need to otherwise re-code business rules redundantly in multiple applications Leverages JBoss Rules execution engine which has been available for years Adds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changes Also adds Repository to provide version management of multiple sets of business rules Supports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments
  • #35 JBoss Enteprise BRMS (new in 2009) Enables critical business rules to be managed in a more centralized manner (e.g. Insurance = policy risk assess and pricing; Heathcare = claims processing annual regulatory changes) Avoids need to otherwise re-code business rules redundantly in multiple applications Leverages JBoss Rules execution engine which has been available for years Adds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changes Also adds Repository to provide version management of multiple sets of business rules Supports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments
  • #36 JBoss Enteprise BRMS (new in 2009) Enables critical business rules to be managed in a more centralized manner (e.g. Insurance = policy risk assess and pricing; Heathcare = claims processing annual regulatory changes) Avoids need to otherwise re-code business rules redundantly in multiple applications Leverages JBoss Rules execution engine which has been available for years Adds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changes Also adds Repository to provide version management of multiple sets of business rules Supports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments
  • #37 <number>
  • #38 <number> BRMS SUITE 6 NO jBPM better ui better control versioning + branching drools new version 6.0 – new rule algorithm, faster and more efficient, better use of memory, scalability optaplanner
  • #39 <number> BRMS SUITE 6 NO jBPM better ui better control versioning + branching drools new version 6.0 – new rule algorithm, faster and more efficient, better use of memory, scalability optaplanner
  • #40 <number>
  • #41 <number>
  • #42 <number>
  • #43 <number>
  • #44 <number> BRMS SUITE 6 NO jBPM better ui better control versioning + branching drools new version 6.0 – new rule algorithm, faster and more efficient, better use of memory, scalability optaplanner
  • #46 <number>
  • #47 JBoss Enteprise BRMS (new in 2009) Enables critical business rules to be managed in a more centralized manner (e.g. Insurance = policy risk assess and pricing; Heathcare = claims processing annual regulatory changes) Avoids need to otherwise re-code business rules redundantly in multiple applications Leverages JBoss Rules execution engine which has been available for years Adds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changes Also adds Repository to provide version management of multiple sets of business rules Supports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments
  • #48 JBoss Enteprise BRMS (new in 2009) Enables critical business rules to be managed in a more centralized manner (e.g. Insurance = policy risk assess and pricing; Heathcare = claims processing annual regulatory changes) Avoids need to otherwise re-code business rules redundantly in multiple applications Leverages JBoss Rules execution engine which has been available for years Adds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changes Also adds Repository to provide version management of multiple sets of business rules Supports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments
  • #49 <number>
  • #50 <number>