Remove duplicate results from DMN output

I have a DMN table with Rule Order hit policy, which returns multiple results. Because of complexity of my rules, I had repeat some of outputs, and now it returns duplicate results. Is there any way I can remove duplicate outputs, and make them unique?

So I want to convert a [“A”, “A”, “B”, “C”, “C”, “C”] output to [“A”, “B”, “C”].

Hi @pashazadeh :wave:

This sounds like a use case for the distinct values() function.

For example, using this function in a decision literal expression that takes the result of the decision table.

Does this help you?

1 Like

hey, that seems to be the answer, so should I create a Literal Expression Decision?
how should be the expression in it? FEEL?
should variable type be list< string > or something more java like, such as java.util.List < String >?

unfortunately I couldn’t find very good samples of DMN :frowning:

I have added a Literal Expression Decision with FEEL expression of distinct values(requiredAuthorities) and that worked, thanks.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.