AnsweredAssumed Answered

VacationRequest.bpmn20.xml' not found

Question asked by ericsnyder on Mar 25, 2013
Latest reply on Mar 26, 2013 by ericsnyder
I am working through the user guide and have run into an issue. this is most likely from my lack of Java knowledge. I created the file src/test/resources/org/activiti/test/VacationRequest.bpmn20.xml as instructed in the user guide and have the following code:


   public static void main(String[] args) {
      System.out.println("Starting Process Engine");
      org.activiti.engine.ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
      
      RuntimeService runtimeService = processEngine.getRuntimeService();
      RepositoryService repositoryService = processEngine.getRepositoryService();
      TaskService taskService = processEngine.getTaskService();
      ManagementService managementService = processEngine.getManagementService();
      IdentityService identityService = processEngine.getIdentityService();
      HistoryService historyService = processEngine.getHistoryService();
      FormService formService = processEngine.getFormService();

      try {
         repositoryService.createDeployment()
           .addClasspathResource("src/test/resources/org/activiti/test/VacationRequest.bpmn20.xml")
           .deploy();
      } catch (Exception e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
           

      try {
          Thread.sleep(10000);
      } catch(InterruptedException ex) {
          Thread.currentThread().interrupt();
      }
      System.out.println("Closing Process Engine");
      processEngine.close();
      System.out.println("Closed Process Engine");
   }

I get the following Exception:
org.activiti.engine.ActivitiException: resource 'src/test/resources/org/activiti/test/VacationRequest.bpmn20.xml' not found
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.addClasspathResource(DeploymentBuilderImpl.java:62)
   at ProcessEngine.main(ProcessEngine.java:23)

I am guessing that I do not have something set properly in the project. I checked "Project > Properties > Resource" and my settings are:

Path: /ActivitiServer
Type: Project
Location: C:\Documents and Settings\Eric\My Documents\Eclipse\workspaces\Eclipse IDE for Java EE Developers 422\ActivitiServer

I even tried :
         repositoryService.createDeployment()
           .addClasspathResource("C:/Documents and Settings/Eric/My Documents/Eclipse/workspaces/Eclipse IDE for Java EE Developers 422/ActivitiServer/src/test/resources/org/activiti/test/VacationRequest.bpmn20.xml")
           .deploy();

No Joy… :(

What am I doing wrong?

EDIT: I am using Maven

Outcomes