[jboss-user] [jBPM Users] - Re: Advice regarding complex proccess modeling

fabiomsouto do-not-reply at jboss.com
Fri Nov 20 04:55:47 EST 2009


Thank you for your help. It has helped us a lot to think a bit more and know jbpm. 

We are trying to follow a similar solution to yours, but, when we try to create a new subtask on a task, an exception occurs:


  | 
  | 09:41:12,935 SEV | [BaseJbpmTestCase] TEST THROWS EXCEPTION: no environment to get org.jbpm.pvm.internal.session.DbSession
  | org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.DbSession
  | 	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.task.TaskImpl.createSubTask(TaskImpl.java:231)
  | 	at org.jbpm.pvm.internal.task.TaskImpl.createSubTask(TaskImpl.java:243)
  | 	at org.teste.TratarDoc.testTratarDoc(TratarDoc.java:63)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at junit.framework.TestCase.runTest(TestCase.java:164)
  | 	at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
  | 	at junit.framework.TestCase.runBare(TestCase.java:130)
  | 	at junit.framework.TestResult$1.protect(TestResult.java:106)
  | 	at junit.framework.TestResult.runProtected(TestResult.java:124)
  | 	at junit.framework.TestResult.run(TestResult.java:109)
  | 	at junit.framework.TestCase.run(TestCase.java:120)
  | 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
  | 	at junit.framework.TestSuite.run(TestSuite.java:225)
  | 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
  | 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  | 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  | ### EXCEPTION ###########################################
  | 
  | 

The piece of code is the following


  | 
  | 		for (String responsavel : responsaveis) {
  | 			TaskImpl subTask = tratarTask.createSubTask("Tratar para" + responsavel);
  | 			subTask.setAssignee(responsavel);
  | 			
  | 			taskService.saveTask(subTask);
  | 			
  | 			tratarTask.addSubTask(subTask);
  | 		}
  | 
  | 
  | 
  | 

It goes mad when we call createSubTask(). What are we doing wrong? :-(

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266708#4266708

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266708



More information about the jboss-user mailing list