提交公文到下一个节点(本节点不是开始节点)
private void nextNode(JbpmContext context,String actorId,Long docId){
List<TaskInstance> list = context.getTaskMgmtSession().findTaskInstances(actorId);
for (TaskInstance taskInstance : list) {
Long documentId = (Long) taskInstance.getContextInstance().getVariable("documentId");
if (docId.equals(documentId)) {
//在缺省情况下:调用taskInstance的end()方法,有两个目的:
//1、结束taskInstance对象
//2、触发当前的token对象的signal()方法,使得流程继续往下流转
taskInstance.end();
Document document = (Document) context.getSession().load(Document.class, documentId);
System.err.println("公文【"+document.getTitle()+"】已被"+actorId+"审核通过,现在继续往下流转");
}
}
}