Is there a way to set a default value to a DMN input variable if it is null. By null I mean that this variable is not present in the execution context.
The variable is called effectiveCosts. It is not created in every process. But each process goes through a DMN table that needs the variable effectiveCosts.
Therefore, I want to give this variable a “default value” of 0.
Is this possible with an input expression in the DMN table?
Dear Sven,
welcome to Camunda forum!
Yes it’s definitely possible to achieve what you are trying to do.
In the “When” expression of your Decision table you can use the following expression:
if effectiveCosts = null then 0 else effectiveCosts
In the documentation page here you can see the following statement:
Any value can be compared with null to check if it is equal to null , or if it exists.