Hi,
I’m using “camunda-engine-dmn” version 7.22.0 in my Java project. I’m passing a java.util.Date
object as input corresponding to the “Date” field in the DMN table. However, even though I’m providing a valid date, I’m getting an empty result. the same occurs also for Time, DayTimeDuration, YearMonthDuration.
I’m attaching the the dmn file and screenshots below.
Can anyone help me with this?
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" id="Definitions_152fd0u" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="5.28.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.6.0">
<decision id="Decision_17xeqs3" name="Decision 1">
<informationRequirement id="InformationRequirement_1ja0bid">
<requiredInput href="#InputData_01xh9ex" />
</informationRequirement>
<informationRequirement id="InformationRequirement_0g66g72">
<requiredInput href="#InputData_1q7x4xs" />
</informationRequirement>
<decisionTable id="DecisionTable_08og0hl" hitPolicy="COLLECT">
<input id="Input_1" label="dish">
<inputExpression id="InputExpression_1" typeRef="string">
<text>dish</text>
</inputExpression>
</input>
<input id="InputClause_00unv4a" label="date">
<inputExpression id="LiteralExpression_0jbtlu1" typeRef="date">
<text>date</text>
</inputExpression>
</input>
<output id="Output_1" label="cost" name="cost" typeRef="number" />
<output id="OutputClause_1ad0l7y" label="dessert" name="dessert" typeRef="string" />
<output id="OutputClause_0zfyvv3" label="tax" name="tax" typeRef="string" />
<rule id="DecisionRule_0tbolbh">
<inputEntry id="UnaryTests_1379jze">
<text>"biriyani"</text>
</inputEntry>
<inputEntry id="UnaryTests_0s9i1ag">
<text>date("2015-01-20")</text>
</inputEntry>
<outputEntry id="LiteralExpression_15aupga">
<text>1000</text>
</outputEntry>
<outputEntry id="LiteralExpression_0p6rmy4">
<text>"jamun 5 pieces"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0j6r6f9">
<text>3.2</text>
</outputEntry>
</rule>
<rule id="DecisionRule_05fvauo">
<inputEntry id="UnaryTests_0vqiyix">
<text>"biriyani"</text>
</inputEntry>
<inputEntry id="UnaryTests_0q162o2">
<text>date("2025-01-09")</text>
</inputEntry>
<outputEntry id="LiteralExpression_1iap8fy">
<text>2000</text>
</outputEntry>
<outputEntry id="LiteralExpression_0j1iujc">
<text>"jamun 10 pieces"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1fj1rwd">
<text>1.2</text>
</outputEntry>
</rule>
<rule id="DecisionRule_15r5tnu">
<inputEntry id="UnaryTests_18v42mt">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_0gqvcyr">
<text></text>
</inputEntry>
<outputEntry id="LiteralExpression_0i12q5p">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_0robwf4">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_17un63r">
<text></text>
</outputEntry>
</rule>
</decisionTable>
</decision>
<inputData id="InputData_01xh9ex" name="dish" />
<inputData id="InputData_1q7x4xs" name="date" />
<dmndi:DMNDI>
<dmndi:DMNDiagram>
<dmndi:DMNShape dmnElementRef="Decision_17xeqs3">
<dc:Bounds height="80" width="180" x="530" y="90" />
</dmndi:DMNShape>
<dmndi:DMNShape id="DMNShape_1o6jhen" dmnElementRef="InputData_01xh9ex">
<dc:Bounds height="45" width="125" x="168" y="78" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_05mad98" dmnElementRef="InformationRequirement_1ja0bid">
<di:waypoint x="293" y="101" />
<di:waypoint x="510" y="117" />
<di:waypoint x="530" y="117" />
</dmndi:DMNEdge>
<dmndi:DMNShape id="DMNShape_18xakt2" dmnElementRef="InputData_1q7x4xs">
<dc:Bounds height="45" width="125" x="177" y="138" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="DMNEdge_0b0mrtu" dmnElementRef="InformationRequirement_0g66g72">
<di:waypoint x="302" y="161" />
<di:waypoint x="510" y="143" />
<di:waypoint x="530" y="143" />
</dmndi:DMNEdge>
</dmndi:DMNDiagram>
</dmndi:DMNDI>
</definitions>```