Not able to throw error message back

Hi All, I have one query. My requirement is to validate Camunda decision rule execution request fields, before actually executing a rule.

For that I am exploring a possibility of validating fields under input expression . It can be in javascript or FEEL. I am able to validate the fields but in case validation fails for some field, I need to throw a meaning error message back to the calling client. I am not able to throw this error message back . Any on time help is pretty much required and appreciated. Please advise.

Hi @VishalN24 :wave:

that is an interesting question.

It is not possible to throw an error (event) from a DMN. This also doesn’t fit to the intention of DMN.

One option is to do the validation in a previous step before evaluating the actual DMN (i.e. separate the different concerns). For example, using another business rule task that checks if the request is valid and returns valid/not valid (as string/boolean) including the violations. Or, do the check in a script/service/external task.

Does this help you?

Best regards,
Philipp