Simplifying the Development of Rules Using Domain Specific Languages in DROOLS



Similar documents
Knowledge Engineering for Business Rules in PROLOG

A methodology for graphical modeling of business rules

Metastorm BPM Interwoven Integration. Process Mapping solutions. Metastorm BPM Interwoven Integration. Introduction. The solution

A Rules Engine Experiment: Lessons Learned on When and How to use a Rules-Based Solution

IBM WebSphere ILOG Rules for.net

Source Code Translation

Software Development Kit

Authoring for System Center 2012 Operations Manager

Open source business rules management system

Integration of an open source rule engine to enhance the IHTSDO Workbench testing

JBoss ESB 4.3 GA. Content Based Routing JBESB CBR 5/20/08 JBESB-CBR-5/20/08

SharePoint 2013 for Business Process Automation

Performance Management Platform

YouTrack MPS case study

Using EMC Documentum with Adobe LiveCycle ES

Introduction to Generative Software Development

Open Source Business Rules Management System Enables Active Decisions

Cleo Communications. CUEScript Training

EMC Documentum Composer

An Oracle White Paper October Oracle Data Integrator 12c New Features Overview

Taking Subversion to a Higher Level. Branching/Merging Support. Component Management Support. And More

Embedded Software Development with MPS

Oracle Data Integrator 12c: Integration and Administration

BUSINESS RULES CONCEPTS... 2 BUSINESS RULE ENGINE ARCHITECTURE By using the RETE Algorithm Benefits of RETE Algorithm...

DIGITAL ASSET MANAGEMENT

Microsoft' Excel & Access Integration

This presentation will provide a brief introduction to Rational Application Developer V7.5.

XFlash A Web Application Design Framework with Model-Driven Methodology

D83167 Oracle Data Integrator 12c: Integration and Administration

Community Edition. Master Data Management 3.X. Administrator Guide

Practical Techniques for Resolving Conflicts among Business Rules

estatistik.core: COLLECTING RAW DATA FROM ERP SYSTEMS

Delegated Administration Quick Start

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Programmabilty. Programmability in Microsoft Dynamics AX Microsoft Dynamics AX White Paper

Drools: The Business Logic Integration Platform

Answers to Top BRMS Questions

Winery A Modeling Tool for TOSCA-based Cloud Applications

COCOVILA Compiler-Compiler for Visual Languages

Building and Using Web Services With JDeveloper 11g

WebSphere Business Modeler

Workflow and Forms Services for People-Driven Process Management

NASCIO EA Development Tool-Kit Solution Architecture. Version 3.0

Programming with the Microsoft.NET Framework Using Microsoft Visual Studio 2005 (VB)

Implementing reusable software components for SNOMED CT diagram and expression concept representations

The ADOxx Metamodelling Platform Workshop "Methods as Plug-Ins for Meta-Modelling" in conjunction with "Modellierung 2010", Klagenfurt

INSPIRE Dashboard. Technical scenario

Test Data Management Concepts

Foglight. Dashboard Support Guide

Setup Guide Central Monitoring of SAP NetWeaver Proces Integration 7.3 with SAP Solution Manager 7.1. Active Global Support February 2011

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

The SharePoint Maturity Model

Practical application of SAS Clinical Data Integration Server for conversion to SDTM data

Dynamic Decision-Making Web Services Using SAS Stored Processes and SAS Business Rules Manager

K-SITE RULES: Integrating Business Rules in the mainstream software engineering practice

Integration of DB oriented CAD systems with Product Lifecycle Management

C2C: An Automated Deployment Framework for Distributed Applications on Multi-Clouds

SOFTWARE TESTING TRAINING COURSES CONTENTS

Basic SQL Server operations

SharePoint Training DVD Videos

CMDB Federation. DMTF Standards for Federating CMDBs and other Management Data Repositories

CHAPTER 20 TESING WEB APPLICATIONS. Overview

BizTalk Server Business Activity Monitoring. Microsoft Corporation Published: April Abstract

Course: 10174B: Configuring and Administering Microsoft SharePoint 2010

The Intelligent Content Framework

Oracle Data Integrator 11g: Integration and Administration

Explorer's Guide to the Semantic Web

QUALIFICATIONS PACK - OCCUPATIONAL STANDARDS FOR IT-ITeS INDUSTRY. SUB-SECTOR: Software Products. OCCUPATION: Product Development and Delivery

