I have a BPMN process with a DMN Decision Table that uses a process variable as input. This input process variable is initialized and populated by a user task and is behaving as expected.
Process execution seems to finish successfully. I see no error logs, but the resultVariable
defined within the Business Rule Task, has value of null
.
I have changed the value of Camunda:resultVariable
within the Business Rule Task but regardless of the name, it always ends up with a null
value after execution.
I wonder if it’s safe to assume that successful process execution means the Business Rule Task was bound correctly to the DMN Table and it was able to compute a decision.
It just seems that the very last step: storing the decision result is missing.
Is there something I’m missing in the output variable mapping configuration?
Input Process Variable is a string called day
and I pass a value of "Tuesday"
in the User Form.
Business Rule Task
<bpmn:businessRuleTask
id="dmn-task_HOwbZaIn"
name="Sukesh and Davids"
camunda:resultVariable="result"
camunda:decisionRef="BR-64bd3260-11ee-93f1-0a58a9feac2a"
camunda:decisionRefTenantId="XXX"
>
<bpmn:incoming>connector-flow_P7sNfZK</bpmn:incoming>
<bpmn:outgoing>connector-flow_5ab1aM1J</bpmn:outgoing>
</bpmn:businessRuleTask>
DMN
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/2.0" xmlns:camunda="http://camunda.org/schema/1.0/dmn" id="Definitions_0obggq4" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="4.8.1">
<decision id="Decision_04xd30d" name="DayofWeek">
<decisionTable id="DecisionTable_192eifp">
<input id="day" label="day" biodi:width="192" camunda:inputVariable="day">
<inputExpression id="InputExpression_1" typeRef="string">
<text></text>
</inputExpression>
</input>
<output id="result" name="result" typeRef="string" />
<rule id="DecisionRule_19dx5je">
<inputEntry id="UnaryTests_0at02b6">
<text>"Monday"</text>
</inputEntry>
<outputEntry id="LiteralExpression_0mzgwqa">
<text>"Yes"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1riumo2">
<inputEntry id="UnaryTests_1x6esu9">
<text>"Tuesday"</text>
</inputEntry>
<outputEntry id="LiteralExpression_10386ld">
<text>"No"</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
</definitions>
I’m expecting my result
variable to display a value of "Yes"
but it’s null
.
However, I can see the variable and the correct value here in the logs:
ActivityInstance(activityId=dmn-task_ROwzbZaAn, activityName=foo,
type=businessRuleTask, startTime=1696528253654, endTime=1696528253679), ActivityInstance(activityId=terminus-exit_l6BSxVGo0U, activityName=null, type=noneEndEvent,
startTime=1696528253680, endTime=1696528253680),
ActivityInstance(activityId=terminus-start_dobZuMjBZ,
activityName=null, type=startEvent,
startTime=1696528230509, endTime=1696528230510)],
variables=[VariableInstance(name=day, typeName=string, value=Monday), VariableInstance(name=result, typeName=object,
value=[{result=Yes}])], incidents=[])