Can't access the output variable of a dmn decision

Hi there,

I am using spring boot for an application with the flowable-spring-boot-starter version 6.7.2. I have it working with a process definition using a bpmn20.xml file. I’m currently trying to add a flowable:type='dmn' service task.

A snippet of my bpmn20.xml file:

 <serviceTask id="amountDmnTask" flowable:type="dmn">
            <extensionElements>
                <flowable:field name="decisionTableReferenceKey">
                    <flowable:string><![CDATA[AMT_DEC_1]]></flowable:string>
                </flowable:field>
            </extensionElements>
</serviceTask>
<sequenceFlow sourceRef="amountDmnTask" targetRef="checkRule"/>
<serviceTask id="checkRule" name="Check Amount Rule"
                     flowable:class="com.example.flowablepoc.services.CheckAmountRule" />

and my dmn file

<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:di="http://www.omg.org/spec/DMN/20180521/DI/" id="definition_3c646d2b-f5db-11ec-ab06-02424fa938b9" name="Amount Decision" namespace="http://www.flowable.org/dmn" exporter="Flowable Open Source Modeler" exporterVersion="6.7.2">
  <decision id="AMT_DEC_1" name="Amount Decision">
    <description>Amount rule</description>
    <decisionTable id="decisionTable_58da64fa-5b58-47b0-928c-bf19a5b7c895" hitPolicy="FIRST">
      <input label="Transaction Amount">
        <inputExpression id="inputExpression_649cf0a8-b8a4-41fa-9c03-c77589e4c123" typeRef="number">
          <text>amount</text>
        </inputExpression>
      </input>
        <output id="outputExpression_de27f70e-6d5a-4319-a1bb-250a5d5e8ecf" label="Valid" name="amountValid" typeRef="boolean"></output>
      <rule>
        <inputEntry id="inputEntry_649cf0a8-b8a4-41fa-9c03-c77589e4c123_1">
          <text><![CDATA[<= 10]]></text>
        </inputEntry>
        <outputEntry id="outputEntry_de27f70e-6d5a-4319-a1bb-250a5d5e8ecf_1">
          <text><![CDATA[false]]></text>
        </outputEntry>
      </rule>
    </decisionTable>
  </decision>
</definitions>

There are no exceptions thrown when I go through my process so I have assumed that all my configuration and deployment is correct.

However in my CheckAmountRule class, when I try to access the variable amountValid , it returns a null pointer.

Am I missing something in a step? or is the way I am expecting to access the output of the decision table incorrect?

Hi.

Did you verify that the decision table execution had the expected result?
For example using the audit trail?

Yvo

Hi Yvo,

Is there an example of how to go about setting up an audit trail for dmn?

Cheers

Hi Yvo,

Thanks for your help.

I have since found the audit trail, and have been able to resolve the issue.