Zero to Hero with the JBoss Business Rules Primer

Embed Size (px)

Citation preview

Boston JUGZero to Hero with JBoss Business Rules

January 30, 2014

Eric D. SchabellJBoss Technology Evangelist

Agenda

The Basicswhat is a BRMS, CEP, BPMS?

The Conceptswhat is inference?

what is a rule?

how does engine work?

Demo

Questions

What is a BRMS?

The BRMS Solution

FINANCIAL SERVICES COMPANYProduct Request

FINANCIAL SERVICES COMPANY

Product RequestExample

Problems:1. Business rules are hiddenin applications

FINANCIAL SERVICES COMPANY

Product RequestExample

Problems:1. Business rules are hiddenin applications

2. It takes too long to change business rules

FINANCIAL SERVICES COMPANY

Problems:1. Business rules are hiddenin applications

2. It takes too long to change business rules

3. People interpret rules
inconsistently

Product Request

Example

Rule Repository

The BRMS Solution

1. Separate the business rulesfrom the applications

Rule Repository

AHA!

The BRMS Solution

1. Separate the business rulesfrom the applications

Express rules in terms that the
business can readily understand - visibility

Rule Repository

AHA!

The BRMS Solution

1. Separate the business rulesfrom the applications

Express rules in terms that the business can readily understand - visibility

Empower business and IT experts to collaborate - agility

Rule Repository1. Separate the business rulesfrom the applications

Express rules in terms that the business can readily understand - visibility

Empower business and IT experts to collaborate - agility

4. Support all the rules - consistency

AHA!

The BRMS Solution

What is CEP?

Problems:

Hard to derive business relevant data from available information

Important patterns go undetected

Business fails to respond to changes in its environment

Example: Multiple Customer Touch Points

Complex Event ProcessingDetect events of significance to a business by recognizing time-based patterns in
one or more real-time data feeds...Weather delay in London

Business Rules

What is a BPMS?

A Business Process

Catalog

Orders

Shipping

Financials

Inventory

Packaged Apps (e.g. SAP)

An activity or set of activities that will accomplish a specific organizational goal...

The BPMS SolutionCatalog

Shipping

1. Automate interactions with LoB Systems...

Packaged Apps

Catalog

Shipping

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

Packaged AppsThe BPMS Solution

Catalog

Shipping

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

3. Manage user
participation...

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

4. Provide visibilityinto process
execution data

Packaged Apps

The BPMS Solution

The Concepts

JBoss BRMS
What is inferencing?

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?

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?

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?

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?

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?

In short, a rule is an premise and conclusionIf 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

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

KnowledgeBaseStatelessKnowledgeSessionRule package(artifacts)

Agenda

Example: real BPM

KnowledgeBaseStatefulKnowledgeSessionProcessDefinition

ProcessInstance

AgendaRuleRuleRuleRuleRuleFactFactFactFactFactWorkingMemory3. Assert Facts

RuleBaseFactFactFactFactFactRuleRuleRuleRuleRule

2. Create4. Fire All Rules(5) activation
-> consequence1.Parse DRLActivationRuleFactActivationRuleFactFactJBoss BRMS
How it Works

The Architecture

JBoss BRMS Vs BPM Suite

JBoss BRMS 6.0

JBoss BRMS 6.0JBoss BPM Suite 6.0

Target - Realtime Decision Management

Target:Process AutomationService Enabled OrchestrationIntelligent Business Operations

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 applicationsLeverages JBoss Rules execution engine which has been available for yearsAdds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changesAlso adds Repository to provide version management of multiple sets of business rulesSupports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments

JBoss BRMS - Components

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 applicationsLeverages JBoss Rules execution engine which has been available for yearsAdds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changesAlso adds Repository to provide version management of multiple sets of business rulesSupports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments

JBoss BPM Suite Components

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 applicationsLeverages JBoss Rules execution engine which has been available for yearsAdds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changesAlso adds Repository to provide version management of multiple sets of business rulesSupports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments

Repository

Businessrule definitions

Business data

Client applications

Business analystsDevelopers

Rules engineEvent processor

