-
Notifications
You must be signed in to change notification settings - Fork 6
[NAE-2359] SetData endpoint no longer calls getData event on dataGrou… #407
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
…ps resolving - added flag whether events are disabled when getting data - added new interface methods to ensure backward compatibility
WalkthroughAdded boolean Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
application-engine/src/main/java/com/netgrif/application/engine/workflow/service/DataService.java (1)
165-218: Wrap finalGetDataEventpublication witheventsEnabledcheck for consistency.The final event published at line 218 (
publisher.publishEvent(new GetDataEvent(outcome, user))) is not gated by theeventsEnabledflag, while the per-field PRE/POST events at lines 166-167 and 201-202 correctly respect this flag. This creates an inconsistency: wheneventsEnabled=false, callers expect event publication to be suppressed, but this completion event still fires regardless.Suggested fix
LongStream.range(0L, dataSetFields.size()) .forEach(index -> dataSetFields.get((int) index).setOrder(index)); outcome.setData(dataSetFields); - publisher.publishEvent(new GetDataEvent(outcome, user)); + if (eventsEnabled) { + publisher.publishEvent(new GetDataEvent(outcome, user)); + } return outcome;
🤖 Fix all issues with AI agents
In
`@application-engine/src/main/java/com/netgrif/application/engine/workflow/service/interfaces/IDataService.java`:
- Around line 30-43: Add Javadoc to the new IDataService.getData overloads
documenting the eventsEnabled parameter: update the interface methods (all
getData variants that include the boolean eventsEnabled) to include a
description of what eventsEnabled controls (e.g., when false suppress PRE/POST
data events and publisher notifications), default behavior when omitted, and any
side effects or expectations for callers; ensure the Javadoc appears on each
overloaded signature that accepts eventsEnabled and clearly states its purpose
and behavior.
Description
Added flag whether to execute events on getData in DataService.
Fixes NAE-2359
Dependencies
No new dependencies were introduced.
Third party dependencies
Blocking Pull requests
There are no dependencies on other PR.
How Has Been This Tested?
This was tested manually and with unit tests.
Test Configuration
Checklist:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.