Table of Contents

View page as slide show Export page to Open Document format

Visual Business Rules and Process Modeling

Krzysztof Kluza kluza@agh.edu.pl, Grzegorz J. Nalepa gjn@agh.edu.pl




Outline

Introduction

UML Trajectory

Example of Booch class diagram Example of OMT object diagram

Unified Modeling Language (UML) Today

The Meta-Object Facility (MOF)

MOF Layers

Layers Content Example
M3 metamodeling lang specification Meta-Object Facility (MOF)
M2 model of metalanguage (language specification) SQL, UML, XML specifications
M1 metadata, syntax & semantic desc db schema, class model, DTD (def of XML document)
M0 data data in DB, objects (instances), XML documents

The Object Constraint Language (OCL)

context Person
   inv: self.supervisor.grade.value > self.grade.value

Selected challenges

Grammars vs MOF

Grammar2MOF example


program:	(vardefinition | assignment)*
vardefinition: 	type IDENT !SEMICOLON
type: 		(INT | FLOAT)
assignment: 	IDENT !BECOMES expression !SEMICOLON
expression: 	(IDENT | NUMBER) (PLUS expression)?

a UML-Based Rule Modeling Language (URML)

URML examples (DR)

A bachelor is a male that is not a husband.

URML examples (PR)

If the reservation date of a rental is 5 days before the start date of a rental, then grant the rental a discount of 10.

URML summary

The Production Rule Representation (PRR) [specification Beta 1]

A production rule is a statement of programming logic that specifies the execution of one or more actions in the case that its conditions are satisfied.

The production rule is typically represented as:

if [condition-list] then [action-list]

Example of PRR from specification Beta 1:

rule noCDItem {
 when { 
    ?customer1: Customer(); 
    ?shoppingCart1: ShoppingCart(customer == ?customer1); 
    not Item(type == ItemType.CD ; shoppingCart == ?shoppingCart1);
 } then { 
    modify ?customer1{ hyperlinkToCD = true; }
 } 
}
Rule noCDItem
ruleVariable:
 ?customer: Customer = Customer->any()
 ?sCart: ShoppingCart = ShoppingCart->any(c:customer|c=?customer)
 ?cdItems: Set = ?sCart.items->select(e:items|e.type=ItemType.CD)
Condition:
 ?cdItems.isEmpty()
Action:
 ?customer.hyperlinkToCD = true

PRR Summary

The Business Process Modeling Notation (BPMN)

Example of elements


Example of usage BPMN

BMPN summary

Business rules

BR Example

Example of detailed business rule

The description defines the rule exactly (text, flow charts, UML activity diagrams, OCL, ILOG rules language, BRML…).

BR representation

The lower bound must be a non-negative integer literal.

lowerBound()->notEmpty() implies lowerBound() >= 0

UServ

UServ Financial Services case study:

UServ BR in URML

Example for Eligibility Business Rules / Automobile Eligibility / Potential Theft Category eg.

UServ Business Rules

UServ Business Process Model

HeKatE

Our goals/tasks

ARD

Proposed model of ARD is based on component diagrams. ARD contains diferent kind of UML dependencies such as:

ARD example (1)

Example of ARD diagram:
<graphviz file=“hekate:therm-a8.dot”></graphviz>

UML model of that ARD diagram:
:pl:miw:miw08_umlandardxtt:umlandard:approach3_ard_8.png

ARD example (2)

Exemplary fragment of TPH diagram showing «trace» dependecy in model:
<<trace>> dependecy in model of TPH

TPH


TPH diagram UML model of TPH diagram
:pl:miw:miw08_umlandardxtt:umlandard:approach3_tph_8.png

XTT

Proposed model of XTT is based on activity diagrams, which are related to flow diagrams and can illustrate the activities taking place in the system.

Algorithm step 1

All input attributes become input parameters and output attribute becomes output parameter of an activity
(for the sake of transparency the diagram can be divided into partitions with a swimlane).

:pl:miw:miw08_umlandardxtt:algorithm_step1.png

Algorithm step 2

For each attribute (activity parameter), if there is more than one unique value in the XTT add a decision node
and for every unique value of attribute needs to be added:

:pl:miw:miw08_umlandardxtt:algorithm_step2.png

Algorithm step 3

For each rule (a row in XTT) draw a join node with the number of inputs equal to the number of input parameters and one output. For each join node:

:pl:miw:miw08_umlandardxtt:algorithm_step3.png

Algorithm step 4

Outputs of all actions are merged in a merge node and a flow is lead to output parameter of activity.

:pl:miw:miw08_umlandardxtt:algorithm_step4.png

XTT th table representation example


Activity diagram for XTT th table:
:pl:miw:miw08_umlandardxtt:xtt_th.png:pl:miw:miw08_umlandardxtt:th_3.png

Thermostat Case

Activity diagram for the whole XTT of thermostat:
:pl:miw:miw08_umlandardxtt:uml_activity_xtt_3.png

Evaluation

Proposed representation:

Future work

Thank you





Questions…