-
Notifications
You must be signed in to change notification settings - Fork 7
Ensure process ID and identifier are non-empty in case creation. #412
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
Refine condition checks by validating that `processId` and `processIdentifier` are not empty strings. This prevents potential issues caused by invalid or incomplete input during case creation.
WalkthroughAdds non-empty string validation to process references in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 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
🤖 Fix all issues with AI agents
In
`@application-engine/src/main/java/com/netgrif/application/engine/workflow/service/WorkflowService.java`:
- Around line 343-345: The validation currently uses String.isEmpty() on
createCaseParams.getProcessId() and createCaseParams.getProcessIdentifier()
which allows whitespace-only values to pass; change those checks to use
String.isBlank() so whitespace-only strings are treated as empty and handled the
same way (update the if condition around createCaseParams.getProcessId() and the
else-if for createCaseParams.getProcessIdentifier() in WorkflowService methods
that construct new ObjectId(createCaseParams.getProcessId()) / call
petriNetService.get()).
Description
Updated empty string handling when creating new cases and added additional global function cache loading before executing pre-upload events.
Dependencies
No new dependencies were introduced
Third party dependencies
No new dependencies were introduced
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