SlideShare a Scribd company logo
1 of 40
Download to read offline
JBoss Enterprise Business Rules
          Business Rules Management System (BRMS)




   Eric D. Schabell
   JBoss Senior Solution Architect Benelux




  1
Eric D. Schabell | erics@redhat.com | @ericschabell
Agenda

      ● Introduction
      ● JBoss BRMS

           ●   Overview
           ●   Future directions
      ●   Demo
      ●
          Questions




  2
Eric D. Schabell | erics@redhat.com | @ericschabell
JBoss BRMS v5.2
       Declarative Business Rules
         ●   Avoids hard-coding business rules in business logic
         ●   Rules can change without Java code changes or re-compilation
         ●   Expert system allowing solution of complex problems
       Multiple Authoring Options: DRL, DSL, CSV and Programmatic Rules
        Definition
         ●   Application objects (facts) mixed with conditions (rules) – similar to HQL
         ●   POJO and Declarative Fact Model
         ●   Decision Tables in Excel/Open Office
         ●   DSL Natural Language Extensions
       Rule Repository
         ●   Versioning of business rule-related artifacts (e.g. Fact models, enumerations,
             functions, DSL definitions, rules, tests, etc.)
       Rule Manager
         ●   RIA for creation & maintenance of business rule artifacts




  3
Eric D. Schabell | erics@redhat.com | @ericschabell
JBoss BRMS
  What is a rule engine?

       A rule engine at its core is an environment/shell for capturing
        knowledge
           Applying that knowledge to specific data (facts)
            Uses production rules
                 IF <conditions> THEN <actions>
                 rules express logic

       Has roots in AI research
            Success of “expert” systems in the past triggered popularity of rule
             engines




  4
Eric D. Schabell | erics@redhat.com | @ericschabell
JBoss BRMS
  What is it going to do for me?

       Externalize business logic
          Logic that is complex
            Logic that changes often
            Logic that just doesn’t fit neatly in code
            Logic that means more to domain experts than it does programmers

       Keep application and user interface logic in your application
          Business logic in the rule engine


       Use domain objects as interface to rule engine




  5
Eric D. Schabell | erics@redhat.com | @ericschabell
JBoss BRMS
  When should I use a rules engine?

       When there is no satisfactory “traditional” solution
       The problem becomes to complex to express using traditional methods
       No known algorithms for solving the problem traditionally
       Too hard
       Too “fluid”




  6
Eric D. Schabell | erics@redhat.com | @ericschabell
JBoss BRMS
    What is a rule?




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




  7
Eric D. Schabell | erics@redhat.com | @ericschabell
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)




  8
Eric D. Schabell | erics@redhat.com | @ericschabell
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)




  9
Eric D. Schabell | erics@redhat.com | @ericschabell
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)




  10
Eric D. Schabell | erics@redhat.com | @ericschabell
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)




  11
Eric D. Schabell | erics@redhat.com | @ericschabell
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)




  12
Eric D. Schabell | erics@redhat.com | @ericschabell
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.




  13
Eric D. Schabell | erics@redhat.com | @ericschabell
JBoss BRMS
  How it Works

                                                                                 Agenda
  Rule                                                                          Activation
   Rule
     Rule            1.Parse DRL              RuleBase                Rule                       Fact
       Rule
        Rule
                                                                                Activation
                                                                                               Fact




                                          2. Create
                                                                      Rule                      Fact



  Fact
   Fact
     Fact           3. Assert Facts     WorkingMemory
       Fact
        Fact                                                                    Fact
                                                                                 Fact
                                                                                   Fact




                                                                 es
                                                                                     Fact




                                                                 ul
                                                                                      Fact



                                                                R
                                                            ll
                                                           A
                                                           re
                                                         Fi            Rule         (5) activation
                                                                        Rule      -> consequence
                                                      4.

                                                                          Rule
                                                                            Rule
                                                                             Rule




  14
Eric D. Schabell | erics@redhat.com | @ericschabell
Conceptual example



                                                      Stateful / Stateless
               Knowledge                                  Knowledge
                 Base                                      Session



             Rule package                                 Agenda
              (artifacts)




  15
Eric D. Schabell | erics@redhat.com | @ericschabell
Example: real BPM



                                                       Stateful
               Knowledge                              Knowledge
                 Base                                  Session



                Process                               Process
                Definition                            Instance




  16