Real-time data & event feeds

Authoring tools for business users

Authoring tools for developers

Components

BRMS SUITE 6 NO jBPMbetter uibetter control versioning + branchingdrools new version 6.0 new rule algorithm, faster and more efficient, better use of memory, scalabilityoptaplanner

Repository

Businessrule definitions

Business data

Client applications

Business analystsDevelopers

Rules engineEvent processor

Real-time data & event feeds

Authoring tools for business users

Authoring tools for developers

Drools 6.0

UberFire

New in 6.0

Technology Preview

BRMS SUITE 6 NO jBPMbetter uibetter control versioning + branchingdrools new version 6.0 new rule algorithm, faster and more efficient, better use of memory, scalabilityoptaplanner

BRMS ComponentsRepository

BusinessRule Definitions

Business Data

Enterprise Applications

Developers

Business ProcessManagerRule EngineEvent ProcessorBusiness Users

Web Services

Java

Business Events

Authoring Tools for Business Users

Authoring Tools for Developers

Operations

Business Central

Business Analysts

BRMS ComponentsRepository

BusinessRule Definitions

Business Data

Enterprise Applications

Developers

Business ProcessManagerRule EngineEvent ProcessorBusiness Users

Web Services

Java

Business Events

Authoring Tools for Business Users

Authoring Tools for Developers

Operations

Business Central

Business Analysts

BRMS ComponentsRepository

BusinessRule Definitions

Business Data

Enterprise Applications

Business Analysts

Business ProcessManagerRule EngineEvent ProcessorBusiness Users

Web Services

Java

Business Events

Authoring Tools for Business Users

Authoring Tools for Developers

Operations

Business Central

Developers

Repository

Businessrule definitions

Business data

Business analystsDevelopers

Event processorRules engine

Business Events

Authoring tools for business users

Authoring tools for developers

Components

Business users

BAM

Business ProcessManager

Enterprise ApplicationsBusiness users

Web Services

Java

BRMS SUITE 6 NO jBPMbetter uibetter control versioning + branchingdrools new version 6.0 new rule algorithm, faster and more efficient, better use of memory, scalabilityoptaplanner

New in 6.0

Repository

BusinessLogicDefinitions

Business Data

Enterprise Applications

Business AnalystsDevelopers

Business ProcessManagerRule EngineEvent ProcessorBusiness Users

Web Services

Java

Business Events

Authoring Tools for Business Users

Authoring Tools for Developers

Business Operations/Analysts

Business Central

Data ModelerForms Designer

jBPM 6.0

Business Resource Optimizer

Core Services: Business Resource Optimizer (TP)

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 applicationsLeverages JBoss Rules execution engine which has been available for yearsAdds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changesAlso adds Repository to provide version management of multiple sets of business rulesSupports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments

Core Services: Business Resource Optimizer (TP)

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 applicationsLeverages JBoss Rules execution engine which has been available for yearsAdds new browser-based Rules Mgmt app, enabling business users to participate in the review, editing, and maintenance of business rule changesAlso adds Repository to provide version management of multiple sets of business rulesSupports the deployment of business rules to JBoss middleware platforms and non-JBoss runtime environments

Demo

Eric D. SchabellJBoss Technology Evangelist (Integration & BPM)@ericschabell / [email protected]

Questions?

`

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/10/jboss-bpm-suite-rocking-the-mortgage-demo.html

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

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

JBoss xPaaS Demos:https://github.com/eschabell/bpms-bam-dashboard

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

Click to edit the title text format

Click to edit the outline text format

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline LevelNinth Outline Level

Click to edit the title text format

Click to edit the outline text format

Click to edit the title text format

Click to edit the outline text format

Click to edit the title text format

Click to edit the outline text format

RED HAT INTERNAL ONLY

Click to edit the title text format

Click to edit the outline text format

Red Hat Confidential Partner NDA & Approval from Red Hat Partner Manager Required

Click to edit the outline text formatSecond Outline LevelThird Outline Level

Click to edit the title text formatClick to edit Master title style

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelClick to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Click to edit the title text format

Click to edit the outline text format