# Różnice

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

 — pl:dydaktyka:dss:lab06 [2019/06/27 15:50] (aktualna) 2018/11/19 06:17 kkluza utworzono 2018/11/19 06:17 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: ​ + + + 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. + ​ + + 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: 2019/06/27 15:50 (edycja zewnętrzna)