dsntk-examples 0.3.0

ÐecisionToolkit | Examples
Documentation
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions exporter="DMN Modeler" exporterVersion="6.1.3" namespace="http://www.trisotech.com/dmn/definitions/_87cc2f62-ab26-47a1-aad5-d40765cdc9fb" name="DT on BKM explicit parameters"
             triso:logoChoice="Default" id="_87cc2f62-ab26-47a1-aad5-d40765cdc9fb" xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
             xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:triso="http://www.trisotech.com/2015/triso/modeling"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <extensionElements/>
    <itemDefinition name="tPerson" label="tPerson">
        <itemComponent name="Name" id="_4587234e-85c7-4419-98d9-ebb66aa1e043">
            <typeRef>string</typeRef>
        </itemComponent>
        <itemComponent name="Gender" id="_f56cfffd-a9ad-4b10-b33e-d1172cacf3c5">
            <typeRef>string</typeRef>
            <allowedValues triso:constraintsType="enumeration">
                <text>"Male","Female"</text>
            </allowedValues>
        </itemComponent>
        <itemComponent name="Children" id="_c7bd7a3c-518a-414e-a180-4bf8b918bd04">
            <typeRef>number</typeRef>
        </itemComponent>
    </itemDefinition>
    <inputData name="Person" id="_542f2377-ef0c-452c-a34d-1496eb75de23">
        <variable typeRef="tPerson" name="Person" id="_1b34cc3f-a148-4617-a2e4-b6de00a99d36"/>
    </inputData>
    <decision name="Person's description" id="_d3722a6a-6a8f-4949-8480-9bd660152915">
        <variable name="Person's description" id="_0e20f081-b76f-4131-937c-4dcf20efb714"/>
        <informationRequirement id="d0e0d59d-9189-4380-90c6-c2d234979e77">
            <requiredInput href="#_542f2377-ef0c-452c-a34d-1496eb75de23"/>
        </informationRequirement>
        <knowledgeRequirement id="_097004cd-75bd-4792-8792-ef17f7728d1b">
            <requiredKnowledge href="#_d86b380d-733f-4c24-8143-c175d11cc95f"/>
        </knowledgeRequirement>
        <invocation id="_fb20896a-813a-4a11-b81a-5568deeb70a0">
            <literalExpression id="literal__fb20896a-813a-4a11-b81a-5568deeb70a0">
                <text>Description</text>
            </literalExpression>
            <binding>
                <parameter name="Person" id="_df1a8a4e-0b8e-42ad-8d36-707f5e509729"/>
                <literalExpression id="_7d7305d6-08b4-4a04-9c89-9d7b398ce489">
                    <text>Person</text>
                </literalExpression>
            </binding>
        </invocation>
    </decision>
    <businessKnowledgeModel name="Description" id="_d86b380d-733f-4c24-8143-c175d11cc95f">
        <variable name="Description" id="_4ec95bda-ae86-435a-8724-d804f0448d76"/>
        <encapsulatedLogic kind="FEEL" id="_1faf8619-32bc-4441-ba76-9ab30f101949">
            <formalParameter typeRef="tPerson" name="Person" id="_7c9ee2d4-d4a4-439e-b8b6-371792b79cf4"/>
            <context typeRef="string" id="_f4acaa28-41f4-4fa5-9536-7ec92e8b21ec">
                <contextEntry>
                    <variable typeRef="string" name="the description" id="_d672746e-8f9f-4fed-b75e-ae5113a8fea7"/>
                    <decisionTable hitPolicy="UNIQUE" outputLabel="the description" id="_5d73f8fd-009d-47c9-aa37-1b7fed64a0ac">
                        <input id="_061b2667-8680-4229-bbc6-1d2f371580a8">
                            <inputExpression typeRef="string">
                                <text>Person.Gender</text>
                            </inputExpression>
                            <inputValues triso:constraintsType="enumeration">
                                <text>"Male","Female"</text>
                            </inputValues>
                        </input>
                        <output id="_4681ea00-ee6c-4731-ae85-3bef92bef124"/>
                        <rule id="_60226276-8b6c-4d01-8615-ea2887968998">
                            <inputEntry id="_60b3620f-278d-40b8-9664-9601178df810">
                                <text>"Male"</text>
                            </inputEntry>
                            <outputEntry expressionLanguage="https://www.omg.org/spec/DMN/20191111/FEEL/" triso:unparsed="true" id="_b2516134-f85e-46fe-a48f-e97d15890193">
                                <text>Person.Name + " is a dad of " + string(decimal(Person.Children,0)) + " children."</text>
                            </outputEntry>
                        </rule>
                        <rule id="_55949bfa-9e7d-468d-8338-f98d01910a72">
                            <inputEntry id="_f9adf8ef-6d54-482a-ad93-52bec6484d6c">
                                <text>"Female"</text>
                            </inputEntry>
                            <outputEntry expressionLanguage="https://www.omg.org/spec/DMN/20191111/FEEL/" triso:unparsed="true" id="_5ac32905-7373-451e-b143-29c55833eaf6">
                                <text>Person.Name + " is a mother of " + string(decimal(Person.Children,0)) + " children."</text>
                            </outputEntry>
                        </rule>
                    </decisionTable>
                </contextEntry>
                <contextEntry>
                    <literalExpression id="_7319b542-60cd-4299-ac7b-8255fc6a9f3b">
                        <text>the description</text>
                    </literalExpression>
                </contextEntry>
            </context>
        </encapsulatedLogic>
    </businessKnowledgeModel>
    <dmndi:DMNDI>
        <dmndi:DMNDiagram id="_87cc2f62-ab26-47a1-aad5-d40765cdc9fb_D1">
            <dmndi:Size height="650.0" width="667.0"/>
            <dmndi:DMNShape dmnElementRef="_542f2377-ef0c-452c-a34d-1496eb75de23" id="_87cc2f62-ab26-47a1-aad5-d40765cdc9fb_s1">
                <dc:Bounds height="60.0" width="153.0" x="150.0" y="331.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNShape dmnElementRef="_d3722a6a-6a8f-4949-8480-9bd660152915" id="_87cc2f62-ab26-47a1-aad5-d40765cdc9fb_s2">
                <dc:Bounds height="61.0" width="154.0" x="256.0" y="150.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNShape dmnElementRef="_d86b380d-733f-4c24-8143-c175d11cc95f" id="_87cc2f62-ab26-47a1-aad5-d40765cdc9fb_s3">
                <dc:Bounds height="61.0" width="154.0" x="363.0" y="331.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNEdge dmnElementRef="_097004cd-75bd-4792-8792-ef17f7728d1b" id="_87cc2f62-ab26-47a1-aad5-d40765cdc9fb_e1">
                <di:waypoint x="440.0" y="331.0"/>
                <di:waypoint x="333.0" y="211.0"/>
            </dmndi:DMNEdge>
            <dmndi:DMNEdge dmnElementRef="d0e0d59d-9189-4380-90c6-c2d234979e77" id="_87cc2f62-ab26-47a1-aad5-d40765cdc9fb_e2">
                <di:waypoint x="226.0" y="331.0"/>
                <di:waypoint x="333.0" y="211.0"/>
            </dmndi:DMNEdge>
        </dmndi:DMNDiagram>
    </dmndi:DMNDI>
</definitions>