Unit Testing of depending Decision Tables

I struggle to Unit Test the Invoice Dmn Table (Assigner Approver Group):

This gives me the following exception:
org.camunda.bpm.dmn.feel.impl.FeelException: FEEL/SCALA-01008 Error while evaluating expression: failed to evaluate expression 'invoiceClassification': no variable found for name 'invoiceClassification'

The ‘invoiceClassification’ comes from the Invoice Classification Table.

Is there a way I have to configure this (to include depending tables)?

I followed the intructions here:

Hi @pme123,

I believe that if input variables for “Invoice Classification” table are supplied as part of the unit test for evaluating decision table “Assign Approver Group” then it should work.

Hi @hassang ,
thanks for the response - so there is no way to test the Dmn Table with its dependent inputs?

Hi @pme12,

As far as I know, there is no way

Ok, after some debugging I figured it out.

So dmnEngine.evaluateDecisionTable(cDecision, variables) will always also evaluate the dependent DMNs and add the results to the variables Map.

My Problem was that there was no match in the dependent DMN Table (I work with Enumerations instead of String). Und so of course this variable was missing.

2 Likes