浏览 1702 次
锁定老帖子 主题:jbpm的教程的例子之二 两个task
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-06-08
最后修改:2009-09-17
<process-definition name='simpleTask'> <start-state> <transition to='t' /> </start-state> <task-node name='t'> <task name='task0'> <assignment class='test.task.TaskA' /> </task> <task name='task1'> <assignment class='test.task.TaskB' /> </task> <transition to='end' /> </task-node> <end-state name='end' /> </process-definition> private static void endTasks(long piId) { JbpmContext jbpmContext = JBPMUtil.getJbpmContext(); try { ProcessInstance processInstance = jbpmContext .getProcessInstance(piId); Iterator<TaskInstance> iterator = processInstance .getTaskMgmtInstance().getTaskInstances().iterator(); for (; iterator.hasNext();) { TaskInstance taskInstance = iterator.next(); log.info("task instance name = " + taskInstance.getName()); log.info("task instance actor = " + taskInstance.getActorId()); taskInstance.end(); } jbpmContext.save(processInstance); } finally { jbpmContext.close(); } } 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |