-
1. Re: Problem with AsyncActivityTest in a AbstractTransactiona
kukeltje Jul 28, 2009 8:06 AM (in response to jcvergara)If you remove the async attribute the test runs fine because the job executor is not used at all.
Do you use the default embedded hsqldb with the tests or your own db? If the latter is the case, look if transactions are configured correctly (I cannot help in that area yet) -
2. Re: Problem with AsyncActivityTest in a AbstractTransactiona
jbarrez Jul 28, 2009 10:09 AM (in response to jcvergara)Also check if you have the jobExecutor configured correctly:
http://docs.jboss.com/jbpm/v4.0/devguide/html_single/#jobexecutor -
3. Re: Problem with AsyncActivityTest in a AbstractTransactiona
jcvergara Jul 28, 2009 6:06 PM (in response to jcvergara)kukeltje/jbarrez thanks for give me an insight into the JobExecutor component.
I believe the Jobexecutor is configured correctly, my jbpm.cfg.xml include the line:
I don't know why the transaction managed by Spring is not injected into the JobExecutorMessageSession, I running the test against the default embedded hsqldb.
Also I notice in the JBMP4 distribution examples this import line is commented:
<!-- Job executor is excluded for running the example test cases. -->
<!-- To enable timers and messages in production use, this should be included. -->
<!--
-->
If I comment the import the test runs Ok but the jobs are executed in the main thread.
This means that the job executor cannot be used in an embedded way?
Thanks! -
4. Re: Problem with AsyncActivityTest in a AbstractTransactiona
kukeltje Jul 28, 2009 6:46 PM (in response to jcvergara)Yes it can, but for testcases it is done the easy way. Not sure (yet, because of lack of knowledge) how you should start it. The unit tests in the sourcecode (not the examples, but the real source) might give a hint.
-
5. Re: Problem with AsyncActivityTest in a AbstractTransactiona
jcvergara Jul 28, 2009 8:42 PM (in response to jcvergara)I am using the spring integration example by Andries Inze (http://www.inze.be/andries/2009/06/08/spring-jbpm4-cr1-demo/)
public class AsyncActivityTests extends
AbstractTransactionalSpringJbpmTestCase {…
@Override
protected String[] getConfigLocations() {
return new String[]{
"be/inze/spring/demo/applicationContext-common.xml",
"be/inze/spring/demo/applicationContext-dao.xml",
"be/inze/spring/demo/applicationContext-process.xml",
"be/inze/spring/demo/applicationContext-service.xml"};
}
@Override
protected void onSetUpInTransaction() throws Exception {
super.onSetUpInTransaction();
deployJpdlFromClasspath("org/jbpm/examples/async/activity/process.jpdl.xml");
}
And start the process as:
ProcessInstance processInstance = executionService
.startProcessInstanceByKey("AsyncActivity");
All the other examples provided by the JBPM4 distribution runs ok with this configuration.
Thanks! -
6. Re: Problem with AsyncActivityTest in a AbstractTransactiona
msahai Nov 12, 2009 4:50 AM (in response to jcvergara)any update on this. i am encountering the same issue while running agains mysql database.
i am testing the process defintion using Junit test cases.
is issue will occur for junit test cases only and not in managed environment.
thanks
mayank