AnsweredAssumed Answered

Auto-deployed Process Models not found

Question asked by bmarkmann on Oct 26, 2013
Latest reply on Oct 26, 2013 by bmarkmann
I'm deploying resources to Activiti using the "deploymentResources" attribute of the process engine configuration.  That bit seems to work – if I do a DeploymentQuery, I see the deployments (and resources contained).  In this case, there is one process model deployed.  Here is my deployment resources declaration (in the Spring process engine configuration):

<beans:property name="deploymentResources" value="classpath*:/processes/*.bpmn" />

When I start the app server, I do the following (I see the the deployments, but not the model definitions):

        DeploymentQuery dq = repositoryService.createDeploymentQuery().orderByDeploymentId().asc();
        List<Deployment> deployments = dq.list();
        Iterator<Deployment> itrDeployments = deployments.iterator();
        LOGGER.debug("Getting deployments (found " + deployments.size() + ")");
        while(itrDeployments.hasNext()) {
           Deployment tempDeployment = itrDeployments.next();
           LOGGER.debug("Deployment ID: " + tempDeployment.getId() + "; Name: " + tempDeployment.getName());
           List<String> resources = repositoryService.getDeploymentResourceNames(tempDeployment.getId());
           Iterator<String> itrResources = resources.iterator();
           while(itrResources.hasNext()) {
              LOGGER.debug("Resource: " + itrResources.next());
           }
        }
       
        ProcessDefinitionQuery mq = repositoryService.createProcessDefinitionQuery();
        List<ProcessDefinition> definitions = mq.list();
        LOGGER.debug("Getting process definitions (found " + definitions.size() + ")");
        Iterator<ProcessDefinition> itrDefinitions = definitions.iterator();
        while(itrDefinitions.hasNext()) {
           ProcessDefinition pd = itrDefinitions.next();
           LOGGER.debug("Process definition: " + pd.getId() + "; key: " + pd.getKey() + "; " + pd.getName());
        }

In the log, I see:

DEBUG: com.c20g.myapp.util.SpringContextLoadedListener - Getting deployments (found 2)
DEBUG: com.c20g.myapp.util.SpringContextLoadedListener - Deployment ID: 1; Name: SpringAutoDeployment
DEBUG: com.c20g.myapp.util.SpringContextLoadedListener - Resource: /opt/springsource/vfabric-tc-server-developer-2.9.2.RELEASE/base-instance/wtpwebapps/myapp/WEB-INF/classes/processes/MyModel.bpmn
DEBUG: com.c20g.myapp.util.SpringContextLoadedListener - Deployment ID: 101; Name: SpringAutoDeployment
DEBUG: com.c20g.myapp.util.SpringContextLoadedListener - Resource: /opt/springsource/vfabric-tc-server-developer-2.9.2.RELEASE/base-instance/wtpwebapps/myapp/WEB-INF/classes/processes/MyModel.bpmn

Any idea why I can't see the deployed process models, even though I see the deployments?  Thanks! - Bill

Outcomes