[fix-3843][api] When the update workflow definition name already exists, the prompt is not friendly add process define name verify.#3864
Merged
lgcareer merged 1 commit intoapache:devfrom Oct 14, 2020
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
Contributor
|
can you mention the code in 1.3.3-release |
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.
What is the purpose of the pull request
#3843
problem:
The workflow definition name already exists, saved workflow ,prompt: update workflow definition error
The reason for this problem is that the user tenant or queue or project is empty. When the workflow definition is saved, the verification of the workflow definition name fails, the projectId and processDefineName construct unique constraints, and the workflow update fails when the data is saved.
I think that the workflow definition name verification only needs to verify the existence of projectId and processDefineName,The original query method is called in many places without modification.
add verifyByDefineName
Brief change log
add ProcessDefinitionMapper.verifyByDefineName(int projectId,String name)
Verify this pull request
This change added tests and can be verified as follows:
##拉取请求的目的是什么
问题
工作流程定义名称已存在,更新工作流定义,保存名称,提示:更新工作流程定义错误
出现这个问题的原因,用户租户或队列或项目为空导致,导致工作流定义保存时,工作流定义名称验证失败,projectId和processDefineName构建唯一约束,数据保存时报工作流更新失败。
我认为工作流定义名称验证,只需要验证projectId和processDefineName是否存在即可,原查询方法多处调用,并未做修改。
add verifyByDefineName
##简要更改日志
新增ProcessDefinitionMapper.verifyByDefineName(int projectId,String name)