Binding combined DMN (i.e. DMN with multiple decision tables) to BPMN

As far as I understand it is currently not possible to bind a DMN with multiple decision tables to a BPMN diagram as a single DMN. Can someone please confirm this? Or am I missing something here?

Thanks a lot in advance.

Details: E.g. take the DMN in online simulator at What is DMN? DMN Tutorial and Examples | Camunda . When I import this DMN to Camunda I see two DMNs imported instead of a single unified DMN element. When binding this DMN to my BPMN diagram I have to bind each of the two decision tables separately. I wish there would be a way to bind it as a single DMN element.

Hi @barbaros.oezdemir
A DMN can have multiple decision tables as you can see in invoice Approval example comming from Camunda bpm platform.

can you share more information about the DMN and its decision tables that you want to build?

hi @mrdavoodi64

thank you very much for your fast reply. I tried to add a DMN diagram (e.g. the one from DMN Tutorial webpage about the selection of dishes and beverages) to my BPMN process. And I noticed two things:

  1. When I deploy this DMN diagram from the tutorial /simulator on Camunda Engine, the Engine is not showing me a single DMN but instead two DMN’s, one for dishes and one for beverages.
  2. When I want to add this DMN to my BPMN process I am forced to add two DMN Tasks, one for each of the two decision tables.

I wonder whether it would be possible to have a single deployment that contains both decision tables and if in BPMN process I could create a single DMN Task that receives the two variables (i.e. season, number of guests) for selection of the desired dish and the boolean value for guests with children. And the task would provide me with two outputs the desired dish and beverage?

Thank you.

Hey @barbaros.oezdemir ,

the engine shows you two DMN tables and one DRD. The relation of both tables is defined in the DRD. That means if you want to calculate beverages the input from the table dish is needed.

If you link now for example the DMN “beverages” to your BPMN model it means that whenever you arrive at the Decision task the whole tree of decision is executed. So in the case of the example dish and beverage will be executed. that means one you arrive at that task you need to make sure that this tasks receive all variables needed for both tables (season, number of guest, children).

the table itself will create the output of the beverages. You could change the table of beverages that it will provide you a second output variable. I think another way to get the dish as well is to use a listener or some script or expression inside your table. I haven’t tried it out myself but I think it must be possible

Regarding the deployment it is possible to have a single deployment with the DRD and the DMN.

If you really want just one DMN table you have to merge both logic into one table. However best practice wise it is better to break decisions down and link them in the DRD (as shown in the example). It makes it easier to understand the decision logic.

I hope that helps
Cheers
Nele

1 Like

Hi @Nele ,

thank you very much for your reply!! That is exactly what I was looking for and I just tried it and it worked like a charm :slight_smile: . It is great that we can combine multiple DMNs in one DRD this way.

(For everyone reading this ticket: The answer to my question is basically “yes”. It is possible to bind a DRD that contains multiple DMN tables. Just note that in the case of the sample DRD with two DMN tables -desiredDishes, beverages- it would return only the output of the last table “beverages”. )

Thanks a lot again for your reply & Have a great weekend!!

1 Like