Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?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_Application.RequiredMonthlyInstallment" namespace="http://www.blueriq.com/dmn"> <Decision id="decision1" name="Application.RequiredMonthlyInstallment"> <bq:value>284.219374515558</bq:value> <bq:instanceId>e2575ae5-e344-46bd-88b5-f5a98cb76ca8</bq:instanceId> <bq:sourceType>Default</bq:sourceType> <bq:justificationText justificationTextId="RequiredMonthlyInstallmentCalculation"> The formula is M = P * (J / (1 - (1 - (1 + J)^ -N)) - XF. M: monthly payment. P: principal or amount of loan. J: monthly interest; annual interest divided by 100, then devideddivided by 12. N: number of months of amortization, determined by length in years of loan. XF: monthly fee, determined by the type of product. </bq:justificationText> <informationRequirement> <InformationItem id="decision1InformationItem0" name="RequestedProduct.Amount" /> <requiredInput>inputData1</requiredInput> </informationRequirement> <informationRequirement> <InformationItem id="decision1InformationItem1" name="Control.MonthlyInterest" /> <requiredDecision>decision2</requiredDecision> </informationRequirement> <informationRequirement> <InformationItem id="decision1InformationItem2" name="RequestedProduct.Term" /> <requiredInput>inputData3</requiredInput> </informationRequirement> <informationRequirement> <InformationItem id="decision1InformationItem3" name="RequestedProduct.MonthlyFee" /> <requiredDecision>decision3</requiredDecision> </informationRequirement> <knowledgeRequirement> <requiredKnowledge>businessKnowledgeModel3</requiredKnowledge> </knowledgeRequirement> </Decision> <Decision id="decision2" name="Control.MonthlyInterest"> <bq:value>0.0050</bq:value> <bq:instanceId>7e72ae81-34a8-4c52-8538-0e09549ab3fe</bq:instanceId> <bq:sourceType>Default</bq:sourceType> <informationRequirement> <InformationItem id="decision2InformationItem0" name="RequestedProduct.Rate" /> <requiredInput>inputData2</requiredInput> </informationRequirement> <knowledgeRequirement> <requiredKnowledge>businessKnowledgeModel1</requiredKnowledge> </knowledgeRequirement> </Decision> <Decision id="decision3" name="RequestedProduct.MonthlyFee"> <bq:value>20.0</bq:value> <bq:instanceId>e7b51f3c-0181-42b9-94f3-dd6fc05ddae3</bq:instanceId> <bq:sourceType>System</bq:sourceType> <informationRequirement> <InformationItem id="decision3InformationItem0" name="RequestedProduct.ProductType" /> <requiredInput>inputData4</requiredInput> </informationRequirement> <knowledgeRequirement> <requiredKnowledge>businessKnowledgeModel2</requiredKnowledge> </knowledgeRequirement> </Decision> <InputData id="inputData1" name="RequestedProduct.Amount"> <bq:value>10000.0</bq:value> <bq:instanceId>e7b51f3c-0181-42b9-94f3-dd6fc05ddae3</bq:instanceId> <bq:sourceType>User</bq:sourceType> </InputData> <InputData id="inputData2" name="RequestedProduct.Rate"> <bq:value>6.0</bq:value> <bq:instanceId>e7b51f3c-0181-42b9-94f3-dd6fc05ddae3</bq:instanceId> <bq:sourceType>User</bq:sourceType> </InputData> <InputData id="inputData3" name="RequestedProduct.Term"> <bq:value>36.0</bq:value> <bq:instanceId>e7b51f3c-0181-42b9-94f3-dd6fc05ddae3</bq:instanceId> <bq:sourceType>User</bq:sourceType> </InputData> <InputData id="inputData4" name="RequestedProduct.ProductType"> <bq:value>Standard loan</bq:value> <bq:instanceId>e7b51f3c-0181-42b9-94f3-dd6fc05ddae3</bq:instanceId> <bq:sourceType>User</bq:sourceType> </InputData> <BusinessKnowledgeModel id="businessKnowledgeModel1" name="Control.MonthlyInterest-default-expression" /> <BusinessKnowledgeModel id="businessKnowledgeModel2" name="DecisionTableMonthlyFee" /> <BusinessKnowledgeModel id="businessKnowledgeModel3" name="Application.RequiredMonthlyInstallment-default-expression" /> </Definitions> |
...
Decision
Between the decision tags, the DRG components are placed to identify and determine the decision. The name attribute of the decision refers to an entity attribute where a decision had to be made for. 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. The informationRequirement
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 ("A rule that is linked to this attribute and evaluated each time a underlying component changes.").
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.
BusinessKnowledeModel
Inside the name attribute of the BusinessKnowledeModel
the name of a logic component, such as a decision table, default rule, business rule is placed.
InputData
The data that is set by the user is placed inside the InputData
element tags.
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 runtime | Required |
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
Attribute | Description | Required |
---|---|---|
Value: 1 : 1 | The value for the decision | Yes |
Sourcetype 1: 1 | the sourcetype for the decision (User, System, Constant , etc) | Yes |
Justification 1 : 1 | The justification for the result | No |
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 runtime | Required |
Custom part for a Blueriq
Attribute | Description | Required |
---|---|---|
Value: 1 : 1 | The value for the decision | Yes |
Sourcetype 1: 1 | the 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 runtime | Required |
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
...
requiredDecision: Decision [0..1]
...
The instance of Decision that this
InformationRequirement associates with its containing Decision 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.
...
.
...
The instance of InputData that this
InformationRequirement associates with its containing Decision element.
...
KnowledgeRequirement
DMNElement attributes and model associations
...
Attribute
...
Description
...
name: String [0..1]
...
The name of this element.
...