User development, A new message was posted in the thread "How to terminate a forked process":
http://community.jboss.org/message/519289#519289 Author : Jas Lam Profile : http://community.jboss.org/people/lamj1 Message: -------------------------------------------------------------- Using the same jpdl file above I run the following unitTest 1) Is this the correct way of ending a forked execution? 2) How to resolve the execption? My unit test set up is pretty standard protected void setUp() throws Exception { super.setUp(); //add user to database identityService.createUser("testUser", "testUser", "testUser", "mailto:testu...@ssoa.com"); workflowManager = new WorkflowManager(); deploymentFork = repositoryService.createDeployment() .addResourceFromClasspath("test/ssoa/jbpm/manager/ForkSubProcess.jpdl.xml").deploy(); } public void testForking() { ProcessInstance processInstance = workflowManager.startProcess("ForkSubProcess"); String pid = processInstance.getId(); Execution mainExe = executionService.findExecutionById(pid); ((ExecutionImpl)mainExe).end(); <--- line 99 Exception here } 09:48:00,642 SEV | [BaseJbpmTestCase] ### EXCEPTION ########################################### 09:48:00,642 SEV | [BaseJbpmTestCase] TEST THROWS EXCEPTION: no environment to get org.jbpm.pvm.internal.session.RepositorySession 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.end(ExecutionImpl.java:373) at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:325) at test.ssoa.jbpm.manager.WorkflowManagerTest.testForking(WorkflowManagerTest.java:99) 1) How would I be able to get all executions? executionService doesn't provide such interface. > kukeltje wrote: > > Getting all executions and ending them should work. > Thank you -------------------------------------------------------------- To reply to this message visit the message page: http://community.jboss.org/message/519289#519289
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user