Decision Modelling SS21 - DigiBP/digibp.github.io GitHub Wiki

This in-class hands-on gives you a basic introduction into Decision modelling, integration with Business Process models and execution of models on the Camunda platform.

Contents:

Scenario:

Mario hails from Naples. He opened a Pizzeria in Muttenz since 2 months. He is married to Nadine from Appenzell.

Mario makes great pizza. There is already a very high order volume. But Nadine thinks it’s due to money laundering. She asked us to help her!

Task: Identify when money laundering may occur.

1. Execute Decision Model using a simulator

Please carry out the following steps to execute a ready decision model using the Camunda simulator:

  1. Download the decision table (DT) “First semplified DMN.zip” from Moodle
  2. Go to: https://camunda.com/dmn/simulator/
  3. Drag&Drop the DT into the DMN Simulator
  4. Execute the DT by clicking on "Simulate now"

2. Model rules to detect possible money laundering

a. Extend the DT with an additional column "Payment Method" with input and output as shown below:

b. Based on the scenario, an additional Data Input for the possible detection of money laundering is the entity type of whom made the payment Entity: Legal vs Private

A possible rule is: IF Payment Method is Invoice AND Entity is legal AND Order Volume is between 300 and 1200, THEN Scoring = Orange and Explanation = "We need to run a credit check"

Solution: Introduce a column "legalEntity" in the DT. Generate additional rules to identify cases of money laundering and complete the DT with "Unique" hit policy.

Execute the new DT on Camunda DMN simulator

3. Business Process and Decision Model Integration

a. Integration

  1. Download “Final_DMN_(UNIQUE).zip” from Moodle
  2. Download “BP_with_EMPTY_Payment_Score.zip” from Moodle
  3. Fill in the needed information in the business rule task (in BP):

Select the user task "Take pizza order".

Click on the Forms tab of the properties of the above user task. Include all fields involved in calculation of the scoring based on the DT to be integrated. Please note that the form fields are case-sensitive:

pizzaPrice
legalEntity
paymentMethod
scoring
explanation

  1. Make sure that entry names are consistent with names in the DMN decision table:

Ensure that the form field names match the input expression of the corresponding column in DT (and not the label of the column, eg. Payment Method).

The name of the Decision table should match the Decision Ref field in the process model. The Result Variable is case-sensitive as well:

scoringResult

Configure the Input Parameters as shown below:

Configure the Output Parameters as shown below:

b. Deployment

  1. Deploy DMN Decision Model in the Classroom Instance. Deployment URL: https://digibp.herokuapp.com/engine-rest
  2. Deploy Business Process Model in the Classroom Instance using your tenant Id. Deployment URL: https://digibp.herokuapp.com/engine-rest
  3. Run the process. Link: digibp.herokuapp.com