SlideShare uma empresa Scribd logo
1 de 65
Baixar para ler offline
Guvnor

Jervis Liu
What is Guvnor?

● Business Knowledge Management System
● Application to manage business knowledge
   ○ Business Rules (BRMS)
   ○ Business Workflows (BWMS)
● Accessible through
   ○ Browser
   ○ REST webservice
Why would I need a BRMS
     like Guvnor?
Use case: mortgage

● Mortgage approval
● Mortgage rate calculation
Diploma
       Computer science
             +
         Economics
             +
          Medicine
        John Unfindable Smith



Programmers are not domain experts
Domain experts define rules

● Mortgage manager == domain expert
   ○ defines rules
   ○ wants to edit rules




                        Invalid: must be a number
Too complex
Not flexible enough
when house near Fukushima
  then ...


  when guarantor invested in
  Lehman Brothers stock
  then ...




Business rules change often
Only works for data changes
Too slow for business rules changes
Possible through Guvnor
How do I define my data
       model?
Business Model

● POJO model
Upload a Java JAR file into Guvnor

● Declarative model
Declare a model within Guvnor

● Enumerations
Business Model
            POJO Model
Uploading a POJO model
Business Model
               Declarative model
Declarative model editor

 ● Add CEP support to your classes
    1. @role(event) annotation
    2. Add to POJOs or declared types

 ● Example types:
    1. Loan Application
    2. Applicant
    3. ...
 ● Example fields:
    1. LoanApplication.amount
    2. LoanApplication.approved
Business Model
              Declarative model
Declarative model editor
Business Model
              Declarative model
Adding a new Type
 ● Types can extend Java classes
 ● Types can extend other declared types




Adding a field to a Fact
Business Model
              Enumerations

● Java enumerations
Defined in POJO model

● Guvnor enumerations
Defined declaratively in Guvnor
Business Model
             Enumerations
Guvnor enumeration editor:
Business Model
             Enumerations
Guvnor enumerations:

 ● Restrict any domain field
 ● Dependent enumerations



 ● Pull content from external source
Authoring rules



How do I define my business
          rules?
Authoring rules

● Web-based editor
● Web-based templates
● Web-based decision tables
● Domain Specific Language
● Free-form DRL
Authoring rules
            Web-based editor
Web-based editor:

 ● Visually define individual rules quickly and easily

 ● Supports a wide sub-set of Drools Expert DRL features
    1. all of the following are true
    2. any of the following are true
    3. nested model accessors
    4. from
    5. accumulate
    6. collect
    7. CEP
    8. etc
Authoring rules
            Web-based editor
Web-based editor
Authoring rules
            Web-based templates
Web-based templates:

 ● Visually define multiple rules quickly and easily

 ● Extension of Web-based editor

 ● Define parameters in rules

 ● Backed by a table of data to build individual rules
Authoring rules
            Web-based templates
Web-based templates (editor)
Authoring rules
            Web-based templates
Web-based templates (data)
Authoring rules
             Web-based templates
Resultant rules
Authoring rules
                          Web-based decision tables
Web-based decision tables:

   ● Visually define multiple rules quickly and easily
   ● Rapid construction using Wizard
   ● Extended entry
Values are held in the decision table


   ● Limited entry
Values are held in the column definition


   ● Expanded form
   ● Mergable cells
   ● Grouping of rows
Authoring rules
           Web-based decision tables
Using a Wizard
Authoring rules
           Web-based decision tables
Extended Entry
Authoring rules
            Web-based decision tables
Limited Entry
Authoring rules
                Web-based decision tables
Expanded form
 ● One row for each combination of conditions
 ● Condition 1 with 3 values (25, 30, 35)
 ● Condition 2 with 3 values ("AA", "OK", "Sub prime")
 ● 3 x 3 = 9 rules
Authoring rules
            Web-based decision tables
Merging cells




Grouping cells
Decision table analysis

● Impossible matches
    ○ 1 row can never match
● Conflict detection
    ○ 2 rows match at same time for certain ranges
    ○ and contradict each other
Authoring rules
            Web-based decision tables
Resultant rules
Authoring rules
            Domain Specific Language
Domain Specific Language:

 ● Define domain specific sentences for use in rules



 ● Include DSL sentences in rules
Authoring rules
            Free-form DRL
Free-form DRL:

 ● Cutting edge Drools Expert syntax
    1. Backwards chaining
    2. Declarative agenda
    3. Traits

 ● Some people (developers) just prefer it
How do I check the quality of
         my rules?
Test Scenarios

● Validates your decisions
● Guards your knowledge

● Rules specify what decisions to make with the given data
    ○ When the data exists. Then do the following
● Test scenarios validate that the knowledge base does what
  is expected
    ○ Given we have this data. Expect the following to be true
Overall report of test statuses and
coverage
Single Scenario
A 17-year-old
should never get
a loan, even if
he has an
income source.
Failing Scenario
If a change in
the future will
break the
knowledge
base. Allowing
loans for
underages. This
test scenario will
pick it up.
Rule Analysis

● Looks for errors in the rule logic and mistakes made by the
  rule authors
    ○ Redundant and subsumptant rules
    ○ Missing ranges
    ○ Rules that can never fire
    ○ Rules that always fire
    ○ Rule optimization
Rule Analysis
Report
Example report warning
about missing ranges
and missing rule
conditions.
How do I define workflows?
Web-based BPMN2 authoring
● Guvnor integration with jBPM5 Web Designer allows:
     ○ editing/creation of fully-executable jBPM5 processes
     ○ viewing the source of the process in different formats (png, pdf, json, bpmn2, svg)
     ○ automatic creation of human-task forms (fully executable in jBPM console)
     ○ creation of jBPM workitem definition configurations (via custom editor, similar to
       sprint context editor)
     ○ visual process validation
     ○ automatic installation of assets from the jBPM Service Repository
     ○ ability to convert jBPM3.2-based process definitions to BPMN2
Where does Guvnor fit into my
       infrastructure?
Jackrabbit Repository Configuration

● All assets are stored in a content repository (JCR 2.0
  compliant)
● Configuring different repositories is possible
● Default repository implementation is Apache Jackrabbit

● Jackrabbit allows repository to be stored
   ○ File System (default)
   ○ External Database (Oracle, MySQL, etc)
● Configuring Jackrabbit is often tedious mainly because of
  limited or not-existing documentation
● Guvnor Admin section includes a repository configuration
  widget that helps with configuration creation.
Jackrabbit Repo. Configuration (2)

● BRMS 5.2 repository configuration widget:
Jackrabbit Repo. Configuration (3)

● Guvnor repository configuration widget:
Jackrabbit Repo. Configuration (4)

● Guvnor repository configuration widget:
How do I release the
   knowledge?
Releasing the knowledge
              Packaging

Assemble required assets into a single deployable unit
Releasing the knowledge
             Versioning
Both assets and packages are "versioned" in the Guvnor
Releasing the knowledge
                Lifecycle management
Create status (life cycles):




Change the status:
How do I use the knowledge?
Using the knowledge
The Knowledge Agent
Using the knowledge
                      The REST Interface
The Guvnor repository back end can be accessed via Rest
and WebDav. REST Examples:
URL             Mode Produces Mime-         Consumes MIME-     Description
                     Type                   Type
/packages/      GET    application/atom+xml none               Returns the metadata of the
{packageName}                                                  package {packageName} as
                                                               an Atom Entry.
/packages/      GET    application/json     none               Returns the metadata of the
{packageName}          application/xml                         package {packageName} as
                                                               Json or XML
/packages/      GET    application/octet-   none               Returns the compiled binary
{packageName}          stream                                  of the package
/binary                                                        {packageName} as a binary
                                                               stream
/packages/      PUT    application/atom+xml none               Updates the metadata of
{packageName}                                                  package {packageName}
                                                               with a given Atom Entry.
/packages       POST application/atom+xml application/atom+xml Creates a package from an
                                                               Atom Entry. Returns the
                                                               newly created package in
                                                               Atom Entry format
Spring Context Editor
● Allows to create and manage Spring Context files:




● Spring contexts have own asset type:




● Retrievable via REST API by clients.
● Easy to create custom editors for integration with other
  technologies.