Contents. QUALIFICATIONS PACK - OCCUPATIONAL STANDARDS FOR IT-ITeS INDUSTRY. Introduction. Qualifications Pack-Software Developer

MD Link Integration MDI Solutions Limited

Report Writer's Guide Release 14.1

Analysis of the Specifics for a Business Rules Engine Based Projects

Integration of Application Business Logic and Business Rules with DSL and AOP

Tools for DICOM Implementation

Open EMS Suite. O&M Agent. Functional Overview Version 1.2. Nokia Siemens Networks 1 (18)

Microsoft Dynamics CRM2015 Fast Track for developers

Pro/INTRALINK 9.0/9.1 Curriculum Guide

Developing Microsoft SharePoint Server 2013 Advanced Solutions MOC 20489

EUROPASS DIPLOMA SUPPLEMENT

MatchPoint Technical Features Tutorial Colygon AG Version 1.0

Lavastorm Resolution Center 2.2 Release Frequently Asked Questions

Integrity 10. Curriculum Guide

II. PREVIOUS RELATED WORK

1 External Model Access

FreeForm Designer. Phone: Fax: POB 8792, Natanya, Israel Document2

How to Build Successful DSL s. Jos Warmer Leendert Versluijs

Introduction to XML Applications

EVALUATION. WA1844 WebSphere Process Server 7.0 Programming Using WebSphere Integration COPY. Developer

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases

Business Object Document (BOD) Message Architecture for OAGIS Release 9.+

A Mind Map Based Framework for Automated Software Log File Analysis

MicroStrategy Course Catalog

Talend Open Studio for MDM. Getting Started Guide 6.0.0

Technical. Overview. ~ a ~ irods version 4.x

UIMA and WebContent: Complementary Frameworks for Building Semantic Web Applications

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Transcription:

Simplifying the Development of Rules Using Domain Specific Languages in DROOLS Ludwig Ostermayer, Geng Sun, Dietmar Seipel University of Würzburg, Dept. of Computer Science INAP 2013 Kiel, 12.09.2013

1 Introduction 2 DROOLS DROOLS Rule Language DSLs in DROOLS 3 DSL Design DSL Templates Annotations 4 The Tool DSL Editor DSL Rule Editor Attribute Editor 5 PROLOG Based Analysis Templates Rules

Introduction the business rules approach provides a methodology for system development creating applications as white boxes business logic is visible, because it is separated into business rules Business Rule Management Systems (BRMS) have been developed in BRMS you can define, deploy, execute, monitor, and maintain decision logic DROOLS is a BRMS a Domain Specific Language (DSL) is a programming language of limited expressiveness for a particular problem domain the DSL Rule Generator (DSLR) is a tool improving the development process in DROOLS

BRMS Project Project with Trinodis GmbH: development of business rules applications usage of PROLOG technology and related technology several case studies in real business scenarios analysis of business rules business analyst friendly annotation of business rules

Introducing DROOLS DROOLS the Business Logic Integration Platform JAVA based developed by the JBOSS community DROOLS consists of several modules: Expert (Inference Engine) Guvnor (Business Rules Manager) Fusion (Event Processing/Temporal Reasoning) Planner (Automated Planning)

Production Rule System DROOLS EXPERT

DROOLS Rule Language formerly: rules were written in XML XML format is not supported any more now: rules are written basically in the DROOLS Rule Languange simple text files with the extension.drl rules are packed by namespaces referred to as package global variables can be defined and used within rules via the globals statement complex logic can be outsourced and used within rules via the functions statement

A Rule in the DROOLS Rule Language package LoanApproval rule "microfinance" when application: Application( loan_amount < 10000, duration_year < 5 ) customer: Customer( credit_report == "good" ) then application.approval(); application.setinterest_rate(0.028); end

DSLs in DROOLS rules in a DSL are developed in DROOLS in two steps first step: designing DSL expressions with the mapping information to the DROOLS Rule Language save to a file with extension.dsl second step: use the expressions of the DSL to write rules save into a file with the extension.dslr DROOLS transforms the rules of the.dslr-file internally into the DROOLS Rule Language usage of the mapping information contained in the.dsl-file

Fragment of a.dsl-file [when] The customer with monthly_income is greater than {value1} and credit_report is {value2} = customer: Customer( monthly_income > {value1}, credit_report == {value2} ) [when] indicates the expression as condition [then] is used for an action block the single equality sign = separates the expressions in DSL format from the corresponding DRL format

A Rule written in the DSL rule "microfinance" when The loan with loan_amount is smaller than 5000 and duration_year is no more than 3 The customer with monthly_income is greater than 2000 and credit_report is "good" then The loan will be approved Set the interest_rate of the loan to 0.025 end

DROOLS DSL Editor a very basic DSL editor lacks user friendliness and functionality no content assist no package explorer for JAVA classes, attributes or methods no component to simply create rules in a DSL lacks reusability

DSLR Generator a few guided steps to create rules in a readable format and with correct syntax development a DSL with the aid of generic templates graphical editors help during the construction of syntactical correct rules a brief example illustrating the usage

A Template for a DSL Expression The #instance with #field is smaller than {value} = #instance: #class(#field < {value}) generic templates for expressions containing the mapping information between DSL and DRL keywords and parameters in a template can be replaced templates are designed in JAVA but transformed to XML to improve readability

Fragment of a Template in XML Format <template> <class>#class</class> <instance>#instance</instance>... <condition> <domain>common</domain> <dsl> <expression> The #instance with #field is smaller than {value} </expression> <code> #instance:#class(#field < {value}) </code> </dsl> </condition>

Annotations form of syntactic meta-data added to JAVA source code used to accomplish multilingual DSLs classes, attributes and methods can be annotated keywords are replaced by annotation values @EnExpression(value = "amount of loan") @GerExpression(value = "Kredithoehe") private double loan_amount;

Components 5 components for the creation of rules, each has a graphical user interface Basic DSL Editor designing simple expressions Complex Condition Editor composing conditions DSL Rule Editor designing rules Value Editor assigning values Attribute Editor editing meta-data of rules

Basic DSL Editor

Complex Condition Editor

DSL Rule Editor

Value Editor

Attribute Editor

A Simple Rule created with DSLR Generator rule "microfinance" when The loan with amount of loan is smaller than 5000 and the duration in years is no more than 3 The customer with monthly income in dollar is greater than 2000 and the credit report is "good" then The loan will be approved Set the rate of interest of the loan to 0.075 end

PROLOG Based Analysis Templates Rules duplicates keywords... analysis of the rules created with templates analysis and visualization of the interaction of rules anomalies: duplicates contradictions ambiguities

Analysis of Templates <template> <class>#class</class> <instance>#instance</instance>... <condition> <domain>common</domain> <dsl> <expression> The #instance with #field is smaller than {value} </expression> <code> #instance:#class(#field < {value}) </code> </dsl> </condition>

Anomalies in Templates analysis and update with the XML query, transformation and update language FNQUERY dsl anomaly(+dsl 1, +DSL 2, -Anomaly): checks <dsl> elements for anomalies dsl_anomaly(dsl_1, Dsl_2, Anomaly) :- member(tag, [expression, code]), X := Dsl_1/Tag, Y := Dsl_2/Tag, equivalent(x, Y), Anomaly = duplicate(tag, X, Y).

Analysis of Rules package LoanApproval rule "microfinance" when application: Application( loan_amount < 10000, duration_year < 5 ) customer: Customer( credit_report == "good" ) then application.approval(); application.setinterest_rate(0.028); end

Transformation to Logical Rules set the status to approved and the interest rate to 0.028 application( Cid, Loan, Duration, A, B, 0.028, approved) :- application(cid, Loan, Duration, A, B, _, _), Loan < 5000, Duration < 3, customer(cid, _, Credit_Report, Income), Income > 2000, Credit_Report = good. Transformed rules are analyzed, but usually cannot be executed.

Rule Anomalies If there is a condition referencing a fact with identifier Id, e.g., application, and an instruction modifyobject(id) in the action block, then DROOLS fires all appropriate rules again, which results in a loop. This can be avoided by the no-loop attribute. drools anomaly(+prolog, -Anomaly) reports the anomalies on backtracking. Further anomalies: duplicates, contradictions, in connection with prioritization.

Visualization: Proof Trees red circles: derived atoms blue boxes: rule nodes are labeled by numbers orange circles: basic predicates from the configuration

Conclusions What we have presented: a tool, DSLR Generator, for handling DSLs graphical user interfaces supporting the rule development reusable and generic DSL templates maintenance of the meta data for the rules analysis of templates Future work: extension of the PROLOG based anomaly analysis, especially for rules a library of DSL templates for various problem domains

Thank You for Your Attention Questions? http://www1.informatik.uni-wuerzburg.de/en/staff/ostermayer ludwig/ ludwig.ostermayer@uni-wuerzburg.de