cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-deployed Process Models not found

bmarkmann
Champ in-the-making
Champ in-the-making
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):

<beansSmiley Tongueroperty 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
1 REPLY 1

bmarkmann
Champ in-the-making
Champ in-the-making
Never mind… figured it out.  It was a problem parsing the BPMN that wasn't getting reported.  I upgraded from 5.9 to 5.13 and the error was logged when deploying the model.  I fixed the BPMN issue and now the queries return what I expect.