Embeddable Asset Editors
● Guvnor provides a set of Editors to author assets
● Asset format determines the Editor used
● Some existing editors:
   ○ Guided Rule Editor
   ○ DRL Editor
   ○ DSL Editor
   ○ Decision Table Editor
   ○ Spring Context Editor
   ○ jBPM5 Workitem Definition Editor
   ○ ...
● Guvnor also has the ability to embed asset editors in client
  applications
Embeddable Asset Editors (2)
● Embedding enabled via StandaloneEditorServlet
● Client applications must perform request to
  /standaloneEditorServlet and can interact with the
  embedded editor(s) via JavaScript.
   ○ Restriction – since JavaScript is used, client
     application must run on the same server as
     Guvnor (cross-domain interaction only)
● 100% community contribution
● Three interaction modes available:
   ○ Guided Rule editing mode (new or existing
     assets)
   ○ Asset Editor (existing assets only)
   ○ New asset mode
Questions

http://www.jboss.org/drools

Mais conteúdo relacionado

Semelhante a Guvnor presentation jervis liu

Monitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operatorMonitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operatorLili Cosic
 
Design Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu KanoorDesign Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu KanoorManageIQ
 
Load testing in Zonky with Gatling
Load testing in Zonky with GatlingLoad testing in Zonky with Gatling
Load testing in Zonky with GatlingPetr Vlček
 
Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Idan Atias
 
EuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears TrainingEuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears TrainingAlessandro Molina
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideMohanraj Thirumoorthy
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Owain Perry
 
How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018Antonios Giannopoulos
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice frameworkFabrice Sznajderman
 
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedis Labs
 
Time series denver an introduction to prometheus
Time series denver   an introduction to prometheusTime series denver   an introduction to prometheus
Time series denver an introduction to prometheusBob Cotton
 
Java EE web project introduction
Java EE web project introductionJava EE web project introduction
Java EE web project introductionOndrej Mihályi
 
An approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSocketsAn approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSocketsAndrei Sebastian Cîmpean
 
WebSDK - Switching between service providers
WebSDK - Switching between service providersWebSDK - Switching between service providers
WebSDK - Switching between service providersHotstar
 
What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6WSO2
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kuberneteskloia
 

Semelhante a Guvnor presentation jervis liu (20)

Monitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operatorMonitoring kubernetes with prometheus-operator
Monitoring kubernetes with prometheus-operator
 
Design Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu KanoorDesign Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu Kanoor
 
Load testing in Zonky with Gatling
Load testing in Zonky with GatlingLoad testing in Zonky with Gatling
Load testing in Zonky with Gatling
 
Grails 101
Grails 101Grails 101
Grails 101
 
Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)
 
EuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears TrainingEuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears Training
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud
 
How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018
 
Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
 
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
 
Time series denver an introduction to prometheus
Time series denver   an introduction to prometheusTime series denver   an introduction to prometheus
Time series denver an introduction to prometheus
 
Java EE web project introduction
Java EE web project introductionJava EE web project introduction
Java EE web project introduction
 
An approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSocketsAn approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSockets
 
WebSDK - Switching between service providers
WebSDK - Switching between service providersWebSDK - Switching between service providers
WebSDK - Switching between service providers
 
What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 

Último

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfChristalin Nelson
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Osopher
 
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...Nguyen Thanh Tu Collection
 
The role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipThe role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipKarl Donert
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxAvaniJani1
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroomSamsung Business USA
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPCeline George
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxryandux83rd
 

Último (20)

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdf
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
 
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
 
The role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipThe role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenship
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERP
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptx
 

