Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of contents

Table of Contents

Example Decision Requirements Graph

Image Added

XML representation

In the example decision requirements graph (DRG), the decision was made on the amount of a monthly installment. When storing this decision in the trace engine, an XML representation of that decision is generated. The XML document contains the entire DRG from the image shown above. All the XML components for a single DRG are placed between the definitions start and end tag.

This document describes how the decision graph is stored in such a way it follows the XSD of the DMN specification.

The goal of storing a decision is that an organization can rebuild a model of the decisions that has been made by the runtime. By rebuilding the decisions with the values organization have insight how decisions are made. The meta model for the exchange of decisions according to the DMN specifications prescribes that each decision, each, Business knowledge model and each input is a separate DMN element. So for each type a description will be given here how the information will be stored. 

More information on the specification of the meta model and the XSD can be found here: http://www.omg.org/spec/DMN/1.0/Beta1/

 

Image Removed

Description of all the parts of a DRG at runtime

 

Code Block
themeEclipse
languagexml
<?xml version="1.0" encoding="UTF-8"?>
<Definitions xmlns="http://www.omg.org/spec/DMN/20130901" xmlns:bq="http://www.blueriq.com/dmn/drg" id="DRG_for_PolicyHolderApplication.RiskScoreRequiredMonthlyInstallment" namespace="http://www.blueriq.com/dmn">
   <Decision id="decision1" name="PolicyHolderApplication.RiskScoreRequiredMonthlyInstallment">
      <bq:value>240<value>284.219374515558</bq:value>
      <bq:instanceId>fda7fa28instanceId>e2575ae5-013be344-4c1946bd-a22d88b5-ec63603c82b5<f5a98cb76ca8</bq:instanceId>
      <bq:sourceType>Default</bq:sourceType>
      <bq:justificationText justificationTextId="RiskscoreCalculation">The Riskscore depends on the number of years as a policyholder, the number of recent claims and previous fraude. A lower number means less risk. Riskscorecalculation: BaseAmountForRiskscore - BonusNumberOfYearsCustomer - RiskscorePenalties</bq:justificationText>
      <informationRequirement>
         <InformationItem id="decision1InformationItem0" name="PolicyHolder.BaseAmountForRiskScore" />
         <requiredDecision>decision2</requiredDecision>
      </informationRequirement>
      <informationRequirement>
         <InformationItem id="decision1InformationItem1" name="PolicyHolder.RiskScoreBonus" />
         <requiredDecision>decision3</requiredDecision>
      </informationRequirement>
      <informationRequirement>
         <InformationItem id="decision1InformationItem2" name="PolicyHolder.RiskScorePenalties" />
         <requiredDecision>decision5</requiredDecision>
      </informationRequirement>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel9</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision id="decision2" name="PolicyHolder.BaseAmountForRiskScore">
      <bq:value>50</bq:value>
      <bq:instanceId>fda7fa28-013b-4c19-a22d-ec63603c82b5</bq:instanceId>
      <bq:sourceType>Default</bq:sourceType>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel1</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision id="decision3" name="PolicyHolder.RiskScoreBonus">
      <bq:value>80</bq:value>
      <bq:instanceId>fda7fa28-013b-4c19-a22d-ec63603c82b5</bq:instanceId>
      <bq:sourceType>Default</bq:sourceType>
      <informationRequirement>
         <InformationItem id="decision3InformationItem0" name="PolicyHolder.BonusForNumberofYearsCustomer" />
         <requiredDecision>decision4</requiredDecision>
      </informationRequirement>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel3</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision id="decision4" name="PolicyHolder.BonusForNumberofYearsCustomer">
      <bq:value>80</bq:value>
      <bq:instanceId>fda7fa28-013b-4c19-a22d-ec63603c82b5</bq:instanceId>
      <bq:sourceType>Default</bq:sourceType>
      <informationRequirement>
         <InformationItem id="decision4InformationItem0" name="PolicyHolder.CustomerSince" />
         <requiredInput>inputData1</requiredInput>
      </informationRequirement>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel2</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision id="decision5" name="PolicyHolder.RiskScorePenalties">
      <bq:value>270</bq:value>
      <bq:instanceId>fda7fa28-013b-4c19-a22d-ec63603c82b5</bq:instanceId>
      <bq:sourceType>Default</bq:sourceType>RequiredMonthlyInstallmentCalculation">
		The formula is M = P * (J / (1 - (1 - (1 + J)^ -N)) - F. 
		M: monthly payment. 
		P: principal or amount of loan. 
		J: monthly interest; annual interest divided by 100, then divided by 12. 
		N: number of months of amortization, determined by length in years of loan. 
		F: monthly fee.
	  </bq:justificationText>
      <informationRequirement>
         <InformationItem id="decision5InformationItem0decision1InformationItem0" name="PolicyHolderRequestedProduct.PenaltyRiskScoreLast6MonthsAmount" />
         <requiredDecision>decision6<<requiredInput>inputData1</requiredDecision>requiredInput>
      </informationRequirement>
      <informationRequirement>
         <InformationItem id="decision5InformationItem1decision1InformationItem1" name="PolicyHolderControl.PenaltyRiskScoreBetween6MonthsAnd2YearsMonthlyInterest" />
         <requiredDecision>decision7<<requiredDecision>decision2</requiredDecision>
      </informationRequirement>
      <informationRequirement>
         <InformationItem id="decision5InformationItem2decision1InformationItem2" name="PolicyHolderRequestedProduct.PenaltyRiskScoreBetween2And4YearsTerm" />
         <requiredDecision>decision8<<requiredInput>inputData3</requiredDecision>requiredInput>
      </informationRequirement>
      <informationRequirement>
         <InformationItem id="decision5InformationItem3decision1InformationItem3" name="PolicyHolderRequestedProduct.PenaltyPreviousFraudeMonthlyFee" />
         <requiredDecision>decision9<<requiredDecision>decision3</requiredDecision>
      </informationRequirement>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel8<<requiredKnowledge>businessKnowledgeModel3</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision id="decision6decision2" name="PolicyHolderControl.PenaltyRiskScoreLast6MonthsMonthlyInterest">
      <bq:value>70<value>0.0050</bq:value>
      <bq:instanceId>fda7fa28instanceId>7e72ae81-013b34a8-4c194c52-a22d8538-ec63603c82b5<0e09549ab3fe</bq:instanceId>
      <bq:sourceType>Default</bq:sourceType>
      <informationRequirement>
         <InformationItem id="decision6InformationItem0decision2InformationItem0" name="PolicyHolderRequestedProduct.NrOfClaimsLastSixMonthsRate" />
         <requiredInput>inputData2</requiredInput>
      </informationRequirement>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel4<<requiredKnowledge>businessKnowledgeModel1</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision id="decision7decision3" name="PolicyHolderRequestedProduct.PenaltyRiskScoreBetween6MonthsAnd2YearsMonthlyFee">
      <bq:value>100<value>20.0</bq:value>
      <bq:instanceId>fda7fa28instanceId>e7b51f3c-013b0181-4c1942b9-a22d94f3-ec63603c82b5<dd6fc05ddae3</bq:instanceId>
      <bq:sourceType>Default<sourceType>System</bq:sourceType>
      <informationRequirement>
         <InformationItem id="decision7InformationItem0decision3InformationItem0" name="PolicyHolderRequestedProduct.NrOfClaimsBetween6MonthsAnd2YearsProductType" />
         <requiredInput>inputData3<<requiredInput>inputData4</requiredInput>
      </informationRequirement>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel5<<requiredKnowledge>businessKnowledgeModel2</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision<InputData id="decision8inputData1" name="PolicyHolderRequestedProduct.PenaltyRiskScoreBetween2And4YearsAmount">
      <bq:value>0<value>10000.0</bq:value>
      <bq:instanceId>fda7fa28instanceId>e7b51f3c-013b0181-4c1942b9-a22d94f3-ec63603c82b5<dd6fc05ddae3</bq:instanceId>
      <bq:sourceType>Default<sourceType>User</bq:sourceType>
      <informationRequirement>
         <InformationItem id="decision8InformationItem0" name="PolicyHolder.NrOfClaimsBetween2And4Years" />
         <requiredInput>inputData4</requiredInput>
      </informationRequirement>InputData>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel6</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <Decision <InputData id="decision9inputData2" name="PolicyHolderRequestedProduct.PenaltyPreviousFraudeRate">
      <bq:value>100<value>6.0</bq:value>
      <bq:instanceId>fda7fa28instanceId>e7b51f3c-013b0181-4c1942b9-a22d94f3-ec63603c82b5<dd6fc05ddae3</bq:instanceId>
      <bq:sourceType>System<sourceType>User</bq:sourceType>
      <informationRequirement>
         <InformationItem id="decision9InformationItem0" name="PolicyHolder.CommittedFraude" />
         <requiredInput>inputData5</requiredInput>
      </informationRequirement>
      <knowledgeRequirement>
         <requiredKnowledge>businessKnowledgeModel7</requiredKnowledge>
      </knowledgeRequirement>
   </Decision>
   <BusinessKnowledgeModel id="businessKnowledgeModel1" name="PolicyHolder.BaseAmountForRiskScore-default-value" />
   <BusinessKnowledgeModel id="businessKnowledgeModel2" name="PolicyHolder.BonusForNumberofYearsCustomer-default-expression" />
   <BusinessKnowledgeModel id="businessKnowledgeModel3" name="PolicyHolder.RiskScoreBonus-default-expression" />
   <BusinessKnowledgeModel id="businessKnowledgeModel4" name="PolicyHolder.PenaltyRiskScoreLast6Months-default-expression" />
   <BusinessKnowledgeModel id="businessKnowledgeModel5" name="PolicyHolder.PenaltyRiskScoreBetween6MonthsAnd2Years-default-expression" />
   <BusinessKnowledgeModel id="businessKnowledgeModel6" name="PolicyHolder.PenaltyRiskScoreBetween2And4Years-default-expression" />
   <BusinessKnowledgeModel id="businessKnowledgeModel7" name="PenaltyPreviousFraudeTrue" />
   <BusinessKnowledgeModel id="businessKnowledgeModel8" name="PolicyHolder.RiskScorePenalties-default-expression" />
   <BusinessKnowledgeModel id="businessKnowledgeModel9" name="PolicyHolder.RiskScore-default-expression" /></InputData>
   <InputData id="inputData1inputData3" name="PolicyHolderRequestedProduct.CustomerSinceTerm">
      <bq:value>2010-01-01<value>36.0</bq:value>
      <bq:instanceId>fda7fa28instanceId>e7b51f3c-013b0181-4c1942b9-a22d94f3-ec63603c82b5<dd6fc05ddae3</bq:instanceId>
      <bq:sourceType>User</bq:sourceType>
   </InputData>
   <InputData id="inputData2inputData4" name="PolicyHolderRequestedProduct.NrOfClaimsLastSixMonthsProductType">
      <bq:value>1<value>Standard loan</bq:value>
      <bq:instanceId>fda7fa28instanceId>e7b51f3c-013b0181-4c1942b9-a22d94f3-ec63603c82b5<dd6fc05ddae3</bq:instanceId>
      <bq:sourceType>User</bq:sourceType>
   </InputData>
   <InputData<BusinessKnowledgeModel id="inputData3businessKnowledgeModel1" name="PolicyHolder.NrOfClaimsBetween6MonthsAnd2Years">
      <bq:value>2</bq:value>
      <bq:instanceId>fda7fa28-013b-4c19-a22d-ec63603c82b5</bq:instanceId>
      <bq:sourceType>User</bq:sourceType>
   </InputData>
   <InputData id="inputData4Control.MonthlyInterest-default-expression" />
   <BusinessKnowledgeModel id="businessKnowledgeModel2" name="PolicyHolder.NrOfClaimsBetween2And4Years">
      <bq:value>0</bq:value>
      <bq:instanceId>fda7fa28-013b-4c19-a22d-ec63603c82b5</bq:instanceId>DecisionTableMonthlyFee" />
      <bq:sourceType>User</bq:sourceType>
   </InputData>
   <InputData <BusinessKnowledgeModel id="inputData5businessKnowledgeModel3" name="PolicyHolder.CommittedFraude">
      <bq:value>true</bq:value>
      <bq:instanceId>fda7fa28-013b-4c19-a22d-ec63603c82b5</bq:instanceId>
      <bq:sourceType>User</bq:sourceType>
   </InputData>Application.RequiredMonthlyInstallment-default-expression" />
</Definitions>

 

 

Image Removed

The metamodel of a DMN element

 

In the XSD the model will be stored by using three types of DRG elements, the InformationRequirement (a reference to input and decisions) and the KnowledgeRequirement (a reference to a BusinessKnowledgeModel)

Decision

A DRG element of the type decision will consist of the parts described underneath

 DMNElement attributes and model associations

...

XSD Attribute

...

Description

...

name: String [0..1]

...

The name of this element.

...

The string that identifies this DMNElement uniquely within its containing Definitions element.

...

 

 

Decision attributes and model associations

Attribute

Description

Data from runtimeRequired

informationRequirement:

InformationRequirement [*]

This attribute lists the instances of

InformationRequirement that compose this Decision.

Reference to all the InformationRequirements used as to make the decision (Informationrequirement is a reference to an input or another decision)No

knowledgeRequirement:

KnowledgeRequirement [*]

This attribute lists the instances of

KnowledgeRequirement that compose this Decision.

Reference to the knowledge requirement used to make the decision

(Knowledge requirement contains a reference to the logic element used to set the value)

No

 

Custom part for Blueriq

AttributeDescriptionRequired
Value: 1 : 1The value for the decisionYes
Sourcetype 1: 1the sourcetype for the decision (User, System, Constant , etc)Yes
Justification 1 : 1The justification for the resultNo

 

InputData

A DRG element of the type decision will consist of the parts described underneath

 DMNElement attributes and model associations

...

Attribute

...

Description

...

name: String [0..1]

...

The name of this element.

...

The string that identifies this DMNElement uniquely within its containing Definitions element.

...

 

InputData attributes and model associations

Attribute

Description

Data from runtimeRequired

 

Custom part for a Blueriq

AttributeDescriptionRequired
Value: 1 : 1The value for the decisionYes
Sourcetype 1: 1the sourcetype for the decision (User, System, Constant , etc)Yes

BusinessKnowledgeModel

 

 DMNElement attributes and model associations

...

Attribute

...

Description

...

name: String [0..1]

...

The name of this element.

...

Technical name used logic element

(expression for default expression

Constant fro constant)

...

The string that identifies this DMNElement uniquely within its containing Definitions element.

...

 

BusinessKnowledgeModel attributes and model associations

Attribute

Description

Data from runtimeRequired

 

InformationRequirement

DMNElement attributes and model associations

...

Attribute

...

Description

...

name: String [0..1]

...

The name of this element.

...

The string that identifies this DMNElement uniquely within its containing Definitions element.

...

 

InformationRequirement attributes and model associations

Attribute

Description

Data from runtimeRequired

requiredDecision: Decision [0..1]

The instance of Decision that this

InformationRequirement associates with its containing Decision element.

ID of a DRGelement containing a decisionNo

requiredInput: InputData [0..1]

The instance of InputData that this

InformationRequirement associates with its containing Decision element.

ID of a DRGelement conatining an InputNo

 

KnowledgeRequirement

DMNElement attributes and model associations

...

Attribute

...

Description

...

name: String [0..1]

...

The name of this element.

...

The string that identifies this DMNElement uniquely within its containing Definitions element.

...

 

KnowledgeRequirement attributes and model associations

...

Attribute

...

Description

...

requiredKnowledge:

BusinessKnowledgeModel

...

The instance of BusinessKnowledgeModel that this KnowledgeRequirement associates with its its containing Decision or

BusinessKnowledgeModel element.

...

XML representation of the decision requirements graph shown above.

Decision

Between the decision tags, the DRG components are placed to identify and determine the decision. The attribute name of the decision refers to an [entity.attribute] that was subject to a decision. The id attribute uniquely identifies the decision in the entire diagram. Inside the decision other default and custom XML components are included. The custom components can be identified by the bq prefix. The value element contains the value after determination of the decision. To determine a decision, information is needed. To accomplish this, informationRequirement tags are included inside a decision. These tags point on their way forth to input data (inputData) or other decisions (decision).

For determining a decision, logic is needed. This logic can come from different sources, for example a decision table, business rule, default rule etc. To indicate which logic is used to determine the decision, a knowledgeRequirement tag is placed inside the decision. Take for example the attribute RequiredMonthlyInstallment where a DRG is made for, it uses a default rule.

When an attribute contains a justification text, it will also be displayed inside the DRG graph and the XML variant. In XML this text is displayed between the JustificationText start and end tags inside a decision.

Business knowledge model

Inside the name attribute of the BusinessKnowledeModel the name of a logic component, such as a decision table, default rule, business rule is placed.

Input data  

...

The data that is set by the user is placed inside the InputData element tags.