JUEL/MVEL support in Modeler for DMN

Hi Guys, Just exploring Flowable. Started playing with modeler but couldn’t figure out a way to use conditions for rules. Any thoughts?

Thanks for your time.

Hi,

A good place to get started is the docs (http://www.flowable.org/docs/userguide-dmn/index.html#whatIsDmn).
But the Flowable DMN editor is supporting JUEL for expressions. So any JUEL expression that evaluates to a boolean can be used in a rule. But you can also use the simple input conditions without JUEL expressions with for example a < 40 condition for a number variable.

Best regards,

Tijs

@tijs Thanks for your reply.

I understand JUEL is supported but not sure how it can be modelled on Modeller though. Not sure if operations dropdown (please see attachment screenshot ) is relevant when using JUEL. Any thoughts?

Hi,

Ok. When you defined a JUEL expression like ${test == ‘test’} in the cell then the operator and even the variable name in the input column are ignored. So the JUEL expression like it is filled in will be executed as-is.

Best regards,

Tijs

Understood now @tijs. Thanks.

I think we should “expression” as data type and hide operators when it chosen. Is GitHub is the right place create this feature request?

I wasn’t fully complete about this. Defining a full JUEL expression is optional, and you can also use it to define the expression after the input variable name and operator. Only if the rule starts with ${ the rule is taken as-is. If the rule is define like:

 == "Pass" &amp;&amp; inputVar > 1

Then this will be transformed to a JUEL expression like:

 ${test == "Pass" &amp;&amp; inputVar > 1}

So in this case the operator is still used. So the logic should check if the rule starts with ${ or #{ and then the operator should be disabled.

Yes Github is the right place to add a feature request.

Best regards,

Tijs

Thanks @tijs. Very much appreciate it.

Sorry, just one last question on this. Any idea how can we validate DMN JUEL expressions for syntax errors?

Hi,

Good point, that’s not so easy :-). The only possibility I can think of is to really execute the JUEL expression with an example variable value that the user provides.

Best regards,

Tijs