流程发布提交后生成的手册只有流程手册,没有表单、制度手册
This commit is contained in:
parent
66527ad69d
commit
694c1f15d7
Binary file not shown.
@ -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");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user