title: Activiti process not being deployed with Spring Boot
body: <p>I am using Spring Boot and I am trying to deploy a very simple process.</p>
  
  <p>I tried to place the process definition in a folder called <code>processes</code> in <code>src/main/resources</code>. Not sure that works, I also tried to manually deploy the process definition.</p>
  
  <p>The process is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;definitions
          xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
          xmlns:activiti="http://activiti.org/bpmn"
          targetNamespace="MyProcessesNamespace"&gt;
  
      &lt;process id="oneTaskProcess" name="The One Task Process" isExecutable="true"&gt;
          &lt;startEvent id="theStart" /&gt;
          &lt;sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask" /&gt;
          &lt;userTask id="theTask" name="my task" /&gt;
          &lt;sequenceFlow id="flow2" sourceRef="theTask" targetRef="theEnd" /&gt;
          &lt;endEvent id="theEnd" /&gt;
      &lt;/process&gt;
  
  &lt;/definitions&gt;
  </code></pre>
  
  <p>The code I am using to manually deploy it is:</p>
  
  <pre><code>DeploymentBuilder db = repositoryService.createDeployment().
                  name("Deployment name");
  
          Resource processesResource = resourceLoader.getResource("classpath:processes");
          File processesFolder = processesResource.getFile();
          Collection&lt;File&gt; files =
                  FileUtils.listFiles(processesFolder, null, false);
  
          for (File f : files) {
              InputStream is = new FileInputStream(f);
              db.addInputStream(f.getName(), is);
          }
  
          db.deploy();
  }
  </code></pre>
  
  <p>This way, I enter the loop over <code>files</code> and I actually see the correct xml is being processed. Then  <code>db.deploy()</code> is correctly executed and the application is deployed.</p>
  
  <p>Then I try this JSON <code>{  "processDefinitionKey":"oneTaskProcess"  }</code> to this URL <code>http://myuser:mypassword@localhost:8080/runtime/process-instances</code> but the response is:</p>
  
  <pre><code>{
    "message": "Bad request",
    "exception": "no processes deployed with key 'oneTaskProcess'"
  }
  </code></pre>
  
  <p>In the database, I see the deployment, but no process definitions exist (<code>act_re_procdef</code> table is empty).</p>
  
  <p>What's wrong with my approach?</p>