Eric D. Schabell | erics@redhat.com | @ericschabell
Java Example


    // (1) Create knowledge base and add process definition
    KnowledgeBuilder kbuilder = ...
    kbuilder.add( ..., "sample.bpmn", ResourceType.BPMN2);
    KnowledgeBase kbase = kbuilder.newKnowledgeBase();
    // (2) Create new stateful knowledge session
    StatefulKnowledgeSession ksession =
           kbase.newStatefulKnowledgeSession();
    // (3) Start a new process instance
    ksession.startProcess(“com.sample.bpmn.hello”);




  17
Eric D. Schabell | erics@redhat.com | @ericschabell
BRMS – Rich UI for Business Rules




  18
Eric D. Schabell | erics@redhat.com | @ericschabell
Analysis Perspective                                                   Test the
                                                                            Rules




         JBoss BRMS Web                       Prototype the
             Manager                              Rules
          Model the Facts




                                                                                      J2SE

   JBoss Developer Studio                                                         EAP-
                                                              Deployment
                                                                               WS,WAR,EAR
   Check-Out Artifacts from
          Repository
   Build & Test Application                                                       SOA-P,
Check-In changes to Repository                                                    Mediated
                                                                                  Services
                                          JBoss BRMS Web
                                              Manager
                                           Create Package
   19
 Eric D. Schabell | erics@redhat.com | @ericschabell
Fact Model Editor




  20
Eric D. Schabell | erics@redhat.com | @ericschabell
Guided Rule Editor (Web)




  21
Eric D. Schabell | erics@redhat.com | @ericschabell
Guided Rule Editor (Web)




  22
Eric D. Schabell | erics@redhat.com | @ericschabell
Web Decision Table Editor




  23
Eric D. Schabell | erics@redhat.com | @ericschabell
Test Scenario Editor




  24
Eric D. Schabell | erics@redhat.com | @ericschabell
Developer Perspective


     JBoss Developer Studio
           Fact Model
         DSL Template

      Check-In Artifacts to
          Repository
                                                            JBoss BRMS Web
                                                                Manager
                                                             Use Facts & DSL
                                                        to create Business Rules


                                                                                      J2SE

                                                                                      EAP-
                                                                                   WS,WAR,EAR
                                                                     Deployment
                                                                                    SOA-P,
                                                                                    Mediated
                                                                                    Services
      JBoss BRMS Web                       JBoss BRMS Web
           Manager                             Manager
     Create Test Scenarios                  Create Package
  25
Eric D. Schabell | erics@redhat.com | @ericschabell
Eclipse – Developer Perspective




  26
Eric D. Schabell | erics@redhat.com | @ericschabell
Debugging

  Debug Views




      ●   New rule “perspective” to configure IDE for rules as needed




  27
Eric D. Schabell | erics@redhat.com | @ericschabell
Guided Rule Editor (Eclipse)

   Eclipse Guided Editor




  28
Eric D. Schabell | erics@redhat.com | @ericschabell
Rule Flow




  29
Eric D. Schabell | erics@redhat.com | @ericschabell
Core
      JBoss BPM                                       Engine


      • Core engine is a workflow engine in pure Java
           –   state transitions
           –   lightweight
           –   embeddable
           –   generic, extensible




  30
Eric D. Schabell | erics@redhat.com | @ericschabell
Decision Tables
   Decision Tables – Excel/Open Office




  31
Eric D. Schabell | erics@redhat.com | @ericschabell
Eclipse to BRMS Synchronization
                                                      JBoss Developer Studio
                                                                                 BRMS 5




                                                                             JCR
                                                                           Repository


  32
Eric D. Schabell | erics@redhat.com | @ericschabell
BRMS/Rules Deployment Scenario
                                                            RuleAgent    J2SE
                                                                         JBoss Rules Runtime
              BRMS
                                                                         EAP 4.3
                                                                         J2EE use cases
                                                            RuleAgent    Seam use cases
                                                                         Clustered




                                                                         SOA-P 5.0 (future)
                                                                         Stateless Rule Services
                                                            RuleAgent    Stateful Rule Services
                                                                         CBR & CBF
                                                                         Federated Hot Deployment
              JCR
            Repository


   Delivery of proper version of a rule package via the ruleagent to any of the above “containers”.
   EE and SOA containers allow for hot deployment/reload of the changed rules without component
      restart and no loss of transactions/messages.
  33
