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 c56cfc35..2ff201fc 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 @@ -605,6 +605,8 @@ public class ProcessPublishWeb extends ActionWeb { else if ("check".equals(selectionmode) || "checkInherit".equals(selectionmode)) processDefId = appApi.getProperty(PublisherConstant.PUBLISH, "publishProcessId"); ProcessDefinition processDef = (ProcessDefinition) ProcessDefCache.getInstance().getModel(processDefId); + + // 先建立bo再运行任务 // 创建流程实例 ProcessInstance processInstModel = null; @@ -614,6 +616,7 @@ public class ProcessPublishWeb extends ActionWeb { e.printStackTrace(); return ResponseObject.newErrResponse(e.getMessage()).toString(); } + SDK.getProcessAPI().setVariable(processInstModel, "createType", "pal"); BO bo = new BO(); bo.set("TEAMID", teamId); bo.set("TEAMNAME", teamName); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishLoadBefore.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishLoadBefore.java index 17c3bd90..ba22bf23 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishLoadBefore.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishLoadBefore.java @@ -46,7 +46,7 @@ public class PublishLoadBefore extends ExecuteListener { return; } //如果是1是从oa创建,就不用再获取 - if (variable==null) { + if ("pal".equals(variable)) { System.err.println("===表单加载前创建====>"); // 根据部门名称 和单位 计算出 内部校对人 和流程经理 UserContext me = ctx.getUserContext();