getting the full error message

111 views
Skip to first unread message

Weaver Swenson

unread,
Sep 7, 2023, 11:47:59 AM9/7/23
to Kogito development mailing list
When trying DMN models with particular inputs, when It fails I get an error message in an exception thrown  RuleEngineException object, here is an example:

[DMN: Error invoking function 'getTaxpayerIDList' on node 'getTaxpayerIDList' (DMN id: _34AB2D86-6A28-4C87-B990-6EFB68BB8F31, Error invoking node or function) , DMN: FEEL ERROR while evaluating literal expression 'for rec in getList(derivedData, \"dynamicOffersData... [string clipped after 50 chars, total length is 246]': Not an invocable: 'null' (DMN id: _6641B82C-C0BE-4199-BB9E-FA8E800E13D2, FEEL expression evaluation error) ]

For some reason something is "clipping" the string and hiding most of the error information.   Is there some way to get around that and get the entire error message.

The error messages in the RedHat DMN engine are generally pretty good.  It is so frustrating that I can't see them.   Who put this length restriction on them?

Jozef Marko

unread,
Sep 8, 2023, 12:35:56 AM9/8/23
to kogito-de...@googlegroups.com
Hello Weaver,

I think the decision was made due to the 'not ideal' way we display similar long strings in the DMN Runner panel. However I was not part of this decision, so I can not say the precise reason for the decision.

Nevertheless, I found the place this is implemented:
https://github.com/kiegroup/drools/blob/main/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/util/MsgUtil.java see 'clipString' method

It was delivered as part of this ticket:
https://issues.redhat.com/browse/DROOLS-6665

You can report your request for a change of the current state in kie-issues:
https://github.com/kiegroup/kie-issues/issues


--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/5c6bf0fe-71b9-4ca1-a223-22e678119bean%40googlegroups.com.


--
Regards, Jozef
Red Hat Partner Engineer

Matteo Mortari

unread,
Sep 8, 2023, 1:52:00 AM9/8/23
to kogito-de...@googlegroups.com
Hi Keith,

> Who put this length restriction on them?

I was the one who put this restriction in the displayed message.
More importantly, also for the benefit of Jozef and the others, I believe is more interesting the Why.

> The error messages in the RedHat DMN engine are generally pretty good.  It is so frustrating that I can't see them.

Thank you, and I can empathize with your frustration.

The reason for clipping, is originating from a requirement to avoid "blowing up messages in the Business Central interface".
All things considered, this also avoided "blowing up" in server logs on the backend side.
I believe while somehow this requirement was originally "imposed" on me, I can stand behind the decision to implement clipping in the displayed message considering both aspects.

Another important aspect to highlight: in your message, you are reported of the id for the DMN element throwing the problem: I believe this is more effective in locating _where_ in the model this error occurred--more than comparing the expression from the message with all the expressions defined in all the elements of the model.
Consider this an analogous of line/col numbers for text based files, such as DRL.
Technically the "problematic element id" is also available as special fields in the message object itself (in addition to being reported trailing in the displayed message) and it's a pity the editor never ultimately leveraged this to directly navigate to the identifiable element, which in this case relates to the specific error message.

I hope this gives a complete background also to Jozef and the team.

In conclusion:
  • I would follow Jozef's suggestion to log ticket(s) as instructed in his previous email.
  • More than just increasing the length of clipping "arbitrarily", I would ask for an additional configuration property (as we have already) so to tune length or completely disable when valorized as -1 or the like.
  • I would raise an additional ticket to ask when a Message is selected in the Editor, the Editor can navigate to the identified DMN Element which was reported as problematic in the error, by using the appropriate field which was already available since (this is analogous to line/col numbers for text based DRL).
Hope this helps,
MM


Reply all
Reply to author
Forward
0 new messages