Hey everyone,
currently i have two DMNs which i want to merge into a single Decision Requirements Graph with two DMN-Tables.
Now I have a DRG like this with two DMN-Tables and a Literal Expression:
This DMN is just a minimal reproducable example. Imagine instead of having 2 rows and 2 columns, the table would have a couple of hundred rows and 30 - 60 columns. If i hacked all of these values into one cell, the business people would lose overview. At all times by looking at the table they need to be able to answer the hypothetical questions:
Which of the ~60 items need to be bought on a monday?
On which of the multiple hundred days (i know there is only 7 Days of week, so probably my example is not a perfect fit ) do i need to buy Orange Juice
Maybe this would be a great way to simplify the “if…then” part but in order to filter a list i need to have access to a list first:
I suspect the preceding DMN has a Map and not a List as an output, which would probably make it impossible to use the list filter function
I do not even know how to access this map because i do not know the variable name?
So my question is: How do i access/dereference/get the results from the first DMN-Table in the Literal Expression? How do i know the variable name that i have to call?
Or as a first step to improve debugging: Is there a way to log or list or get all variables so i know which ones are available in the context of the literal expression?
well this is quite some data. On the other hand, is having 30 to 60 columns really more of an overview?
Question 1 can be answered by using the DMN simulator for example .
Question 2 can be answered by having a look at the table as the input params are listed in a OR-logic.
My thought here was of course that we are actually talking about a business rule with a very limited range of input values, so I will stop and come back to your rule structure .
The output of your first table would provide you with a Map, that is correct. This map is available in the context by the individual column names, not as one context object.
I would say, having individual columns provides more of an overview to see on which days you would have to buy oat.
If you put them into one output column, there is no way to search or filter the rules which contain “Oat” in Camunda Modeler or dmn-js (except in XML-View).
If there is no way of iterating over all the DMN-Outputs in a literal expression, I’m still thinking about adopting your solution. But then I would have to provide some way for the business people to search or filter the hundreds of rows for occurences of “Oat” by providing a search- or filter-extension to dmn-js.