-
1. Re: how to get a processEngine already created?
shekharv Jun 19, 2009 1:12 AM (in response to jwerkmeister)If you do not want the tables to be redeployed everytime,
change the property below in jbpm.hibernate.cfg.xml
update
If you do not want to delete the users, just comment out those statements in the respective testcases. The testcases do not assume anything as to what can or cannot be present and hence attempt creating a pristine environment and then clean up after they are done, which is what any good test should do(as much as possible).
This is an example from the TaskCandidatesTest. You can delete the identityService calls if u really want to avoid the deletion.
protected void tearDown() throws Exception {
// delete process deployment
repositoryService.deleteDeploymentCascade(deploymentDbid);
// delete identities
identityService.deleteGroup("sales-dept");
identityService.deleteUser("johndoe");
identityService.deleteUser("joesmoe");
super.tearDown();
}
HTH, -
2. Re: how to get a processEngine already created?
shekharv Jun 19, 2009 1:17 AM (in response to jwerkmeister)As for the other part of your question regarding retrieving created processInstances, you can configure the same way the test cases are doing this, that will give you the environment and processengine, but also then simply use the ExecutionService methods
ProcessInstance findProcessInstanceById(String processInstanceId);
All you need to do is give the id of the processInstance that you want to load up.