Eric D. Schabell | erics@redhat.com | @ericschabell
BRMS v5: Summary of Features
   Graphical User Interface and repository for Business Rule Editing, Versioning
   & Deployment management that is usable by the non-Java Programmer and
   non-System Administrator.

   Manages the following artifacts:
     ●   Rule Packages
     ●   Business Rules (via Guided Rule Editor)
     ●   Business Fact Model
     ●   Technical Rules (sync with Eclipse and/or BRMS UI)
     ●   Technical POJO Fact Model
     ●   Domain Specific Languages – DSL
     ●   Web-based Decision Tables
     ●   Spreadsheet-based Decision Tables
     ●   Rule Categories (for searching)
     ●   Users & Roles associated with rule life cycle states
     ●   Rule Promotion (Dev, QA, Production)
     ●   Test Scenarios



  34
Eric D. Schabell | erics@redhat.com | @ericschabell
JBoss BRMS, the future is now
Future: Event Stream Processing
        Some Process: Order Fulfillment, Replenishment, Customer Service, Financial Analysis




  Stateless Rules Services identify
  “interesting ”information
                                              Collect
                                              Suspect
                                               Data                  Potentially Significant Event
       Stateful Rules Services
       hold, analyze & raise events




     Other Process also capturing interesting data points and routing them to the “stateful” rules
                                 service for keeping and analysis.

  36
Eric D. Schabell | erics@redhat.com | @ericschabell
Features: ESP + CEP via ESB, Rules & JON




                        ESB: consumption, capture, transformation, routing, orchestration
                        Rules: selection, aggregation, correlation, generation and publication




Governance
  Tools




             Repository: for editing, versioning, testing   JON: start/stop services, monitor and alert on
             and publishing rules and SOA artifacts         service and action-level performance, monitor and
                                                            alert on business metric values

  37
Eric D. Schabell | erics@redhat.com | @ericschabell
BPMS future at JBoss


                 Pluggable
                     &                                                           Eclipse
                 Standards             Persistence                               BPMN2
                                                            XML                  Editor

                               Trans-
                               actions
                                               Core                                 Oryx Web-
    History                                   Engine            BPMN
                                                                                   Based Editor
                                                                 2.0
     Log
                                    Events

                 Management                       Integration         Domain-specific
                  Console                                                Processes
                                                                Human Task
                               BAM                ESB             Service

  38
Eric D. Schabell | erics@redhat.com | @ericschabell
BPMN2 and Projects


                                                      BPMN2
                                                       Model Savara
      Drools                jBPM

         Rules                                           Choreography
                                   Process
         Event                                           Collaboration



                               WS-BPEL                      Services
                         RiftSaw                                   SOA


  39
Eric D. Schabell | erics@redhat.com | @ericschabell
Agenda

      ● Introduction
      ● JBoss BRMS

           ●   Overview
           ●   Future directions
      ●   Demo
      ●
          Questions




  40
Eric D. Schabell | erics@redhat.com | @ericschabell

More Related Content

More from Eric D. Schabell

Observability For You and Me with OpenTelemetry (with demo)
Observability For You and Me with OpenTelemetry (with demo)Observability For You and Me with OpenTelemetry (with demo)
Observability For You and Me with OpenTelemetry (with demo)Eric D. Schabell
 
3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native Observability3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native ObservabilityEric D. Schabell
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryEric D. Schabell
 
Roadmap to Becoming a CNCF Ambassador
Roadmap to Becoming a CNCF AmbassadorRoadmap to Becoming a CNCF Ambassador
Roadmap to Becoming a CNCF AmbassadorEric D. Schabell
 
Cloud Native Bedtime Stories - Terrifying Execs into Action
Cloud Native Bedtime Stories - Terrifying Execs into ActionCloud Native Bedtime Stories - Terrifying Execs into Action
Cloud Native Bedtime Stories - Terrifying Execs into ActionEric D. Schabell
 
SRECon EU 2023 - Three Phases to Better Observability Outcomes
SRECon EU 2023 - Three Phases to Better Observability OutcomesSRECon EU 2023 - Three Phases to Better Observability Outcomes
SRECon EU 2023 - Three Phases to Better Observability OutcomesEric D. Schabell
 
Optimizing Observability Spend: Metrics
Optimizing Observability Spend: MetricsOptimizing Observability Spend: Metrics
Optimizing Observability Spend: MetricsEric D. Schabell
 
Engaging Your Execs - Telling Great Observability Tales Inspiring Action
Engaging Your Execs - Telling Great Observability Tales Inspiring ActionEngaging Your Execs - Telling Great Observability Tales Inspiring Action
Engaging Your Execs - Telling Great Observability Tales Inspiring ActionEric D. Schabell
 
WTF is SRE - Telling Effective Tales about Production
WTF is SRE - Telling Effective Tales about ProductionWTF is SRE - Telling Effective Tales about Production
WTF is SRE - Telling Effective Tales about ProductionEric D. Schabell
 
Optimizing Observability Spend: Metrics
Optimizing Observability Spend: MetricsOptimizing Observability Spend: Metrics
Optimizing Observability Spend: MetricsEric D. Schabell
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryEric D. Schabell
 
Open Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetryOpen Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetryEric D. Schabell
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud DataEric D. Schabell
 
3 Pitfalls Everyone Should Avoid with Cloud Native Data
3 Pitfalls Everyone Should Avoid with Cloud Native Data3 Pitfalls Everyone Should Avoid with Cloud Native Data
3 Pitfalls Everyone Should Avoid with Cloud Native DataEric D. Schabell
 
DZone webinar - Shift left Observability
DZone webinar - Shift left ObservabilityDZone webinar - Shift left Observability
DZone webinar - Shift left ObservabilityEric D. Schabell
 
Storytelling - How to build and delivery a story
Storytelling - How to build and delivery a storyStorytelling - How to build and delivery a story
Storytelling - How to build and delivery a storyEric D. Schabell
 
Trajectory 2022 - Shifting Cloud Native Observability to the Left
Trajectory 2022 - Shifting Cloud Native Observability to the LeftTrajectory 2022 - Shifting Cloud Native Observability to the Left
Trajectory 2022 - Shifting Cloud Native Observability to the LeftEric D. Schabell
 
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...Eric D. Schabell
 
How to Wrestle Your Observability Data Demons and Win!
How to Wrestle Your Observability Data Demons and Win!How to Wrestle Your Observability Data Demons and Win!
How to Wrestle Your Observability Data Demons and Win!Eric D. Schabell
 

More from Eric D. Schabell (20)

Observability For You and Me with OpenTelemetry (with demo)
Observability For You and Me with OpenTelemetry (with demo)Observability For You and Me with OpenTelemetry (with demo)
Observability For You and Me with OpenTelemetry (with demo)
 
3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native Observability3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native Observability
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Roadmap to Becoming a CNCF Ambassador
Roadmap to Becoming a CNCF AmbassadorRoadmap to Becoming a CNCF Ambassador
Roadmap to Becoming a CNCF Ambassador
 
Cloud Native Bedtime Stories - Terrifying Execs into Action
Cloud Native Bedtime Stories - Terrifying Execs into ActionCloud Native Bedtime Stories - Terrifying Execs into Action
Cloud Native Bedtime Stories - Terrifying Execs into Action
 
SRECon EU 2023 - Three Phases to Better Observability Outcomes
SRECon EU 2023 - Three Phases to Better Observability OutcomesSRECon EU 2023 - Three Phases to Better Observability Outcomes
SRECon EU 2023 - Three Phases to Better Observability Outcomes
 
Optimizing Observability Spend: Metrics
Optimizing Observability Spend: MetricsOptimizing Observability Spend: Metrics
Optimizing Observability Spend: Metrics
 
Engaging Your Execs - Telling Great Observability Tales Inspiring Action
Engaging Your Execs - Telling Great Observability Tales Inspiring ActionEngaging Your Execs - Telling Great Observability Tales Inspiring Action
Engaging Your Execs - Telling Great Observability Tales Inspiring Action
 
WTF is SRE - Telling Effective Tales about Production
WTF is SRE - Telling Effective Tales about ProductionWTF is SRE - Telling Effective Tales about Production
WTF is SRE - Telling Effective Tales about Production
 
Optimizing Observability Spend: Metrics
Optimizing Observability Spend: MetricsOptimizing Observability Spend: Metrics
Optimizing Observability Spend: Metrics
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Open Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetryOpen Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetry
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
 
3 Pitfalls Everyone Should Avoid with Cloud Native Data
3 Pitfalls Everyone Should Avoid with Cloud Native Data3 Pitfalls Everyone Should Avoid with Cloud Native Data
3 Pitfalls Everyone Should Avoid with Cloud Native Data
 
DZone webinar - Shift left Observability
DZone webinar - Shift left ObservabilityDZone webinar - Shift left Observability
DZone webinar - Shift left Observability
 
Storytelling - How to build and delivery a story
Storytelling - How to build and delivery a storyStorytelling - How to build and delivery a story
Storytelling - How to build and delivery a story
 
Shift left Observability
Shift left ObservabilityShift left Observability
Shift left Observability
 
Trajectory 2022 - Shifting Cloud Native Observability to the Left
Trajectory 2022 - Shifting Cloud Native Observability to the LeftTrajectory 2022 - Shifting Cloud Native Observability to the Left
Trajectory 2022 - Shifting Cloud Native Observability to the Left
 
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
PromCon EU 2022 - Centralized vs Decentralized Prometheus Scraping Architectu...
 
How to Wrestle Your Observability Data Demons and Win!
How to Wrestle Your Observability Data Demons and Win!How to Wrestle Your Observability Data Demons and Win!
How to Wrestle Your Observability Data Demons and Win!
 

Recently uploaded

The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)IES VE
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kitJamie (Taka) Wang
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1DianaGray10
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNeo4j
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024Brian Pichman
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameKapil Thakar
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxNeo4j
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 

Recently uploaded (20)

The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kit
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First Frame
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 

