售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Mastering JBoss Drools 6
Table of Contents
Mastering JBoss Drools 6
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Rules Declarative Nature
What are rules?
Rules basic structure
Declarative approach
Imperative versus Declarative implementation
Why do we use rules?
Rules independence
Rule execution chaining
Atomicity of rules
Ordering of rules
Rule execution life cycle
Collaboration with Rules
Involving more people with Rules using a BRMS
Letting the rule engine do its job
Rule engine algorithm
When should we use rules?
Complex scenario, simple rules
Ever-changing scenarios
Example–eShop system
When not to use a rule engine
Summary
2. Writing and Executing Rules
Setting up our environment
Creating our first Drools project
Writing and executing our first rule
Using CDI to bootstrap the Rule Engine
The Rule language
Organizing our projects
Summary
3. Drools Runtime
Understanding the Drools runtime instances
KieModule & KieContainer
Loading rules from the classpath
Loading rules using Maven artifacts (Kie-CI)
KieModule configurations (KieBases, KieSessions & StatelessKieSessions)
KieScanner
Artifacts version resolution
Dealing with unexpected issues and errors
Putting it all together
Summary
4. Improving Our Rule Syntax
Adding external interactions with global variables
Modifying the data in the working memory
The insert keyword
The modify and update keywords
The delete/retract keywords
Rule attributes
Example – controlling which rules will fire
Example – splitting rule groups with agenda group
Other types of rule groups
Rule dates management
Controlling loops in rules
Lock-on-active
Model properties execution control
Declared types
Property-reactive beans
Special Drools operations
Boolean and numeric operations
Regex operations – matches
Collection operations – contains and memberOf
Working memory breakdown: the from clause
Collect from objects
Accumulate keyword
Advanced conditional elements
NOT keyword
EXISTS and FORALL keywords
Drools syntactic sugar
Nested accessors
Inline casts
Null-safe operators
Decorating our objects in memory
Adding traits with the don keyword
Removing traits with the shed keyword
Logical insertion of elements
Handling deviations of our rules
Deviations to our deviations
Rule inheritance
Conditional named consequences
Summary
5. Understanding KIE Sessions
Stateless and stateful Kie Sessions
Stateless Kie Sessions
Stateful Kie Sessions
Kie runtime components
Globals
Globals as a way to parameterize the condition of a pattern
Globals as a way to introduce new information into a session in the LHS
Globals as a way to collect information from a session
Globals as a way to interact with external systems in the RHS
Channels
Queries
On-demand queries
Live queries
Event Listeners
Kie Base components
Functions
Custom operators
Custom accumulate functions
Summary
6. Complex Event Processing
What is complex event processing?
What are events and complex events?
Declaring CEP-based Rules
Semantics of events
Declaring time-based-events in Drools
Temporal operators
Event-driven architecture
Split event sources with entry points
Sliding windows
Length-based sliding windows
Time-based sliding windows
Declared sliding windows
Running CEP-based Scenarios
Stream processing configuration
Continuous versus Discrete rule firing
Testing with the session clock
Drools CEP limitations
Summary
7. Human-Readable Rules
Domain Specific Languages
The Dictionary file
Adding constraints to patterns
Rules files
DSL troubleshooting
A simple scenario
Decision tables
What is a decision table?
Decision tables structure
RuleSet section
RuleTable section
Coming back to our scenario
Decision table troubleshooting
Enhanced decision tables
Rule templates
Rule template structure
Working with rule templates
Spreadsheet data source
Array data source
Objects data source
SQL result set data source
PMML
PMML in Drools
Customer classification decision tree example
Header
DataDictionary
Model
PMML troubleshooting
PMML limitations
Summary
8. Rules' Testing and Troubleshooting
Create loosely coupled DRLs
Prefer KieHelper over a KieContainer classpath
Benefits of using globals
Debugging the left-hand side of a rule
Left-hand side troubleshooting
Compilation errors
Runtime errors
Rules not being triggered
Event listeners
Drools logs
Create simpler versions of a rule
Debugging the right-hand side of a rule
Right-hand side troubleshooting
Compilation errors
Runtime errors
Right-hand side good practices
Dumping the generated Java classes
Reporting a bug in Drools
Summary
9. Introduction to PHREAK
Introducing PHREAK
Object Type Nodes
Alpha Nodes
Alpha Node sharing
Constraint JIT compilation
Beta Nodes
Beta Node sharing
Or between patterns
Special nodes in the network
The Not Node
The Exists Node
The Accumulate Node
The From Node
Queries and backward-chaining
Unification
Positional arguments
Backward reasoning in Drools
The Query Element Node
PHREAK improvements over RETE
Delayed rule evaluation
Set-oriented propagation
Network segmentation
Phreak Inspector
Summary
10. Integrating Rules and Processes
jBPM – the process engine
Simple business process example
Kie Session advanced configurations
Kie Session event listeners
Kie Session Work Items
Understanding our process execution
Drools and jBPM: integration patterns
Accessing the process engine from our rules
Process instances as facts
BPMN2 Business Rule Tasks
Persistence and transactions
How is state persisted?
JPA implementation
Infinispan implementation
Extending persisted data
Transaction management
Summary
11. Integrating Drools with our Apps
Architecture considerations
Asynchronous versus Synchronous Design
Integrating with the rest of an application
Embedding Drools into our application
Knowledge as a Service
CDI integration
Spring integration
Introducing Spring Framework
Kie Spring Config example
Camel integration
Integrating the Apache Camel framework
Creating our Kie endpoints
Kie Execution Server
Configuring Kie Server
Default exposed Kie Server endpoints
Kie Workbench
Drools and beyond: extending our functionality
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