AnsweredAssumed Answered

Programmatic deployment --> process definition not detected

Question asked by mtaal on Jan 2, 2012
Latest reply on Oct 17, 2014 by jbarrez
I am programmatically deploying a bpmn definition (the vacation request example). The deployment is visible in the admin ui of the explorer, but no processdefinition is created. I can see that the xml is there. If I upload directly in the UI then the process definition is found.

I checked and I do exactly the same as the auto deployment code in the SpringProcessEngineConfiguration code.

I run my code (see below) in the ContextListener.contextInitialized method. Should I do an explicit commit somehow? Or something else? (I do .deploy after adding input streams)


gr. Martin

        String deploymentName;
        if (workFlow.getModule().isInDevelopment()) {
          deploymentName = workFlow.getName() + "_" + System.currentTimeMillis();
        } else {
          deploymentName = workFlow.getName() + "_" + workFlow.getModule().getVersion();
        deploymentName += ".bpnm20.xml";
        final Deployment deployment = repositoryService.createDeploymentQuery()
        if (deployment == null) {
          final DeploymentBuilder deploymentBuilder = repositoryService.createDeployment()
          if (workFlow.getImagePath() != null) {
            deploymentBuilder.addInputStream(workFlow.getImagePath(), this.getClass()
                .getResourceAsStream("/" + workFlow.getImagePath()));
          deploymentBuilder.addInputStream(deploymentName, new ByteArrayInputStream(workFlow