I define the fisrt process definition as following:
ProcessEngine processEngine = new Configuration().setResource("jbpm.cfg.xml").buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
ExecutionService executionService = processEngine.getExecutionService();
repositoryService.createDeployment().addResourceFromClasspath("testFragment.jpdl.xml").deploy();
executionService.startProcessInstanceByKey("testFragment");
The testFragment is as following;
<?xml version="1.0" encoding="UTF-8"?>
<process name="testFragment" xmlns="http://jbpm.org/4.4/jpdl">
<start g="48,134,48,48" name="start">
<transition name="to HelloWorld" to="HelloWorld" g="-87,-22"/>
</start>
<custom class="org.jbpm.testMigration.MyTest" g="359,196,92,52" name="Test">
<transition name="to end" to="end" g="-43,-22"/>
</custom>
<java class="org.jbpm.testMigration.HelloWorld" g="147,194,92,52" method="printHelloWorld" name="HelloWorld">
<transition name="to Test" to="Test" g="-45,-22"/>
</java>
<end g="554,146,48,48" name="end"/>
</process>
in custom node i throw an exception und catch it in catch block
catch (Exception e) {
System.out.println("we need the exception handling");
activityExecution.waitForSignal();
ProcessEngine processEngine = new Configuration().setResource("jbpm.cfg.xml").buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
ExecutionService executionService = processEngine.getExecutionService();
executionService.signalExecutionById("testFragment");
}
when i execute testFragment, the following execption occurres:
exception in thread "main" org.jbpm.api.JbpmException: execution testFragment does not exist.
how can i resume the testFragment? pleas help