Is there an option to make an else on dmn?

Hello,

I’m facing an issue with a DMN decision table where I’m getting an unwanted output in specific cases. Here’s a summary of my scenario:

Inputs and Execution Context:

  • Product (produit): “sante”
  • Age (age): 26
  • Number of Properties (nombreDePropriete): null
  • Medical History (antecedentMedicaux): “oui”

Given these inputs, the output I receive is:

  • Coverage (couverture): [dentaire, optique, hospitalisation, pas de couverture]

this is a screenshot from the cockpit :

Issue

I want to prevent "pas de couverture" from being returned in cases where other coverage options apply (such as “dentaire,” “optique,” or “hospitalisation”).

Question

Is there a way to specify a “default” or “else” rule that only executes if no other rules match? I’d like to make sure "pas de couverture" is only returned if the inputs don’t satisfy any other rule.

Thanks in advance for any guidance on how to achieve this!

1 Like

Hi @OUSSAMA_TAYARI_0
I don’t think it’s possible with the Rule Order hit policy. This feature is available out of the box with the First hit policy (by adding a catch-all rule as the last row), but whether you can use it here depends on your specific business case.

Regards,
Alex

1 Like

You can update your DMN like this, and it will work correctly.

3 Likes

And here is another solution

1 Like

thanks @mariem.nj this solution worked for me.

1 Like

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