DMN: error parsing certain input values

690 views
Skip to first unread message

Frank Langelage

unread,
Sep 27, 2015, 3:19:07 PM9/27/15
to camunda BPM users
Hello,

I tried to implement some of our existing decision tables in DMN logic and encountered 2 problems so far:
1. a hyphen as input value: I tried inputEntry text with and without quotes, both result in errors. See below.
2. enumeration of values: values LIK or REK alone work fine, but how to define an enumeration like LIK,REK or even a range like W0000 to W9999 for string values?

Errors for 1.:
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput-}': syntax error at position 12, encountered '}', expected <IDENTIFIER>|<STRING>|<FLOAT>|<INTEGER>|'true'|'false'|'null'|'-'|'!'|'not'|'empty'|'('
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput"-"}': syntax error at position 11, encountered '-', expected '}'

Errors for 2.:
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput"LIK","REK"}': syntax error at position 11, encountered 'LIK', expected '}'
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput"["LIK","REK"]"}': syntax error at position 11, encountered '[', expected '}'
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput"{"LIK","REK"}"}': syntax error at position 11, encountered '{', expected '}'
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput["LIK","REK"]}': syntax error at position 17, encountered ',', expected ']'
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput[("LIK","REK")}': syntax error at position 18, encountered ',', expected ')'
Caused by: de.odysseus.el.tree.TreeBuilderException: Error parsing '${cellInput[LIK,REK]}': syntax error at position 15, encountered ',', expected ']'

Cheers, Frank

DT_neu_10021.dmn

Sebastian Menski

unread,
Sep 27, 2015, 3:41:14 PM9/27/15
to camunda BPM users
Hi Frank,

thanks for already testing the DMN implementation. Currently the input entries are evaluated as JUEL expressions. This also involves some
best guess transformations if the input entry is not already an expression. This will change in the next week as we implement FEEL for the
input entries [1]. This new implementation will allow you to use a hyphen (as don't care) and lists of matching values. Also ranges but only 
for number or date values. So you will be able to specify [0..9999] but not [W0000..W9999].

Currently you have to write JUEL expressions for your use cases. So if you want to test against two options:
${cellInput == "LIK" || cellInput == "REK"}

The cellInput is a special variable which is the result of your input expression (column header). You can change the name by setting the camunda:output attribute on the input
clause in the DMN XML.

If you actually want to test that your input is a hyphen you could write:
== "-"

But if the hyphen should be a don't care you can just omit it.

Cheers,
Sebastian

Reply all
Reply to author
Forward
0 new messages