[jboss-user] [jBPM] - How can i get the execution pointer in a process?

Sameeh Harfoush do-not-reply at jboss.com
Wed Mar 31 08:19:12 EDT 2010


Sameeh Harfoush [http://community.jboss.org/people/sameeh.harfoush] replied to the discussion

"How can i get the execution pointer in a process?"

To view the discussion, visit: http://community.jboss.org/message/534895#534895

--------------------------------------------------------------
ok
here is what i did

((ExecutionImpl)pi.findActiveExecutionIn(pi.findActiveActivityNames().iterator().next())).getActivity().getName()

where "pi" is my process instance

i am getting the below exception

### EXCEPTION ###########################################
15:16:35,000 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:1121)
    at org.jbpm.pvm.internal.model.ExecutionImpl.getActivity(ExecutionImpl.java:1143)
    at com.roxana.test.jpdl.EmployeeTimesheetTest.executeTransitionInTask(EmployeeTimesheetTest.java:169)
    at com.roxana.test.jpdl.EmployeeTimesheetTest.testManagerRejectTimesheet(EmployeeTimesheetTest.java:115)
    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 ###########################################
15:16:35,000 SEV   | [BaseJbpmTestCase]

i couldnt find ExecutionImpl in the JPBM API docs, i had to check it from the source

thanks again

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/534895#534895]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100331/ca6f465d/attachment.html 


More information about the jboss-user mailing list