Просмотр исходного кода

禁止子流程复用父流程历史名称

发布子流程时强制使用自身生成名称,不再读取父流程历史 JPDL 的 process name,彻底避免 website.articleRelease2021hKBGHZ 与 1-10004-发布 的 name/key 冲突。\n\nValidation:\n- bash local-run/bin/compile-hxcs-deploy-classes.sh\n- git diff --cached --check
非繁 2 недель назад
Родитель
Сommit
042ce6663d
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      src/space/apps/moudules/basic/services/FlowService.java

+ 5 - 1
src/space/apps/moudules/basic/services/FlowService.java

@@ -437,7 +437,11 @@ public class FlowService extends BaseTransaction {
 	String alignProcessNameWithReleasedVersion(GeneralDBAccess baseGdba, Long mkid, BpmLc bigBpmLc, BpmLc bpmLc, BpmLctfbjl currentRelease, String jpdlXmlContent) throws Exception {
 		Long beforeBbh = currentRelease != null ? currentRelease.getBbh() : null;
 		String targetProcessKey = extractProcessKey(jpdlXmlContent);
-		String targetProcessName = getReleasedProcessName(baseGdba, mkid, bpmLc.getLcid(), beforeBbh, targetProcessKey);
+		boolean isChildFlow = StringUtil.notNull(bigBpmLc.getLcid()) && StringUtil.notNull(bpmLc.getLcid())
+				&& !bigBpmLc.getLcid().equals(bpmLc.getLcid());
+		// 子流程必须使用自身名称。历史子流程曾错误引用了父流程 JPDL,不能复用其中的 process name。
+		String targetProcessName = isChildFlow ? null
+				: getReleasedProcessName(baseGdba, mkid, bpmLc.getLcid(), beforeBbh, targetProcessKey);
 		if (StringUtil.isNull(targetProcessName)) {
 			Long lclbid = StringUtil.notNull(bigBpmLc.getLclbid()) ? bigBpmLc.getLclbid() : bpmLc.getLclbid();
 			targetProcessName = mkid + "-" + lclbid + "-" + bpmLc.getMc();