# Can't access the output variable of a dmn decision

**URL:** <https://forum.flowable.org/t/cant-access-the-output-variable-of-a-dmn-decision/9467>\
**Category:** Flowable Engine\
**Created:** [June 27, 2022, 8:46am UTC](https://forum.flowable.org/t/cant-access-the-output-variable-of-a-dmn-decision/9467 "2022-06-27T08:46:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bzheng](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@bzheng](https://forum.flowable.org/u/bzheng)\
**Post date:** [June 27, 2022, 8:46am UTC](https://forum.flowable.org/t/cant-access-the-output-variable-of-a-dmn-decision/9467/1 "2022-06-27T08:46:02Z")

</div>

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:

```auto
 <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

```auto
<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?

---

<div class="post-metadata">

**Author:** ![yvo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yvo/32/2231_2.png) [@yvo](https://forum.flowable.org/u/yvo)\
**Post date:** [June 27, 2022, 2:11pm UTC](https://forum.flowable.org/t/cant-access-the-output-variable-of-a-dmn-decision/9467/2 "2022-06-27T14:11:08Z")

</div>

Hi.

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

Yvo

---

<div class="post-metadata">

**Author:** ![bzheng](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@bzheng](https://forum.flowable.org/u/bzheng)\
**Post date:** [June 28, 2022, 1:11am UTC](https://forum.flowable.org/t/cant-access-the-output-variable-of-a-dmn-decision/9467/3 "2022-06-28T01:11:01Z")

</div>

Hi Yvo,

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

Cheers

---

<div class="post-metadata">

**Author:** ![bzheng](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@bzheng](https://forum.flowable.org/u/bzheng)\
**Post date:** [June 28, 2022, 3:21am UTC](https://forum.flowable.org/t/cant-access-the-output-variable-of-a-dmn-decision/9467/4 "2022-06-28T03:21:04Z")

</div>

Hi Yvo,

Thanks for your help.

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