Package org.activiti.engine

Examples of org.activiti.engine.RuntimeService.startProcessInstanceByKey()


        .addInputStream("MultiInstanceUseAssigneeList.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
   
    variableMap.put("assigneeList", Arrays.asList("user1", "user2", "user3"));
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("MultiInstanceUseAssigneeList", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
    TaskService taskService = activitiRule.getTaskService();
    long count = taskService.createTaskQuery().count();
    assertEquals(count, 3);
View Full Code Here


    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("GetFieldOfTaskListener.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("GetFieldOfTaskListener", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
  }
}
View Full Code Here

  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("process1.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process1", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
    TaskService taskService = activitiRule.getTaskService();
    assertEquals(3, taskService.createTaskQuery().taskAssignee("henryyan").count());
    Task task = taskService.createTaskQuery().taskAssignee("henryyan").listPage(0, 1).get(0);
View Full Code Here

    repositoryService.createDeployment().addInputStream("NoneIntermediateThrowEvent.bpmn20.xml",
        new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("NoneIntermediateThrowEvent", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " "
        + processInstance.getProcessDefinitionId());
   
    HistoryService historyService = activitiRule.getHistoryService();
View Full Code Here

    RepositoryService repositoryService = activitiRule.getRepositoryService();
    TaskService taskService = activitiRule.getTaskService();
    repositoryService.createDeployment().addInputStream("process1.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process1", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());

    HistoryService historyService = activitiRule.getHistoryService();
    List<HistoricProcessInstance> list2 = historyService.createHistoricProcessInstanceQuery().startedBy("henryyan").list();
View Full Code Here

            .addInputStream("process1.bpmn20.xml",
                    new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(
            "process1", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " "
            + processInstance.getProcessDefinitionId());
View Full Code Here

    repositoryService.createDeployment()
        .addInputStream("MultiInstanceBreakOnConditions.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("MultiInstanceBreakOnConditions", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
    TaskService taskService = activitiRule.getTaskService();
    Task task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId());
View Full Code Here

    repositoryService.createDeployment().addInputStream("errorStart.bpmn20.xml",
        new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("errorStart", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " "
        + processInstance.getProcessDefinitionId());
  }
}
View Full Code Here

    repositoryService.createDeployment().addInputStream("JavaServiceTask.bpmn20.xml",
        new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("JavaServiceTask", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " "
        + processInstance.getProcessDefinitionId());
  }
}
View Full Code Here

        new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    variableMap.put("printer", new Printer());
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("expression", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " "
        + processInstance.getProcessDefinitionId());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.