Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. private String filename = "D:/Users/Bhuvan/workspace/DEMO/src/main/resources/diagrams/VACATION.bpmn";
  2.  
  3. @Rule
  4. public ActivitiRule activitiRule = new ActivitiRule();
  5.  
  6. @Test
  7. public void startProcess() throws Exception {
  8. RepositoryService repositoryService = activitiRule.getRepositoryService();
  9. repositoryService.createDeployment().addInputStream("myProcess.bpmn20.xml",
  10. new FileInputStream(filename)).deploy();
  11. RuntimeService runtimeService = activitiRule.getRuntimeService();
  12. Map<String, Object> variableMap = new HashMap<String, Object>();
  13. variableMap.put("name", "Activiti");
  14. ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess", variableMap);
  15.  
  16. assertNotNull(processInstance.getId());
  17. System.out.println("id " + processInstance.getId() + " "
  18. + processInstance.getProcessDefinitionId());
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement