How to validate dmn table for correct input

138 views
Skip to first unread message

shilimkar...@gmail.com

unread,
Jan 22, 2016, 2:30:45 AM1/22/16
to camunda BPM users
Hello,

I have just started to use dmn modeler. I have integrated dmn modeler UI in my web application and able to create dmn table.

But I have no idea how I can validate inputs of dmn table while/after filling table values.

For example,
If I give datatype for input a String and if I forgot to write it in double quotes then it needs to be validated there itself.

or if one can write same expression for multiple input etc.

How we can validate overall dmn table?

Please correct/comment if I am wrong!


Thank you,
Prashant

Bharat

unread,
Feb 15, 2016, 11:29:59 AM2/15/16
to camunda BPM users, shilimkar...@gmail.com
Hi Prashant,

Hope you are well.

I have a similar use case, which needs an embeddable modeler with verification. Since you have already completed the embedding part, let me shamelessly ask one thing! Is there a possibility that you could opensource what you have done?

Look forward to hearing from you.

cheers
-B

shilimkar...@gmail.com

unread,
Feb 16, 2016, 12:54:08 AM2/16/16
to camunda BPM users, shilimkar...@gmail.com
Hello Bharat,

First thing is, I am not using their modeler UI to view DMN table. I am using my own UI to view and to create rule.

Now, Which specific part are you looking for.If its validations for inputs then I am still not 100% sure about validations what I did.

I have used following to validate expression with dummy inputs,

FeelEngine feelEngine = new FeelEngineFactoryImpl().createInstance();
feelEngine.evaluateSimpleUnaryTests(expression, inputName, variableContext);

You can refer, https://github.com/camunda/camunda-engine-dmn/blob/master/feel-juel/src/test/java/org/camunda/bpm/dmn/feel/impl/FeelExceptionTest.java

But the point here is, It gives error for an invalid expressions such as "9 <=" BUT It not give error for expressions like "[8...9]" is an invalid expression(three dots).

Philipp Ossler

unread,
Feb 16, 2016, 3:12:57 AM2/16/16
to camunda BPM users, shilimkar...@gmail.com
Hi Prashant,

please note that "[8...9]" is a valid expression in FEEL. It specifies an interval between 8 and .9 (i.e. 0.9).

Greetings,
Philipp  

shilimkar...@gmail.com

unread,
Feb 16, 2016, 6:06:29 AM2/16/16
to camunda BPM users, shilimkar...@gmail.com
Hello Philipp,


Let me explain my self.

For expression [8...9],

feelEngine.evaluateSimpleUnaryTests(expression, inputName, ariableContext);

above feelEngine test call not show an error as feel accepts three dots. BUT DMN engine not return output for input number between 8 and 9.

Regards,
Prashant


On Friday, January 22, 2016 at 1:00:45 PM UTC+5:30, shilimkar...@gmail.com wrote:

Philipp Ossler

unread,
Feb 16, 2016, 6:40:11 AM2/16/16
to camunda BPM users, shilimkar...@gmail.com
Hi Prashant,

DMN engine works correctly. The expression does not mean between 8 and 9. It means between 8 and 0.9. FEEL allows to write the number "0.9" as ".9". So it can never be true.

I understand that it is hard to see because of 3 dots but only two dots are for the interval. The expression is equal to "[8 .. 9]" or "[8..0.9]".

Greetings,
Philipp

shilimkar...@gmail.com

unread,
Feb 16, 2016, 7:12:27 AM2/16/16
to camunda BPM users, shilimkar...@gmail.com
Hello Philipp,

Aaah, :D as you said it was difficult to understand if you don't know. Sorry, My bad, not read your reply correctly. Thanks for reply :)

Regards,
Prashant


On Friday, January 22, 2016 at 1:00:45 PM UTC+5:30, shilimkar...@gmail.com wrote:

Reply all
Reply to author
Forward
0 new messages