|
楼主 |
发表于 2017-8-16 14:39:09
|
显示全部楼层
//向多人发送
String sData1 = "C69A1218E1B747278351EA20C7C35B4B";
// 获得通知接收者
List<OrgUnit> ls = new ArrayList<OrgUnit>();
ls.add(OrgUtils.findPersonMembersByID("zjIJNxsPmIAlq2IGIzH", "zjIJNxsPmIAlq2IGIzH").get(0));
OrgUnit unit = new OrgUnit("/TGf4mHEct4QZajOXMuN.ogn/4SGUVET30xSwxFYW906.ogn/493Btmfnj0KERBwvTzR.dpt/zjIJNxsPmIAlq2IGIzH.pos/KFnUvdRkuT9t6P58jJk@zjIJNxsPmIAlq2IGIzH.psm","/中交上航局航道建设有限公司/船舶/4012/二副/4012二副1");
ls.add(unit);
// 设置通知打开后自动结束、打开时抢占
Map<String, Object> varMap = new HashMap<String, Object>();
varMap.put("sExecuteMode2", com.justep.system.process.TaskExecuteMode2.FINISH_WHEN_OPEN);
varMap.put("sPreemptMode", com.justep.system.process.TaskPreemptMode.OPEN);
varMap.put("sKindID", com.justep.system.process.TaskKind.NOTICE );
// 创建通知,执行保存方法,即发送通知
Task t = TaskHelper.createTask("给多人发送通知", "/appdemo/test/process/date/dateProcess", "mainActivity", "/appdemo/test/process/date/mainActivity.a", "/appdemo/test/process/date/mainActivity.a",sData1, ls, varMap);
t.save();
现在这是我的代码,爆这个错2017-08-16 14:30:46 excute stream action, params:{"actions":[{"accept":"application/json","action":"externalAdvanceProcessAction","actionFlag":"__action_0__","activity":"businessActivity2","contentType":"application/json","executeContext":"","executor":"/TGf4mHEct4QZajOXMuN.ogn/gWfe3xZl3G1Y2EoBxFT.ogn/Lixjddr8MKLiGkFa62L.dpt/gj7KObVkmgex0yerdJ5.pos/qiEvJgdZ1keixGOQtOb@gj7KObVkmgex0yerdJ5.psm","parameters":{"control":{"class":"com.justep.system.process.ProcessControl","object":{"@@tag":"process-control","customized-enabled":"false","dialog-enabled":"true","jump-enabled":"false","message":"","notice":[],"postscript":"","save-history":"true","status":"none","task-join":"false","task-join-mode":"tjmMultiple","to":[{"@activity-id":"449C18A3B60844F5AB8D7BF75C86C482","@id":"449C18A3B60844F5AB8D7BF75C86C482","@is-end":"true","@readonly":"true","@selected":"true","executor-kinds":"","executor-range":[],"executors":[],"process":"/EMIS/AI/process/AI/aIProcess","task-relation-value":{"@@tag":"task-relation-value","SA_Task":"6BCEE5F53C054C05BE074D6FF2AE3C6C","sActivityInTemplate":"end1","sActivityName":"","sLastModifyTime":"2017-08-16T14:27:44.979Z","sLock":"62C87390C6744B949C52ECF53C7B1D19","sProcess":"/EMIS/AI/process/AI/aIProcess","sProcessName":"管线拖带安全检查","sProcessTemplateID2":"","sTypeName":"管线拖带安全检查"},"template":"","unit":"end1"}]}},"task":"4D62CFAE7661467AAC399AF82626AE7F"},"process":"/EMIS/AI/process/AI/aIProcess"}]}
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.justep.system.action.Engine.invokeActions(Native Method)
at com.justep.system.action.Engine.invokeActions(Unknown Source)
at com.justep.business.server.BusinessServer.doAction(Unknown Source)
at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
at com.justep.business.server.BusinessServer.excute(Unknown Source)
at com.justep.business.server.BusinessServer.excute(Unknown Source)
at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.justep.system.action.Engine.invokeAction(Native Method)
at com.justep.system.action.Engine.invokeAction(Unknown Source)
at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
at com.justep.system.action.ActionUtils.invokeAction(Unknown Source)
at com.justep.system.process.ProcessUtils.advanceProcess(Unknown Source)
at ExternalProcessProcedure.advanceProcess(ExternalProcessProcedure.java:30)
... 26 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at AIProcess.businessActivity2AfterAdvance(AIProcess.java:105)
... 37 more
|
|