# Results from multiple DMN tables

**URL:** <https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000>\
**Category:** Discussion & Questions\
**Tags:** dmn-engine-feel\
**Created:** [October 10, 2017, 12:15pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000 "2017-10-10T12:15:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanislav](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@stanislav](https://forum.camunda.io/u/stanislav)\
**Post date:** [October 10, 2017, 12:15pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/1 "2017-10-10T12:15:22Z")

</div>

Hi there,  
I would like to evaluate multiple decision tables in one Rule Task. I know about the DRD and chaining the DMN tables. But I don’t want to use results of one table as inputs into another. I need results from both tables to use later in the process. And I would like to avoid creating two Rules Tasks.  
Ideally I would like to get results from both tables as a List/map in the variable defined in “Result Variable”.

When I tried it, only results from the main table (referenced in the Rule Task) were filled-in the “Result Variable”. Results from “Required table” were missing.

p.s. both tables have the same inputs, but different outputs. Hit Policy is Collect in both tables.

Thank you

---

<div class="post-metadata">

**Author:** ![thorben](https://forum.camunda.io/user_avatar/forum.camunda.io/thorben/32/78_2.png) [@thorben](https://forum.camunda.io/u/thorben)\
**Post date:** [October 10, 2017, 12:38pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/2 "2017-10-10T12:38:25Z")

</div>

Hi @stanislav,

You can achieve this by implementing the [business rule task as a JavaDelegate](https://docs.camunda.org/manual/7.7/reference/bpmn20/tasks/business-rule-task/#using-delegate-code) and call the DMN engine from your custom Java code as often as you need. Then you also have full flexibility of result processing.

Cheers,  
Thorben

---

<div class="post-metadata">

**Author:** ![stanislav](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@stanislav](https://forum.camunda.io/u/stanislav)\
**Post date:** [October 10, 2017, 12:44pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/3 "2017-10-10T12:44:26Z")

</div>

Hi @thorben , thank you for the quick answer.  
Yes, I am aware of that solution, but was curious if it could be solved only with the configuration. Based on your answer, I see it’s not possible. IMHO it would be a nice feature, because it allows you to use DRD for wider range of use-cases.

but thanks anyway

---

<div class="post-metadata">

**Author:** ![StephenOTT](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@StephenOTT](https://forum.camunda.io/u/StephenOTT)\
**Post date:** [October 10, 2017, 1:47pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/4 "2017-10-10T13:47:18Z")

</div>

@stanislav what about using a script in a script task?  
Or is it possible to do a multi instance business rule and have the dmn a dynamic expression value pulled from the collection?  
Something like this:  
[Pattern Review: DMN Looping for Array Input](https://forum.camunda.io/t/pattern-review-dmn-looping-for-array-input/2106)

---

<div class="post-metadata">

**Author:** ![felix-mueller](https://forum.camunda.io/user_avatar/forum.camunda.io/felix-mueller/32/5395_2.png) [@felix-mueller](https://forum.camunda.io/u/felix-mueller)\
**Post date:** [October 10, 2017, 7:20pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/5 "2017-10-10T19:20:31Z")

</div>

What about using a Literal Expression that returns all the outputs of the connected DMN tables?

---

<div class="post-metadata">

**Author:** ![stanislav](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@stanislav](https://forum.camunda.io/u/stanislav)\
**Post date:** [October 11, 2017, 12:00pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/6 "2017-10-11T12:00:00Z")

</div>

@StephenOTT , thank you for your suggestions.  
I don’t want to use script task, when dealing with decision tables/rules. I would like to have clear convention, that allows users/analysts to easily read process diagrams. And for that, I need service task, always when calling back-end system, user task when calling front-end, and RuleTask when calling DMN table. No dual uses 🙂  
Regarding your pattern. I think for my case, using JavaDelegate for Rule Task would be more cleaner solution. But it’s an interesting approach you designed, and maybe I will use it later 🙂

---

<div class="post-metadata">

**Author:** ![stanislav](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@stanislav](https://forum.camunda.io/u/stanislav)\
**Post date:** [October 11, 2017, 12:19pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/7 "2017-10-11T12:19:53Z")

</div>

@felix-mueller, it sounds interesting. But I don’t have much experience with Literal Expressions, and cannot find how to use them together with dmn tables in the documentation. Could you please elaborate a little bit more? Should I chain literal expression with my two dmn tables(make them required)? And then, should I refer to the Literal Expression from the Rule Task?

Thank you

---

<div class="post-metadata">

**Author:** ![felix-mueller](https://forum.camunda.io/user_avatar/forum.camunda.io/felix-mueller/32/5395_2.png) [@felix-mueller](https://forum.camunda.io/u/felix-mueller)\
**Post date:** [October 13, 2017, 6:38am UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/8 "2017-10-13T06:38:59Z")

</div>

@stanislav  
You could model a DRD like this:

 ![14](https://forum.camunda.io/uploads/default/original/2X/5/54dc256aeec92991cb65b6dffba05e5f435642b9.png)

In the Literal Expression using JavaScript or another Scripting language you have access to the outputs of the DMN tables.  
You can then use the Generate Results Literal Expression within your Business Rule Task in the BPMN.  
You will find some basic info regarding LE here [DMN Decision Literal Expression | docs.camunda.org](https://docs.camunda.org/manual/7.7/reference/dmn11/decision-literal-expression/)

Hope this helps a bit.

Best  
Felix

---

<div class="post-metadata">

**Author:** ![stanislav](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@stanislav](https://forum.camunda.io/u/stanislav)\
**Post date:** [October 13, 2017, 11:11am UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/9 "2017-10-13T11:11:55Z")

</div>

@felix-mueller, I tried it yesterday evening, and came to the same approach as you described 🙂 One thing that will be a little bit difficult is to parse reasonable output from all the variables (columns from decision tables). But nothing that cannot be done 🙂  
But I think, this approach is more suitable for my needs than using JavaDelegate. Thank you

---

<div class="post-metadata">

**Author:** ![felix-mueller](https://forum.camunda.io/user_avatar/forum.camunda.io/felix-mueller/32/5395_2.png) [@felix-mueller](https://forum.camunda.io/u/felix-mueller)\
**Post date:** [October 13, 2017, 11:23am UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/10 "2017-10-13T11:23:50Z")

</div>

@stanislav great to hear that you came to a similar result!

---

<div class="post-metadata">

**Author:** ![PRASHANT\_KUMAR](https://forum.camunda.io/letter_avatar_proxy/v4/letter/p/91b2a8/32.png) [@PRASHANT\_KUMAR](https://forum.camunda.io/u/PRASHANT_KUMAR)\
**Post date:** [April 17, 2018, 7:59pm UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/12 "2018-04-17T19:59:15Z")

</div>

Can we get only Output-cell name/value without using cell property in Leteral Expression using Groovy? I tried with binding.getVariables(), It returns inputCell and outputcell both. Help will be appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 30, 2024, 10:59am UTC](https://forum.camunda.io/t/results-from-multiple-dmn-tables/5000/13 "2024-01-30T10:59:59Z")

</div>

Closed on January 30, 2024, 10:59am UTC


