Samrat Roy [http://community.jboss.org/people/whizkid.samrat] created the discussion
"JBPM exception : no process definition with key" To view the discussion, visit: http://community.jboss.org/message/593004#593004 -------------------------------------------------------------- Hi I am new to jBpm , though I have run a couple of examples and i am comfortable with the idea. I am trying to build a spring web application with jBpm 4.4 and I have defined my process defintion jpdl files. The problem is : I have made a Spring bean in the application Context as : <bean id="jbpmRepositoryUtil" class="com.canon.common.util.JbpmRepositoryUtil"> <constructor-arg> <value>jpdl/LeaveApply.jpdl.xml</value> </constructor-arg> <constructor-arg> <value>jpdl/LeaveDB_bal_Status.jpdl.xml</value> </constructor-arg> <constructor-arg> <value>jpdl/ApproverFlow.jpdl.xml</value> </constructor-arg> <constructor-arg> <ref bean ="repositoryService"/> </constructor-arg> </bean> This bean deploys three Jpdl files at the server Startup (jboss 4.2) . Like: public JbpmRepositoryUtil (String mainJpdlPath,String subProcessPath,String approverPath ,RepositoryService repositoryService){ mainFlowId = repositoryService.createDeployment().addResourceFromClasspath(mainJpdlPath).deploy(); dbSubProcessId = repositoryService.createDeployment().addResourceFromClasspath(approverPath).deploy(); approverFlowId = repositoryService.createDeployment().addResourceFromClasspath(subProcessPath).deploy(); } I have run the server in debug mode an confirmed that the method is being hit. But when I try to start a process instance in my service class like : ProcessInstance processInstance = executionService.startProcessInstanceByKey("LeaveApply",variables); I get the following error : org.jbpm.api.JbpmException: no process definition with key 'LeaveApply' at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:58) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) ..... Naming isnt an issue because if i copy the createDeployment method to the service class just before trying to create a PI it works just fine .. but according to my understanding I should be deploying the jpdl just once and create ProcessInstance as and when needed. So copying to the service class is a bad idea ! HELP ! -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/593004#593004] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user