提交 fd4af240 编写于 作者: sq3536's avatar sq3536

工作流编程

上级 5e81e604
......@@ -248,7 +248,29 @@ public class WFCoreService
public WFProcessInstance wfsubmit(String system,String appname,
String entity,String businessKey,String taskId,WFTaskWay taskWay) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
throw new BadRequestAlertException("未传入当前用户",entity,businessKey);
if(StringUtils.isEmpty(taskId)){
taskId=taskWay.getTaskid();
}
String processInstanceBusinessKey=system+":"+entity+":srfkey-"+businessKey;
Map<String, Object> variables = new LinkedHashMap<>();
variables.put("businessKey",businessKey);
variables.put("sequenceFlowId",taskWay.getSequenceflowid());
variables.put("cloud-serviceid",system+"-app-"+appname);
variables.put("entitys",entity);
Map<String, Object> transientVariables = new LinkedHashMap<>();
transientVariables.put("activedata",taskWay.get("activedata"));
transientVariables.put("curuser",AuthenticationUser.getAuthenticationUser());
//根据流程定义启动流程
Authentication.setAuthenticatedUserId(userId);
taskService.complete(taskId, variables,transientVariables);
WFProcessInstance instance = new WFProcessInstance();
instance.setBusinesskey(processInstanceBusinessKey);
return instance;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册