DMN Input Variables

Hey guys,

I have a DMN Table embedded in a BPMN Process.

I want to use JUEL in a RULE based on a INPUT EXPRESSION of this DMN .
My INPUT EXPRESSION resolves a big object which I don’t want to save a Process Variable in Process Instance. Furthermore it is not possible to serialize this object.
Is their any way to deliver the INPUT Parameters from Process Instance to DMN but don’t persist them as process variables.
They should only “live” for the scope of Decision Table.

So far my only idea is to call a service from DMN Activity which calls DMN Service programatically.

Any other possibilities?

Best regards,

Markus

Hi Markus,

usually, you would use process variables as input of the decision table. However, it should also work if you use a bean to store the information. In the decision table, you can access this bean and get the information. Note that you have to take case of the scope (i.e. visibility of the information) by yourself.

Does this help you?

Best regards,
Philipp

Hi Philip,

I am working in a spring context. So every spring bean is available in BPMN process.
Can I also access them directly from a DMN Rule via JUEL expression?
Then I could load data from database in DMN Table.

Would there be no INPUT EXPRESSION in this example?

Not sure if I understand you correctly sorry,

Best regards,

Markus

Hi Markus,

yes, you can access a Spring bean in an input expression using JUEL - see the User Guide. It’s just the same way as in a BPMN process.

Inside the Spring bean, you can do anything to get the information. Maybe, you can avoid loading the information from database if they’re already present somehow.

Beside that, keep in mind that the result of the input expression is stored in the history if enabled. Is this a problem for you?

Best regards,
Philipp

Hi Philip,

yes thats a problem because the object I want to retrieve is not serializable so I ca not store it in history schema.
Furthermore if I do an input expression like ${myBean.getInputExpression()} under which name is the result accessable in RULE?

My use case is to check values of this object loaded by Input Expression in DMN Rules. So if they are null or filled with values.

Best regards,

Markus

Hi Markus,

the result of the input expression is stored in a variable “cellInput” by default. You can also change the variable name - see the reference guide.

Can you share an example of your decision table and the object which holds the values?

Best regards,
Philipp