Problem while executing a process under eclipse
uaibys Mar 18, 2010 4:33 AMHi,
I want to execute a jbpm process using eclipse, and I tried this code :
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.Configuration;
import org.jbpm.api.ExecutionService;
import org.jbpm.api.ProcessEngine;
import org.jbpm.api.RepositoryService;
public class Main {
public static void main(String[] args){
ProcessEngine processengine = new Configuration().buildProcessEngine();
RepositoryService repositoryservice = processengine.getRepositoryService();
ExecutionService executionservice = processengine.getExecutionService();
String deploymentId = repositoryservice.createDeployment().addResourceFromClasspath("test/process.jpdl.xml").deploy();
ProcessInstance processInstance = executionservice.startProcessInstanceById(deploymentId);
}
}
But when I launch the execution, I have this error message :
### EXCEPTION ###########################################
09:30:22,778 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd@118cb3a
org.jbpm.api.JbpmException: no process definition with id '1'
at org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:56)
at org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceById(ExecutionServiceImpl.java:50)
at test.Main.main(Main.java:25)
I think that it's caused by a configuration problem, but I don't know what is it. Could someone help me?
Thanks !