dsntk-examples 0.3.0

ÐecisionToolkit | Examples
Documentation
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions namespace="http://www.trisotech.com/definitions/_54863c52-2fa7-4a3d-b383-d4eb2eb88771"
             name="conditionals"
             id="_c099073b-8eb1-4945-b238-7837d79bb597"
             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:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <decision name="simpleIf" id="d_cond1">
        <variable typeRef="number" name="simpleIf"/>
        <informationRequirement id="_59dee493-9dfe-46a4-b44b-e7af6905c1ff">
            <requiredInput href="#i_bool"/>
        </informationRequirement>
        <informationRequirement id="_8ea6c946-0a79-4989-a171-aa6c89762a3e">
            <requiredInput href="#i_num"/>
        </informationRequirement>
        <literalExpression>
            <text>if bool then num+10 else num-10</text>
        </literalExpression>
    </decision>
    <decision name="conditionWithFunctions" id="d_cond2">
        <variable typeRef="string" name="conditionWithFunctions"/>
        <informationRequirement id="_3b142b29-efca-43ad-b352-70309001ac8c">
            <requiredInput href="#i_date"/>
        </informationRequirement>
        <informationRequirement id="_1202ac71-5c68-4d7c-a1cc-de15d1da9c10">
            <requiredInput href="#i_string"/>
        </informationRequirement>
        <literalExpression>
            <text>if aDate &gt; date("2017-01-01") then substring before(aString, " ") else substring after(aString, " ")</text>
        </literalExpression>
    </decision>
    <inputData name="bool" id="i_bool">
        <variable typeRef="boolean" name="bool"/>
    </inputData>
    <inputData name="num" id="i_num">
        <variable typeRef="number" name="num"/>
    </inputData>
    <inputData name="aDate" id="i_date">
        <variable typeRef="date" name="aDate"/>
    </inputData>
    <inputData name="aString" id="i_string">
        <variable typeRef="string" name="aString"/>
    </inputData>
    <dmndi:DMNDI>
        <dmndi:DMNDiagram id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_D1">
            <dmndi:Size height="650.0" width="1092.0"/>
            <dmndi:DMNShape dmnElementRef="d_cond1" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_s1">
                <dc:Bounds height="61.0" width="154.0" x="256.0" y="150.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNShape dmnElementRef="d_cond2" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_s2">
                <dc:Bounds height="61.0" width="154.0" x="681.0" y="150.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNShape dmnElementRef="i_bool" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_s3">
                <dc:Bounds height="60.0" width="153.0" x="150.0" y="331.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNShape dmnElementRef="i_num" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_s4">
                <dc:Bounds height="60.0" width="153.0" x="363.0" y="331.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNShape dmnElementRef="i_date" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_s5">
                <dc:Bounds height="60.0" width="153.0" x="576.0" y="331.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNShape dmnElementRef="i_string" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_s6">
                <dc:Bounds height="60.0" width="153.0" x="789.0" y="331.0"/>
            </dmndi:DMNShape>
            <dmndi:DMNEdge dmnElementRef="_59dee493-9dfe-46a4-b44b-e7af6905c1ff" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_e1">
                <di:waypoint x="226.0" y="331.0"/>
                <di:waypoint x="333.0" y="211.0"/>
            </dmndi:DMNEdge>
            <dmndi:DMNEdge dmnElementRef="_8ea6c946-0a79-4989-a171-aa6c89762a3e" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_e2">
                <di:waypoint x="439.0" y="331.0"/>
                <di:waypoint x="333.0" y="211.0"/>
            </dmndi:DMNEdge>
            <dmndi:DMNEdge dmnElementRef="_3b142b29-efca-43ad-b352-70309001ac8c" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_e3">
                <di:waypoint x="652.0" y="331.0"/>
                <di:waypoint x="758.0" y="211.0"/>
            </dmndi:DMNEdge>
            <dmndi:DMNEdge dmnElementRef="_1202ac71-5c68-4d7c-a1cc-de15d1da9c10" id="_54863c52-2fa7-4a3d-b383-d4eb2eb88771_e4">
                <di:waypoint x="865.0" y="331.0"/>
                <di:waypoint x="758.0" y="211.0"/>
            </dmndi:DMNEdge>
        </dmndi:DMNDiagram>
    </dmndi:DMNDI>
</definitions>