JBoss BRMS for Radboud University Guest Lecture on Business Rules

  • 1. JBoss Enterprise Business Rules Business Rules Management System (BRMS) Eric D. Schabell JBoss Senior Solution Architect Benelux 1 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 2. Agenda ● Introduction ● JBoss BRMS ● Overview ● Future directions ● Demo ● Questions 2 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 3. JBoss BRMS v5.2  Declarative Business Rules ● Avoids hard-coding business rules in business logic ● Rules can change without Java code changes or re-compilation ● Expert system allowing solution of complex problems  Multiple Authoring Options: DRL, DSL, CSV and Programmatic Rules Definition ● Application objects (facts) mixed with conditions (rules) – similar to HQL ● POJO and Declarative Fact Model ● Decision Tables in Excel/Open Office ● DSL Natural Language Extensions  Rule Repository ● Versioning of business rule-related artifacts (e.g. Fact models, enumerations, functions, DSL definitions, rules, tests, etc.)  Rule Manager ● RIA for creation & maintenance of business rule artifacts 3 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 4. JBoss BRMS What is a rule engine?  A rule engine at its core is an environment/shell for capturing knowledge  Applying that knowledge to specific data (facts)  Uses production rules  IF <conditions> THEN <actions>  rules express logic  Has roots in AI research  Success of “expert” systems in the past triggered popularity of rule engines 4 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 5. JBoss BRMS What is it going to do for me?  Externalize business logic  Logic that is complex  Logic that changes often  Logic that just doesn’t fit neatly in code  Logic that means more to domain experts than it does programmers  Keep application and user interface logic in your application  Business logic in the rule engine  Use domain objects as interface to rule engine 5 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 6. JBoss BRMS When should I use a rules engine?  When there is no satisfactory “traditional” solution  The problem becomes to complex to express using traditional methods  No known algorithms for solving the problem traditionally  Too hard  Too “fluid” 6 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 7. JBoss BRMS What is a rule?  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. 7 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 8. 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) 8 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 9. 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) 9 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 10. 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) 10 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 11. 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) 11 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 12. 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) 12 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 13. 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. 13 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 14. JBoss BRMS How it Works Agenda Rule Activation Rule Rule 1.Parse DRL RuleBase Rule Fact Rule Rule Activation Fact 2. Create Rule Fact Fact Fact Fact 3. Assert Facts WorkingMemory Fact Fact Fact Fact Fact es Fact ul Fact R ll A re Fi Rule (5) activation Rule -> consequence 4. Rule Rule Rule 14 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 15. Conceptual example Stateful / Stateless Knowledge Knowledge Base Session Rule package Agenda (artifacts) 15 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 16. Example: real BPM Stateful Knowledge Knowledge Base Session Process Process Definition Instance 16 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 17. Java Example // (1) Create knowledge base and add process definition KnowledgeBuilder kbuilder = ... kbuilder.add( ..., "sample.bpmn", ResourceType.BPMN2); KnowledgeBase kbase = kbuilder.newKnowledgeBase(); // (2) Create new stateful knowledge session StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); // (3) Start a new process instance ksession.startProcess(“com.sample.bpmn.hello”); 17 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 18. BRMS – Rich UI for Business Rules 18 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 19. Analysis Perspective Test the Rules JBoss BRMS Web Prototype the Manager Rules Model the Facts J2SE JBoss Developer Studio EAP- Deployment WS,WAR,EAR Check-Out Artifacts from Repository Build & Test Application SOA-P, Check-In changes to Repository Mediated Services JBoss BRMS Web Manager Create Package 19 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 20. Fact Model Editor 20 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 21. Guided Rule Editor (Web) 21 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 22. Guided Rule Editor (Web) 22 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 23. Web Decision Table Editor 23 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 24. Test Scenario Editor 24 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 25. Developer Perspective JBoss Developer Studio Fact Model DSL Template Check-In Artifacts to Repository JBoss BRMS Web Manager Use Facts & DSL to create Business Rules J2SE EAP- WS,WAR,EAR Deployment SOA-P, Mediated Services JBoss BRMS Web JBoss BRMS Web Manager Manager Create Test Scenarios Create Package 25 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 26. Eclipse – Developer Perspective 26 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 27. Debugging Debug Views ● New rule “perspective” to configure IDE for rules as needed 27 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 28. Guided Rule Editor (Eclipse) Eclipse Guided Editor 28 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 29. Rule Flow 29 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 30. Core JBoss BPM Engine • Core engine is a workflow engine in pure Java – state transitions – lightweight – embeddable – generic, extensible 30 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 31. Decision Tables Decision Tables – Excel/Open Office 31 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 32. Eclipse to BRMS Synchronization JBoss Developer Studio BRMS 5 JCR Repository 32 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 33. BRMS/Rules Deployment Scenario RuleAgent J2SE JBoss Rules Runtime BRMS EAP 4.3 J2EE use cases RuleAgent Seam use cases Clustered SOA-P 5.0 (future) Stateless Rule Services RuleAgent Stateful Rule Services CBR & CBF Federated Hot Deployment JCR Repository Delivery of proper version of a rule package via the ruleagent to any of the above “containers”. EE and SOA containers allow for hot deployment/reload of the changed rules without component restart and no loss of transactions/messages. 33 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 34. BRMS v5: Summary of Features Graphical User Interface and repository for Business Rule Editing, Versioning & Deployment management that is usable by the non-Java Programmer and non-System Administrator. Manages the following artifacts: ● Rule Packages ● Business Rules (via Guided Rule Editor) ● Business Fact Model ● Technical Rules (sync with Eclipse and/or BRMS UI) ● Technical POJO Fact Model ● Domain Specific Languages – DSL ● Web-based Decision Tables ● Spreadsheet-based Decision Tables ● Rule Categories (for searching) ● Users & Roles associated with rule life cycle states ● Rule Promotion (Dev, QA, Production) ● Test Scenarios 34 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 35. JBoss BRMS, the future is now
  • 36. Future: Event Stream Processing Some Process: Order Fulfillment, Replenishment, Customer Service, Financial Analysis Stateless Rules Services identify “interesting ”information Collect Suspect Data Potentially Significant Event Stateful Rules Services hold, analyze & raise events Other Process also capturing interesting data points and routing them to the “stateful” rules service for keeping and analysis. 36 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 37. Features: ESP + CEP via ESB, Rules & JON ESB: consumption, capture, transformation, routing, orchestration Rules: selection, aggregation, correlation, generation and publication Governance Tools Repository: for editing, versioning, testing JON: start/stop services, monitor and alert on and publishing rules and SOA artifacts service and action-level performance, monitor and alert on business metric values 37 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 38. BPMS future at JBoss Pluggable & Eclipse Standards Persistence BPMN2 XML Editor Trans- actions Core Oryx Web- History Engine BPMN Based Editor 2.0 Log Events Management Integration Domain-specific Console Processes Human Task BAM ESB Service 38 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 39. BPMN2 and Projects BPMN2 Model Savara Drools jBPM Rules Choreography Process Event Collaboration WS-BPEL Services RiftSaw SOA 39 Eric D. Schabell | erics@redhat.com | @ericschabell
  • 40. Agenda ● Introduction ● JBoss BRMS ● Overview ● Future directions ● Demo ● Questions 40 Eric D. Schabell | erics@redhat.com | @ericschabell