-
Notifications
You must be signed in to change notification settings - Fork 221
kie-issues#315: DMN Runner table view should display validation messages #2943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Kusuma04-dev , thank you for the pull request. It will be very helpful for users to see these messages from backend 💪 .
However it seems we need to improve our code for transforming backend data into UI data. Once I created model with three decisions, the message was 'tripled' there. See the attached screenshot.
Thanks Jozef for the review, I have missed to check this type of scenario. I have handled now.Please validate. |
2357721
to
7615a7d
Compare
7615a7d
to
28c003d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kusuma04-dev Thanks for addressing this bug! I've made some comments and questions inline regarding some of your choices.
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
Outdated
Show resolved
Hide resolved
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
Outdated
Show resolved
Hide resolved
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
Outdated
Show resolved
Hide resolved
I will do my re-review after @ljmotta points are addressed, as he asked code changes that may change the final behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kusuma04-dev hi, I have a question, if DmnRunnerContextProvider
could somehow reduce/aggregate messages information, to contain also row number. I mean, lest say we show validation messages for three rows, it would be nice to have some prefix in the message saying what row it is related to.

Hi @jomarko , In case of form , we are showing messages for that particular row only , so i feel it's understandable without row number also , WDYT?For example if we have 3 rows then if u select row 1 - only messages related to that row will display and if u go to row 2 then only messages related to row 2 will display. but in case of table ,might be needed to show row numbers as we are displaying all messages at a time.Let me check if it is possible. |
@Kusuma04-dev yes, I am sorry that I was not clear in my last comment. It is fine for me to keep |
f905ad3
to
0ecde63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current content of the execution tab may be very overwhelmed. What @ljmotta mentioned, the aggregation using node name could help. It would bring some consistency into the app behavior that could help with a user experience.
What do you think about change form:
Current
to
Proposal
I have used model and data
@jomarko I agree with Jozef. We need to keep the errors under the node name, or having multiple errors can be very dificult to track. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR @Kusuma04-dev ! I've made a comment inline.
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kusuma04-dev Thanks! LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue in the DMN Runner table view by ensuring that validation messages are now directly obtained from the extended services response instead of relying solely on decision results. Key changes include:
- Returning an additional property, invalidElementPaths, in ExtendedServicesClient.ts.
- Introducing new state hooks and helper functions in DmnRunnerContextProvider.tsx for handling and mapping response messages and invalid element paths.
- Updating the ExtendedServicesDmnResult interface in dmnResult.ts to include invalidElementPaths.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/online-editor/src/extendedServices/ExtendedServicesClient.ts | Updated error handling to return invalidElementPaths along with messages. |
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx | Added state hooks and logic for processing response messages and invalid element paths, and introduced a helper function for decision ID lookup. |
packages/extended-services-api/src/dmnResult.ts | Extended the result interface with the invalidElementPaths property. |
Comments suppressed due to low confidence (1)
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx:338
- The function name 'findDecisionIdIdBySourceId' is ambiguous due to the repeated 'Id'. Consider renaming it to 'findDecisionIdBySourceId' to improve clarity.
const findDecisionIdIdBySourceId = useCallback(
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I am approving the PR. I am opening some points for discussion in private slack channel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, @Kusuma04-dev
…ges (apache#2943) Co-authored-by: chinnamatli kusumalatha <[email protected]>
closes apache/incubator-kie-issues#315 DMN Runner table view should display validation messages

Before fix:
we are displaying messages from decisionresults which is in response because of this few error messages are not getting displayed.
example: using round up function
After fix:

Now we are displaying the messages directly from response.
Example: