[Improvement-17942][API&UI]Add startParams validation logic in both the frontend and backend.#17956
Open
njnu-seafish wants to merge 8 commits intoapache:devfrom
Open
[Improvement-17942][API&UI]Add startParams validation logic in both the frontend and backend.#17956njnu-seafish wants to merge 8 commits intoapache:devfrom
njnu-seafish wants to merge 8 commits intoapache:devfrom
Conversation
SbloodyS
requested changes
Feb 10, 2026
Comment on lines
294
to
297
| // UI configuration state from form management hook | ||
| ...startState.startForm, | ||
| // Business data injected from modal operations hook | ||
| startParamsList: variables.startParamsList |
Member
There was a problem hiding this comment.
Suggested change
| // UI configuration state from form management hook | |
| ...startState.startForm, | |
| // Business data injected from modal operations hook | |
| startParamsList: variables.startParamsList | |
| ...startState.startForm, | |
| startParamsList: variables.startParamsList |
Contributor
Author
There was a problem hiding this comment.
// UI configuration state from form management hook
ok
Comment on lines
87
to
102
| // null key | ||
| if (StringUtils.isEmpty(param.getProp())) { | ||
| throw new ServiceException("Parameter key cannot be empty"); | ||
| } | ||
|
|
||
| String key = param.getProp().trim(); | ||
| // duplicate keys | ||
| if (keys.contains(key)) { | ||
| throw new ServiceException("Duplicate parameter key: " + key); | ||
| } | ||
| keys.add(key); | ||
|
|
||
| // IN-type params require a non-empty value | ||
| if (Direct.IN.equals(param.getDirect()) && StringUtils.isEmpty(param.getValue())) { | ||
| throw new ServiceException("IN parameter value cannot be empty for key: " + key); | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| // null key | |
| if (StringUtils.isEmpty(param.getProp())) { | |
| throw new ServiceException("Parameter key cannot be empty"); | |
| } | |
| String key = param.getProp().trim(); | |
| // duplicate keys | |
| if (keys.contains(key)) { | |
| throw new ServiceException("Duplicate parameter key: " + key); | |
| } | |
| keys.add(key); | |
| // IN-type params require a non-empty value | |
| if (Direct.IN.equals(param.getDirect()) && StringUtils.isEmpty(param.getValue())) { | |
| throw new ServiceException("IN parameter value cannot be empty for key: " + key); | |
| } | |
| if (StringUtils.isEmpty(param.getProp())) { | |
| throw new ServiceException("Parameter key cannot be empty"); | |
| } | |
| String key = param.getProp().trim(); | |
| if (keys.contains(key)) { | |
| throw new ServiceException("Duplicate parameter key: " + key); | |
| } | |
| if (Direct.IN.equals(param.getDirect()) && StringUtils.isEmpty(param.getValue())) { | |
| throw new ServiceException("IN parameter value cannot be empty for key: " + key); | |
| } | |
| keys.add(key); |
SbloodyS
reviewed
Feb 10, 2026
Comment on lines
81
to
83
| if (startParamList == null || startParamList.isEmpty()) { | ||
| return; | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| if (startParamList == null || startParamList.isEmpty()) { | |
| return; | |
| } | |
| if (CollectionUtils.isEmpty(startParamList)) { | |
| return; | |
| } |
Contributor
Author
There was a problem hiding this comment.
if (CollectionUtils.isEmpty(startParamList)) {
good
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Purpose of the pull request
close #17942
Brief change log
Add startParams validation logic in both the frontend and backend.
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
Pull Request Notice
Pull Request Notice
If your pull request contains incompatible change, you should also add it to
docs/docs/en/guide/upgrade/incompatible.md