Package org.activiti.engine.runtime

Examples of org.activiti.engine.runtime.ProcessInstanceBuilder.processDefinitionKey()


    ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
   
    ProcessInstanceBuilder processInstanceBuilder = runtimeService.createProcessInstanceBuilder();
   
    // by key
    ProcessInstance processInstance = processInstanceBuilder.processDefinitionKey("oneTaskProcess").businessKey("123").start();
    assertNotNull(processInstance);
    assertEquals("123", processInstance.getBusinessKey());
    assertEquals(1, runtimeService.createProcessInstanceQuery().processDefinitionKey("oneTaskProcess").count());
   
    processInstanceBuilder = runtimeService.createProcessInstanceBuilder();
View Full Code Here


    assertEquals(1, runtimeService.createProcessInstanceQuery().processDefinitionKey("oneTaskProcess").count());
   
    processInstanceBuilder = runtimeService.createProcessInstanceBuilder();
   
    // by key, with processInstance name with variables
    processInstance = processInstanceBuilder.processDefinitionKey("oneTaskProcess").businessKey("456").addVariable("var", "value")
        .processInstanceName("processName1").start();
    assertNotNull(processInstance);
    assertEquals(2, runtimeService.createProcessInstanceQuery().processDefinitionKey("oneTaskProcess").count());
    assertEquals("processName1", processInstance.getName());
    assertEquals("456", processInstance.getBusinessKey());
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.