com.tlv8.flw.FlowControler
start如果没有指定processid则根据功能路径获取
if (processID == null || "".equals(processID) || "undefined".equals(flowID)) { processID = seachProcessID(srcPath, request); } flowID = startflow(processID, sdata1);
启动流程时执行人为自己自己给自己创建任务
List<OrgUtils> ePersonList = new ArrayList<OrgUtils>(); ePersonList.add(new OrgUtils(request)); FlowActivity flwA = new FlowActivity(processID, "start"); taskID = flowout(flowID, flowID, sdata1, ePersonList, flwA.getAfterActivity(request));
@RequestMapping("/flowstartAction")
out需要指定 flowID 和 taskID
先获得当前环节流程图
String processID = TaskData.getCurrentProcessID(taskID); String Activity = TaskData.getCurrentActivity(taskID); FlowActivity flwA = new FlowActivity(processID, Activity);
获取下一环节信息
List<FlowActivity> aftAList = new ArrayList<FlowActivity>(); if (!"".equals(afterActivity) && afterActivity != null) { aftAList = new ArrayList<FlowActivity>(); aftAList.add(new FlowActivity(processID, afterActivity)); } else { aftAList = flwA.getAfterActivity(flowID, taskID, sdata1, request); }
获取下一环节执行人
if ((epersonids.indexOf(",") > 0)) { String[] excutors = epersonids.split(","); for (int i = 0; i < excutors.length; i++) { OrgUtils OrgU = new OrgUtils(excutors[i]); ePersonList.add(OrgU); } } else { OrgUtils OrgU = new OrgUtils(epersonids); ePersonList.add(OrgU); }
如果未指定执行人则需要提示前台选择
执行流转
flowout(flowID, taskID, sdata1, ePersonList, aftAList);
@RequestMapping("/flowoutAction")
back将任务退回上一环节
flowback(flowID, taskID);
@RequestMapping("/flowbackAction")
将当前环节任务转给其他人处理
String processID = TaskData.getCurrentProcessID(taskID); String Activity = TaskData.getCurrentActivity(taskID); FlowActivity flwA = new FlowActivity(processID, Activity); flowforward(flowID, taskID, ePersonList);
@RequestMapping("/flowtransmitAction")
任务不需要再执行,则可以取消任务
TaskData.FlowCancel(flowID, taskID);
@RequestMapping("/flowcancelAction")
流程出错或流程不再流转时可以终止流程
TaskData.FlowAbort(flowID, taskID);
@RequestMapping("/flowstopAction")
Powered By layui