Guvnor presentation jervis liu

  • 2. What is Guvnor? ● Business Knowledge Management System ● Application to manage business knowledge ○ Business Rules (BRMS) ○ Business Workflows (BWMS) ● Accessible through ○ Browser ○ REST webservice
  • 3. Why would I need a BRMS like Guvnor?
  • 4. Use case: mortgage ● Mortgage approval ● Mortgage rate calculation
  • 5.
  • 6. Diploma Computer science + Economics + Medicine John Unfindable Smith Programmers are not domain experts
  • 7. Domain experts define rules ● Mortgage manager == domain expert ○ defines rules ○ wants to edit rules Invalid: must be a number
  • 9. when house near Fukushima then ... when guarantor invested in Lehman Brothers stock then ... Business rules change often
  • 10. Only works for data changes
  • 11. Too slow for business rules changes
  • 13. How do I define my data model?
  • 14. Business Model ● POJO model Upload a Java JAR file into Guvnor ● Declarative model Declare a model within Guvnor ● Enumerations
  • 15. Business Model POJO Model Uploading a POJO model
  • 16. Business Model Declarative model Declarative model editor ● Add CEP support to your classes 1. @role(event) annotation 2. Add to POJOs or declared types ● Example types: 1. Loan Application 2. Applicant 3. ... ● Example fields: 1. LoanApplication.amount 2. LoanApplication.approved
  • 17. Business Model Declarative model Declarative model editor
  • 18. Business Model Declarative model Adding a new Type ● Types can extend Java classes ● Types can extend other declared types Adding a field to a Fact
  • 19. Business Model Enumerations ● Java enumerations Defined in POJO model ● Guvnor enumerations Defined declaratively in Guvnor
  • 20. Business Model Enumerations Guvnor enumeration editor:
  • 21. Business Model Enumerations Guvnor enumerations: ● Restrict any domain field ● Dependent enumerations ● Pull content from external source
  • 22. Authoring rules How do I define my business rules?
  • 23. Authoring rules ● Web-based editor ● Web-based templates ● Web-based decision tables ● Domain Specific Language ● Free-form DRL
  • 24. Authoring rules Web-based editor Web-based editor: ● Visually define individual rules quickly and easily ● Supports a wide sub-set of Drools Expert DRL features 1. all of the following are true 2. any of the following are true 3. nested model accessors 4. from 5. accumulate 6. collect 7. CEP 8. etc
  • 25. Authoring rules Web-based editor Web-based editor
  • 26. Authoring rules Web-based templates Web-based templates: ● Visually define multiple rules quickly and easily ● Extension of Web-based editor ● Define parameters in rules ● Backed by a table of data to build individual rules
  • 27. Authoring rules Web-based templates Web-based templates (editor)
  • 28. Authoring rules Web-based templates Web-based templates (data)
  • 29. Authoring rules Web-based templates Resultant rules
  • 30. Authoring rules Web-based decision tables Web-based decision tables: ● Visually define multiple rules quickly and easily ● Rapid construction using Wizard ● Extended entry Values are held in the decision table ● Limited entry Values are held in the column definition ● Expanded form ● Mergable cells ● Grouping of rows
  • 31. Authoring rules Web-based decision tables Using a Wizard
  • 32. Authoring rules Web-based decision tables Extended Entry
  • 33. Authoring rules Web-based decision tables Limited Entry
  • 34. Authoring rules Web-based decision tables Expanded form ● One row for each combination of conditions ● Condition 1 with 3 values (25, 30, 35) ● Condition 2 with 3 values ("AA", "OK", "Sub prime") ● 3 x 3 = 9 rules
  • 35. Authoring rules Web-based decision tables Merging cells Grouping cells
  • 36. Decision table analysis ● Impossible matches ○ 1 row can never match ● Conflict detection ○ 2 rows match at same time for certain ranges ○ and contradict each other
  • 37. Authoring rules Web-based decision tables Resultant rules
  • 38. Authoring rules Domain Specific Language Domain Specific Language: ● Define domain specific sentences for use in rules ● Include DSL sentences in rules
  • 39. Authoring rules Free-form DRL Free-form DRL: ● Cutting edge Drools Expert syntax 1. Backwards chaining 2. Declarative agenda 3. Traits ● Some people (developers) just prefer it
  • 40. How do I check the quality of my rules?
  • 41. Test Scenarios ● Validates your decisions ● Guards your knowledge ● Rules specify what decisions to make with the given data ○ When the data exists. Then do the following ● Test scenarios validate that the knowledge base does what is expected ○ Given we have this data. Expect the following to be true
  • 42. Overall report of test statuses and coverage
  • 43. Single Scenario A 17-year-old should never get a loan, even if he has an income source.
  • 44. Failing Scenario If a change in the future will break the knowledge base. Allowing loans for underages. This test scenario will pick it up.
  • 45. Rule Analysis ● Looks for errors in the rule logic and mistakes made by the rule authors ○ Redundant and subsumptant rules ○ Missing ranges ○ Rules that can never fire ○ Rules that always fire ○ Rule optimization
  • 46. Rule Analysis Report Example report warning about missing ranges and missing rule conditions.
  • 47. How do I define workflows?
  • 48. Web-based BPMN2 authoring ● Guvnor integration with jBPM5 Web Designer allows: ○ editing/creation of fully-executable jBPM5 processes ○ viewing the source of the process in different formats (png, pdf, json, bpmn2, svg) ○ automatic creation of human-task forms (fully executable in jBPM console) ○ creation of jBPM workitem definition configurations (via custom editor, similar to sprint context editor) ○ visual process validation ○ automatic installation of assets from the jBPM Service Repository ○ ability to convert jBPM3.2-based process definitions to BPMN2
  • 49. Where does Guvnor fit into my infrastructure?
  • 50.
  • 51. Jackrabbit Repository Configuration ● All assets are stored in a content repository (JCR 2.0 compliant) ● Configuring different repositories is possible ● Default repository implementation is Apache Jackrabbit ● Jackrabbit allows repository to be stored ○ File System (default) ○ External Database (Oracle, MySQL, etc) ● Configuring Jackrabbit is often tedious mainly because of limited or not-existing documentation ● Guvnor Admin section includes a repository configuration widget that helps with configuration creation.
  • 52. Jackrabbit Repo. Configuration (2) ● BRMS 5.2 repository configuration widget:
  • 53. Jackrabbit Repo. Configuration (3) ● Guvnor repository configuration widget:
  • 54. Jackrabbit Repo. Configuration (4) ● Guvnor repository configuration widget:
  • 55. How do I release the knowledge?
  • 56. Releasing the knowledge Packaging Assemble required assets into a single deployable unit
  • 57. Releasing the knowledge Versioning Both assets and packages are "versioned" in the Guvnor
  • 58. Releasing the knowledge Lifecycle management Create status (life cycles): Change the status:
  • 59. How do I use the knowledge?
  • 60. Using the knowledge The Knowledge Agent
  • 61. Using the knowledge The REST Interface The Guvnor repository back end can be accessed via Rest and WebDav. REST Examples: URL Mode Produces Mime- Consumes MIME- Description Type Type /packages/ GET application/atom+xml none Returns the metadata of the {packageName} package {packageName} as an Atom Entry. /packages/ GET application/json none Returns the metadata of the {packageName} application/xml package {packageName} as Json or XML /packages/ GET application/octet- none Returns the compiled binary {packageName} stream of the package /binary {packageName} as a binary stream /packages/ PUT application/atom+xml none Updates the metadata of {packageName} package {packageName} with a given Atom Entry. /packages POST application/atom+xml application/atom+xml Creates a package from an Atom Entry. Returns the newly created package in Atom Entry format
  • 62. Spring Context Editor ● Allows to create and manage Spring Context files: ● Spring contexts have own asset type: ● Retrievable via REST API by clients. ● Easy to create custom editors for integration with other technologies.
  • 63. Embeddable Asset Editors ● Guvnor provides a set of Editors to author assets ● Asset format determines the Editor used ● Some existing editors: ○ Guided Rule Editor ○ DRL Editor ○ DSL Editor ○ Decision Table Editor ○ Spring Context Editor ○ jBPM5 Workitem Definition Editor ○ ... ● Guvnor also has the ability to embed asset editors in client applications
  • 64. Embeddable Asset Editors (2) ● Embedding enabled via StandaloneEditorServlet ● Client applications must perform request to /standaloneEditorServlet and can interact with the embedded editor(s) via JavaScript. ○ Restriction – since JavaScript is used, client application must run on the same server as Guvnor (cross-domain interaction only) ● 100% community contribution ● Three interaction modes available: ○ Guided Rule editing mode (new or existing assets) ○ Asset Editor (existing assets only) ○ New asset mode