Cover image for Drools JBoss Rules 5.5 Developer’s Guide.
Drools JBoss Rules 5.5 Developer’s Guide.
Title:
Drools JBoss Rules 5.5 Developer’s Guide.
Author:
Bali, Michal.
ISBN:
9781782161271
Personal Author:
Physical Description:
1 online resource (365 pages)
Contents:
Drools JBoss Rules 5.X Developer's Guide -- Table of Contents -- Drools JBoss Rules 5.X Developer's Guide -- Credits -- About the Author -- About the Reviewers -- www.PacktPub.com -- Support files, eBooks, discount offers and more -- Why Subscribe? -- Free Access for Packt account holders -- 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. Programming Declaratively -- Problems with traditional approaches -- The solution -- Advantages -- Disadvantages -- When not to use a rule engine -- Drools -- Summary -- 2. Writing Basic Rules -- Rule basics -- Executing rules -- Rule syntax -- Rule concepts -- Variables in rules -- Types -- Comments -- Package -- Imports -- Global variables -- Functions -- Type declarations -- Dialect -- Rule condition -- The and element -- The or element -- The not element -- The exists element -- The eval element -- The return element -- The inline eval element -- Nested accessors -- Null-safe dereferencing operator -- The keyword - this -- Free form expressions -- Working with collections -- The contains (Not) operator -- The memberOf (Not) operator -- The from operator -- Rule consequence -- Rule attributes -- The salience (priority) attribute -- The no-loop attribute -- Dialect -- Summary -- 3. Validating -- Banking domain model -- Problem definition -- Analysis -- Design -- Validation package -- Object required type rules -- Testing -- Batch execution -- Minimal account balance rule -- Student account rule -- Unique account number rule -- Implementation -- Validation service -- Summary -- 4. Transforming Data -- Process overview -- Getting the data -- Loading facts into the rule session -- Writing transformation rules -- Testing -- Address normalization.

Testing the findAddress rule -- Unknown country -- Currency conversion -- One account allowed -- Transformation results -- Implementation of the data loading -- Database setup -- Project setup -- iBatis configuration -- Running iBatis -- Alternative data loading -- Summary -- 5. Creating Human-readable Rules -- Domain-specific language -- DSL as an interface -- DSL for validation rules -- File formats -- The DSL file format -- The DRL file format -- The DSLR file format -- DSL for multiple constraints in a condition -- Named capture groups -- The transformation functions -- DSL for data transformation rules -- The decision tables -- Advantages of a decision table -- Disadvantages of a decision table -- Calculating the interest rate -- Project setup -- Testing -- Comma separated values -- Rule templates -- jBPM -- Drools agenda -- Methods for managing the rule execution order -- The ruleflow-group attribute -- Start event -- End event -- Script task -- Rule task -- Gateway - diverging -- Gateway - converge -- Example - defining an execution order -- Rules -- KnowledgeBase set up -- Tests -- Summary -- 6. Working with Stateful Session -- StatefulKnowledgeSession -- Validation using stateful session -- Design overview -- Stateful Validation Service -- Integration testing -- Logical assertions -- Keeping the validation report up-to-date -- The collect conditional element -- collect -- Serialization -- Knowledge session recreation -- Testing -- Session serialization -- Full session serialization -- Summary -- 7. Complex Event Processing -- CEP and ESP -- Drools Fusion -- Fraud detection -- Problem description -- Design and modeling -- Fraud detection rules -- Notification -- Test configuration setup -- Testing the notification rule -- Monitoring averageBalanceQuery -- Testing the averageBalanceQuery -- Two large withdrawals.

Testing the twoLargeWithdrawals rule -- Sequence of increasing withdrawals -- Average balance test -- Looping prevention - property reactive -- Testing the sequenceOfIncreasingWithdrawals rule -- High activity -- Testing the highActivity rule -- Summary -- 8. Defining Processes with jBPM -- Loan approval service -- Model -- Loan approval process -- Invalid loan application form -- E-mail work item -- Error event -- Test setup -- Testing the Validated? node's otherwise branch -- The size of the loan -- Test for a small loan -- Rating Calculation -- Subprocess -- Subprocess diagram -- Rating a calculation subprocess test -- Setting the rating using an on-exit action -- Decisions on rating -- Testing the Rating? node -- The Transfer Funds work item -- The work item definition -- Work item registration -- Work item handler -- Work item handler registration -- Testing the transfer work item -- Human task -- Test for the human task -- Final approval -- Test for the Approve Event node -- Banking service -- Disadvantages of a process -- Summary -- 9. Building a Sample Application -- Users -- Architecture -- Technologies used -- Additional Drools projects used -- Libraries used -- Business logic -- Design -- Configuration -- JPA annotations for domain objects -- JPA configuration -- Spring framework configuration -- Web application setup -- Deployment -- Repositories -- Validation -- Services -- Transactions -- Presentation layer -- Localized messages -- Customer save form controller -- The Complex Event Processing service -- Loan approval -- The Loan Request form -- Process persistence -- Task list -- Transactions -- Working on a task -- Problem 1 - joinTransaction -- Problem 2 - processing does not continue -- Loan approval event -- Summary -- 10. Testing -- Writing unit tests for rules -- Rule integration testing -- Rule acceptance testing.

Creating a test scenario -- Running a test scenario -- Running all test scenarios -- Static analysis of rules -- Troubleshooting techniques -- Event listeners -- Debugging -- jBPM -- Debugging rule conditions -- Source of generated classes -- Summary -- 11. Integrating -- Dynamic KnowledgeBase loading -- KnowedgeAgent -- External artifact building -- Building with Ant -- Drools Camel server -- Interest rate calculation example -- The server -- The client -- Spring framework integration -- Standards -- Summary -- 12. Learning about Performance -- Rete algorithm -- Node types -- The Rete node -- EntryPointNode -- ObjectTypeNode -- AlphaNode -- LeftInputAdapterNode -- TerminalNode -- Example 1 - inserting a fact -- BetaNode -- Example 2 - inserting a fact -- More complex example -- EvalConditionNode and FromNode -- Retracting or modifying a fact -- Initial fact -- Node sharing -- Example -- Node indexing -- The AlphaNode indexing -- Computation complexity -- The BetaNode indexing -- Example -- Left and right unlinking -- The KnowledgeBase partitioning -- Parallel execution -- Summary -- A. Setting Up the Development Environment -- Environment setup -- Dependencies and their licenses -- B. Creating Custom Operators -- Summary -- C. Dependencies of Sample Application -- Index.
Abstract:
The chapters in the book present reallife examples, usually starting with an introduction to the problem, and a discussion of the possible solution. Then the solution is implemented in a step by step fashion implementing several rules.The book is for Java developers who want to create rulebased business logic using the Drools platform.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: