【JBPM4】State 节点


State状态节点 相比 Task 节点的区别为: 主要是没有“操作人员”assignee

流程操作方便基本相同。如下:


部署流程:
repositoryService.createDeployment().addResourceFromClasspath("com/tgb/node/state/state.jpdl.xml").deploy();
创建流程实例
ProcessInstance processInstance = executionService.startProcessInstanceByKey("state");
print("流程实例ID" ,processInstance.getId());
获取当前节点
String name = executionService.createProcessInstanceQuery().processInstanceId("state.230001").uniqueResult().findActiveActivityNames().toString();
print("流程当前节点",name);
完成结束当前节点
executionService.signalExecutionById("state.230001");

posted @ 2014-03-03 09:22  濤叔  阅读(900)  评论(0编辑  收藏  举报