Designing a DMN for a specific use case

Can anybody help me to design a DMN solution for the following use case.
Input : Land_1,Land_2,…Land_27
Output: Domicile

Land_1 Land_2 Land_3 Land_4 Domizil
Vereinigtes Königreich Irland Wales Scotland Grossbritannien und Nordirland
Vereinigte Arabische Emirate
Polen Russland Tschechien Ungarn Emerging Markets Europa & Mittlerer Osten
Indien Indonesien Malaysia Pakistan Emerging Markets Asien
Brasilien Chile Kolumbien Mexiko Emerging Markets Lateinamerika
Katar Kuwait Saudi-Arabien Sudafrika Emerging Markets Übrige
Öesterreich Belgien Zypern Estland Euroland
Deutschland
Bulgarien Dänemark Kroatien Polen Europa ex Euroland
Schweiz
Kanada Vereinigte Staaten Nordamerika
Vereinigte Staaten
Brunei China Indonesien Japan Asien / Pazifik
übrige

What exactly is the problem you’re having?
Have you tried creating a table with these rows and columns?

1 Like

First of all. Thanks for replying to me. Great fan of yours.

So, the problem is that I got quite lot of Inputs and user wouldn’t supply all the inputs every single time. which makes it a bit tricky.
Rule 1.
So when it get few countries it has to somehow figure it out the common group to which all supplied inputs or countries belongs to.
For example 1 :
Input : Polen and Ungarn (Poland and Hungary)
Output: Emerging Markets Europa & Mittlerer Osten

For example 2 :
Input : Polen and Dänemark (Poland and Denmark)
Output: Europa ex Euroland

Rule 2. If it’s only one Input or Country, then it should simply return the same country name as output
For example:
Input: Dänemark
Output: Dänemark

Rule 3: If not all countries belong to a single group. then it should return übrige (others)
For example:
Input : Polen and Dänemark
Output : übrige (Others)

I see… So this is a little more complicated.

Firstly, how many inputs can a user send in, is there a limit to the number of counties?

Yes, Maximum inputs will be 27 Countries

Does the input come in as a single variable with all selected countries or are they 27 variables?

That we can decide. We make the input as a list of countries in a single variable or 27 individual variables

In that case, i feel the easiest way is to use the contains function on a single input.
And a Collecthit policy so that you can get the turn of all possible combinations.

1 Like

Ok interesting. I’m not so sure, whether this will resolve my problem but i’ll give it a try. Meanwhile, can you pls give me your inputs on Rule 2 & Rule 3?

But unfortunately, it didn’t resolve any of the problems (mentioned under Rules 1,2 & 3). Btw, Contains(…) gave me an syntax error. But without keyword “Contains” i.e. simply lie “irland”,“Wales”,“scotland” gave the desired result which you are trying to achieve.

The suggestion from @Niall goes in the right direction :+1:

Use a decision table with the hit policy First.

First, check if the input contains only one country.

If not then check all groups of countries.

At the end, add a default rule that matches if no previous rule matches.

Does this help you?

3 Likes