Apidays New York 2024 - The value of a flexible API Management solution for O...
Â
Drools5 Community Training HandsOn 2 DSL & Spreadsheets
1. Â
Â
Drools5 Community Training
Hands On DSL & Decision Tables
Sponsored by Plugtree
2. Hands On 2: Drools Expert
DSL & Decision Tables
Drools5 Community Training
version: 1.0-SNAPSHOT
Release Date: 09/05/2011
Under The Creative Common License
3. Hands On 2: Drools Expert
DSL & Decision Tables
Drools5 Community Training Course
by Mauricio "Salaboy" Salatino and
Esteban Aliverti is licensed under a
Creative Commons Attribution 3.0
Unported License.
Based on a work at salaboy.wordpress.
com.
Permissions beyond the scope of this
license may be available at http:
//salaboy.wordpress.com/.
4. Decision Tables
â Decision Tables Example
â Project: drools/04-DroolsExpert-Spreadsheet
â Test Class: SpreadsheetExampleTest.java
â Rules: /rules/CreditRules.xls
â Open the Spreadsheet and take a look at the structure
â Take a look at the vanilla DRL generated by the
compiler
5. Decision Tables
â Exercise 1
â Open SpreadsheetHandsOnLabsTest.java and
HandsOnLabsRules.drl
â Run the test and get familiar with it
â Replace HandsOnLabsRules.drl by a Decision Table in xls
format!
6. Domain Specific Language
â Domain Specific Languange Example:
â Project drools/05-DroolsExpert-DSLSimple
â Test Class: DSLExampleTest.java
â Rules: /rules/CustomLanguage.dsl, /rules/Rules.dslr
â Open the DSL file
â Look at the mappings for conditions and
consequences + the variables mappings
â Open the DSLR file
â Look how it uses the DSL sentences