我的代码是这样的:
public List<String> getAllOutgoingTransitionNamesByTaskId(String taskId) {
Task task = taskService.getTask(taskId);
ExecutionImpl execution = (ExecutionImpl) (this.executionService.findProcessInstanceById(task
.getExecutionId()));
ActivityImpl activity = execution.getActivity();
List<Transition> transitions = activity.getOutgoingTransitions();
List<String> transitionNames = new ArrayList<String>();
for(Transition transition:transitions){
transitionNames.add(transition.getName());
}
return transitionNames;
}
报错信息:
org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.RepositorySession
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:197)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:190)
at org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1120)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:411)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:402)
改正后:
public List<String> getAllOutgoingTransitionNamesByTaskId(String taskId) {
List<String> transitionNames = new ArrayList<String>();
transitionNames.addAll(taskService.getOutcomes(taskId));
return transitionNames;
}
分享到:
相关推荐
org.jbpm.api.history interfaces related to the HistoryService. org.jbpm.api.identity User and Group interfaces related to the IdentityService org.jbpm.api.job Job, Message and Timer interfaces ...
jbpm jbpm4.3.jar DDDDDDDD
jboss jbpm4最新开发包 采用了pvm框架
深入浅出_jBPM_电子书(清晰文字版)
nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#50001] 解决: hibernate.dialect=org.hibernate.dialect.MySQL5...
jbpm所南的新sql脚本mysql.identity.script.jbpm321
PacktPub.jBPM.Developer.Guide.Dec.2009.rar
Business.Process.Management.with.JBoss.jBPM
JBPM4_PVM源代码分析.doc,概要分析pvm的所有类
[使用JBoss.jBPM的业务流程管理][英文文字版]Business.Process.Management.with.JBoss.jBPM
JBPM电子书文档,Packt.Publishing.Business.Process.Management.with.JBoss.jBPM.Jul.2007.pdf
NULL 博文链接:https://guoyinjian.iteye.com/blog/1259538
juel-api.jar ,juel-engine.jar, juel-impl.jar, jbpm.jar ,mail.jar
import org.jbpm.JbpmConfiguration; import org.jbpm.JbpmContext; import org.jbpm.graph.def.ProcessDefinition; import org.jbpm.graph.exe.ProcessInstance; import org.jbpm.graph.exe.Token; import junit....
jBPM4的PVM实现解析
T1 spring-IOCjQueryt1.Jbpm设计t2.流程持久化t3整合spring
backport-concurrent.jar、jboss-j2ee.jar、jboss-retro-1.1.0-rt.jar、jbpm-identity.jar、jbpm-jpdl.jar、jcr-2.0.jar、log4j-1.2.13.jar、mysql-connector-java-5.0.8-bin.jar。自己也正在学习中,包的正确性未...
自己下载的官方文档,手动制作的chm文件,只有英文版 方便各位研究jbpm查阅
ProcessEngine processEngine = new Configuration...查看org.jbpm.api.ProcessEngine.java类,这个工厂类提供了所有对外发布的服务。包含: 1) RepositoryService getRepositoryService();//获取与流程部署有关的方法:
JBPM4.4整合SSH2的完整jar包,绝对可用!(注:此为Jar包第二部分,请搜索"JBPM4.4+SSH2完整整合jar包 par1",需要两部分一起解压!)