Introduction to visual rules modeling - Presentation Transcript
eBusiness Technologies (ebTech) Introduction to visual rules modeling Adrian Giurca, eBusiness Technologies, Craiova, March 2009 Dr. Adrian Giurca Brandenburg University of Technology Cottbus, Germany
Rules in "real life"
IF the customer is a gold customer and its current shopping cart is more than 150 EUR THEN set a 5% discount to the shopping cart.
IF the customer is a platinum customer and its current shopping cart is more than 500 EUR THEN set a 15% discount to the shopping cart.
All platinum customers are gold customers.
Adrian Giurca, eBusiness Technologies, Craiova, March 2009
Real rules are based on vocabularies
Classes
Customer
Shopping cart
Properties
discount
customerName
Adrian Giurca, eBusiness Technologies, Craiova, March 2009
Q: How we discover them?
A: As in Software Engineering Design
Vocabularies (1)
Software engineers represents vocabularies with the help of UML class diagrams
Different constraints are expressed with OCL
Adrian Giurca, eBusiness Technologies, Craiova, March 2009
Vocabularies (2)
Semantic Web community represents vocabularies with RDFS and/or OWL
UML provides a visual notation but a more complex XML serialization (XMI)
RDFS/OWL provides XML syntax but no visual notation. The XML syntax is not based on XML Schema/RelaxNG therefore special validators are necessary
UML provides support for packaging
RDFS/OWL use XML namespaces
Adrian Giurca, eBusiness Technologies, Craiova, March 2009
Modeling Rules
Q: Why to use a modeling language for rules?
A: Simply because natural language is sometimes ambiguous and we don't know how to encode the rule
Remember also the logic controversy...
Do you remember it?
Adrian Giurca, eBusiness Technologies, Craiova, March 2009
Vocabularies and rules Adrian Giurca, eBusiness Technologies, Craiova, March 2009 Rule: If rental car is stored at the branch and rental car is not assigned to any rental and it is not a rental car scheduled for service then rental car is available at the branch.
UML-based Rule Modeling Language
Any person being a male and is not a husband is a bachelor .
Adrian Giurca, eBusiness Technologies, Craiova, March 2009 bachelor(X):- male(X), not(husband(X)).
If-Then-Else Rule Adrian Giurca, eBusiness Technologies, Craiova, March 2009
If the order value is less than 1000 give a discount of 3% otherwise give 6%.
Derived Association Rule Example Adrian Giurca, eBusiness Technologies, Craiova, March 2009
Your knowledge on rules
Do you know rule languages?
Adrian Giurca, eBusiness Technologies, Craiova, March 2009 Drools?
Do you use rule languages?
Drools?
What rule-based applications you built?
Have you finished your first Drools example? I will not work for you
Do you like rule-based applications? Adrian Giurca, eBusiness Technologies, Craiova, March 2009 Tower of Babel - Pieter Bruegel (1563)
0 comments
Post a comment