|
楼主 |
发表于 2013-10-29 13:32:04
|
显示全部楼层
//通过标准的process组件来启动流程
function batchStartProcess(dataID, processID){
var data = justep.xbl(dataID);
// data.filters.setFilter("filter4", "OA_sonIncomingFileDeal='" + data.getRowId() + "'");
// data.filters.setFilter("filter5", "OA_sonIncomingFileDeal.fState='未启动'");
if (data.getCount()<1){
alert("当前业务数据为空!");
return;
}
//根据业务数据启动多个流程实例,在启动的process的start commit事件中收集待办任务的id
// justep.Request.beginBatch();
var p = justep.xbl(processID);
p.start(justep.Context.getCurrentProcess(),justep.Context.getCurrentPersonName(),data.getRowId(),"");
// p.start(justep.Context.getCurrentProcess(), justep.Context.getCurrentActivity(), data.getRowId(), "");
// for (var i=0; i<data.getCount(); i++){
// // alert("justep.Context.getCurrentProcess():"+justep.Context.getCurrentProcess()+"\njustep.Context.getCurrentActivity():"+justep.Context.getCurrentActivity()+"\ndata.getID(i):"+data.getID(i));
// p.start(justep.Context.getCurrentProcess(), justep.Context.getCurrentActivity(), data.getID(i), "");
// }
// justep.Request.endBatch();
// alert("tasks:"+tasks.length);
if (tasks.length == 0){
alert("启动流程失败!");
return;
}
}
|
|