万本电子书0元读

万本电子书0元读

顶部广告

Mastering JBoss Drools 6电子书

售       价:¥

12人正在读 | 0人评论 6.2

作       者:Mauricio Salatino

出  版  社:Packt Publishing

出版时间:2016-03-31

字       数:253.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Discover the power of Drools 6 and Business Rules for developing complex scenarios in your applications About This Book Implement and model different rules using the DRL full syntax Model complex business decisions and domain models in order to automate and improve your operational decisions with the Drools framework A practical, fast-paced, hands-on guide to help you use the different components provided by the Drools Rule Engine Who This Book Is For This book is for Java developers and architects who need to have a deep understanding of how to create or integrate your applications with the Drools Rules Framework. The book assumes that you know the Java language well and also have experience with some widely used frameworks, such as Spring. You should also know the basics of Maven-based applications. What You Will Learn Automate your application’s decisions, such as promotion applying, discount policies, fraud detection, and more. Quickly get started with writing your first rules using the DRL full syntax. Discover the power of the new syntax components of the rule language. Define inferences in your business rules to simplify complex decisions. Write decision tables, templates,domain-specific languages, and scorecards, and learn how to map them to the Drools framework. Harness the full operational power of Drools through all of its configuration points. Use Drools configurations and architectures for different environments and scenarios. In Detail Mastering JBoss Drools 6 will provide you with the knowledge to develop applications involving complex scenarios. You will learn how to use KIE modules to create and execute Business Rules, and how the PHREAK algorithm internally works to drive the Rule Engine decisions. This book will also cover the relationship between Drools and jBPM, which allows you to enrich your applications by using Business Processes. You will be briefly introduced to the concept of complex event processing (Drools CEP) where you will learn how to aggregate and correlate your data based on temporal conditions. You will also learn how to define rules using domain-specific languages, such as spreadsheets, database entries, PMML, and more. Towards the end, this book will take you through the integration of Drools with the Spring and Camel frameworks for more complex applications. Style and approach Approached from a developer’s perspective, the book teaches you all the advanced concepts of Business Rules applicable examples with helpful screenshots, diagrams, tutorials, and examples.
目录展开

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部