AnsweredAssumed Answered

Cannot find process key

Question asked by frank41 on Apr 25, 2012
Latest reply on Apr 25, 2012 by frank41
Hi all !
I'm stuck with my first attempt to start a process instance. I have created via the Eclipse Plugin a bpmn process which is named "example"

<definitions xmlns="" xmlns:xsi="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" typeLanguage="" expressionLanguage="" targetNamespace="">
  <process id="example" name="example">
I have packed this process in a Web application and deployed it into an application server (JBoss application server)
along with the following activiti.cfg.xml (into activiti.cfg.jar)
 <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">

    <property name="databaseSchemaUpdate" value="true" />
    <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/activiti" />
    <property name="jdbcDriver" value="com.mysql.jdbc.Driver" />
    <property name="jdbcUsername" value="activiti" />
    <property name="jdbcPassword" value="activiti" />

    <property name="jobExecutorActivate" value="true" />

Next, I try to start a process instance from a Servlet with the following code:
RepositoryService repositoryService = processEngine.getRepositoryService();
RuntimeService runtimeService = processEngine.getRuntimeService();
Deployment deployment = repositoryService.createDeployment()
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("example");
I get the following error:
org.activiti.engine.ActivitiException: no processes deployed with key 'example'   org.activiti.engine.impl.persistence.deploy.DeploymentCache.findDeployedLatestProcessDefinitionByKey(

Looking into the DB, I've found the deployment has been recorded into the act_re_deployment
mysql> select * from act_re_deployment;
| ID_ | NAME_    | DEPLOY_TIME_        |
| 1     | MYDEPLOY  | 2012-04-24 22:21:39 |
However no data is found in act_re_procdef
mysql> select * from act_re_procdef;
Empty set (0.00 sec)
So it seems the deployment is not persisted. Can you give me any clue ?
Thanks a lot