Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:dydaktyka:dss:lab06 [2018/11/19 05:17] (aktualna)
kkluza utworzono
Linia 1: Linia 1:
 +====== Manual rules modeling ======
 +
 +Rules can constitute a useful knowledge representation for low-level logic in process tasks. ​
 +
 +During this tutorial, we will try to create decision tables which can model decision logic in business processes.
 +For this purpose, we will use Decision Model and Notation (DMN).
 +
 +===== Short example with DMN model =====
 +
 +Business rules can be represented in various ways, the most popular ones are just sets of production rules ('''​if ... then ...'''​). Such sets can be also represented in a more compact way using decision trees or decision tables. Look at the following example of determining a rented car category for a customer. The rented car category corresponds to Euro Car Segment classification,​ and it is based on the driver age and driving license holding period: ​
 +
 +<code pascal>
 +If driver age is below 18, 
 + then driver can not rent a car.
 +If driver age is below 21 
 +and driving license holding period is below 2, 
 + then driver can only rent a car of rented car category A.
 +If driver age is below 21 
 +and driving license holding period is above or equal 2, 
 + then driver can rent a car of rented car category A or B.
 +If driver age is at least 21 
 +and driving license holding period is below 2, 
 + then driver can rent a car of rented car category A, B, or C.
 +If driver age is at least 21 
 +and driving license holding period is at least 2, 
 + then driver can rent a car of rented car category A, B, C, or D.
 +</​code>​
 +
 +The presented rule set is described in natural language. But there are ways to formalize such description using e.g., Attributive Logic. In such case, some concepts would become attributes and some of them will be values from their domains. ​
 +Some operators can be interchangeable,​ e.g., is above or equal and is at least.
 +
 +==== Rule set in pure BPMN model ====
 +
 +In BPMN, we could represent these rules in the following way:
 +
 +{{:​pl:​dydaktyka:​dss:​lab:​bpmn-rules-toocomplex.png?​600|}}
 +
 +However, this is not a good way of modeling processes. Maintaining such a model is a hard task and its complexity is very high.
 +
 +A much better solution is to use DMN for this purpose. Then, our BPMN and DMN models will look as follows (the notations are grouped in the diagram for the explanation,​ and these rectangles are not a part of these notations):
 +
 +{{:​pl:​dydaktyka:​dss:​lab:​bpmnanddmnen.png?​600|}}
 +
 +This simple DMN model consists of 2 various elements: **Decisions** and **Input Data**. The arrows indicate which input data will be considered as an input for the decision.
 +
 +==== Rule set in pure DMN model ====
 +
 +The same rules as in the previous example, we can model using DMN specification in the following decision table:
 +
 +{{:​pl:​dydaktyka:​dss:​lab:​dec-table-example.png?​600|}} ​
 +
 +Such a decision table consists of the following elements:
 +
 +{{:​pl:​dydaktyka:​dss:​lab:​dmn-table.png?​600|}}
 +
 +==== Testing DMN model using Camunda simulator ====
 +
 +Using [[https://​camunda.com/​dmn/​simulator/​|Camunda simulator]],​ we can test our decision table:
 +
 +{{:​pl:​dydaktyka:​dss:​lab:​dmn-simulation.png?​600|}}
 +
 +==== Exercise ====
 +
 +Using any of the available DMN tools prepare the decision table for the example described above:
 +  * https://​demo.bpmn.io/​dmn
 +  * https://​academic.signavio.com
 +
 +Short tutorials for DMN you can find on:
 +  * https://​camunda.com/​dmn/​
 +  * https://​docs.signavio.com/​userguide/​editor/​en/​modeling_and_notations/​dmn/​index.html
 +
 +===== Group Assignment =====
 +
 +Extend your models depicting the process of admission to the AGH University of Science and Technology with some DMN model and at least one decision table. During the next lab class, all groups will be presenting their models, and we will discuss the issues of BPMN and DMN modeling as well as the assignment for December. ​
 +
 +You should deliver the model files (XML and PDF) as attachments before the next class!
  
pl/dydaktyka/dss/lab06.txt · ostatnio zmienione: 2018/11/19 05:17 przez kkluza
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0