diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar index ed5c1963..c1f1b263 100644 Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java index 21cbf770..a109bf6c 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java @@ -3190,6 +3190,40 @@ public class ProcessPublishWeb extends ActionWeb { return ro.toString(); } + /** + * 创建手册 + * @param model + * @param wsId + * @param userId + * @param teamId + * @param uuid + * @return + */ + private String createOutputReport(PALRepositoryModel model, String wsId, String userId, String teamId, String uuid) { + String taskId = ""; + if (model.getMethodId().contains("process.")) { + taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, userId, teamId, uuid); + JSONObject object = JSONObject.parseObject(taskId); + if ("ok".equals(object.getString("result"))) { + taskId = object.getJSONObject("data").getString("taskId"); + } + } else if ("data.form".equals(model.getMethodId())) { + taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, userId, teamId, uuid); + JSONObject object = JSONObject.parseObject(taskId); + if ("ok".equals(object.getString("result"))) { + taskId = object.getJSONObject("data").getString("taskId"); + } + } else if ("control.policy".equals(model.getMethodId())) { + taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, userId, teamId, uuid); + JSONObject object = JSONObject.parseObject(taskId); + if ("ok".equals(object.getString("result"))) { + taskId = object.getJSONObject("data").getString("taskId"); + } + } + return taskId; + } + + /** * 对未创建手册的流程进行创建流程手册 */ @@ -3208,7 +3242,23 @@ public class ProcessPublishWeb extends ActionWeb { service.execute(() -> { // 创建流程手册 String publishFileId = bn.getString("PUBLISHFILEID"); - String newTaskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), "", publishFileId); + PALRepositoryModel model = PALRepositoryCache.getCache().get(publishFileId); + if ("default".equals(model.getMethodId())) { + SDK.getLogAPI().consoleErr("流程发布表单[发布]提交时创建流程手册失败,processInstId=" + processInstId + ",publishFileId=" + publishFileId); + } + // 校验流程手册是否安装并启动 + if (model.getMethodId().contains("process.") && !SDK.getAppAPI().isActive("com.actionsoft.apps.coe.pal.output.pr")) { + SDK.getLogAPI().consoleErr("[流程手册未安装]流程手册更新失败"); + } + if ("data.form".equals(model.getMethodId()) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.bd")) { + SDK.getLogAPI().consoleErr("[表单手册未安装]流程手册更新失败"); + } + if ("control.policy".equals(model.getMethodId()) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.zd")) { + SDK.getLogAPI().consoleErr("[表单手册未安装]流程手册更新失败"); + } + + String newTaskId = createOutputReport(model, model.getWsId(), _uc.getUID(), "", model.getId()); + JSONObject object = JSONObject.parseObject(newTaskId); if ("ok".equals(object.getString("result"))) { newTaskId = object.getJSONObject("data").getString("taskId"); @@ -3232,7 +3282,23 @@ public class ProcessPublishWeb extends ActionWeb { service.execute(() -> { // 创建流程手册 String changedFileIdNew = bc.getString("CHANGEDFILEIDNEW"); - String newTaskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), "", changedFileIdNew); + + PALRepositoryModel model = PALRepositoryCache.getCache().get(changedFileIdNew); + if ("default".equals(model.getMethodId())) { + SDK.getLogAPI().consoleErr("流程发布表单[发布]提交时创建流程手册失败,processInstId=" + processInstId + ",changedFileIdNew=" + changedFileIdNew); + } + // 校验流程手册是否安装并启动 + if (model.getMethodId().contains("process.") && !SDK.getAppAPI().isActive("com.actionsoft.apps.coe.pal.output.pr")) { + SDK.getLogAPI().consoleErr("[流程手册未安装]流程手册更新失败"); + } + if ("data.form".equals(model.getMethodId()) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.bd")) { + SDK.getLogAPI().consoleErr("[表单手册未安装]流程手册更新失败"); + } + if ("control.policy".equals(model.getMethodId()) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.zd")) { + SDK.getLogAPI().consoleErr("[表单手册未安装]流程手册更新失败"); + } + + String newTaskId = createOutputReport(model, model.getWsId(), _uc.getUID(), "", model.getId()); JSONObject object = JSONObject.parseObject(newTaskId); if ("ok".equals(object.getString("result"))) { newTaskId = object.getJSONObject("data").getString("taskId");