Examples of startProcessInstanceById()


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

            return null;
        }

        RuntimeService rt = pe.getRuntimeService();
        if (definitionID != null) {
            ProcessInstance pi = rt.startProcessInstanceById(definitionID);
            out().printf("Process instance %s Started\n", pi.getProcessInstanceId());
        }

        return null;
    }
View Full Code Here

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

           
            log.println(Consts.UI_PREFIX+": \""+wfName+"\" started");
long t = System.currentTimeMillis();           
System.out.println("starting process "+pDef.getId());
// TODO 9: why is this blocking????
            ProcessInstance proc = rtSvc.startProcessInstanceById(pDef.getId(),varMap);
//            String procId = startProcess(pDef.getId(),varMap);
            String procId = proc.getId();
System.out.println("process started procId="+procId+" ("+(System.currentTimeMillis()-t)+")");           
            return procId;
        } finally {
View Full Code Here

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

      .deploy()
      .getId();
   
    // Start process instance on second engine
    String processDefinitionId = repositoryService2.createProcessDefinitionQuery().singleResult().getId();
    runtimeService2.startProcessInstanceById(processDefinitionId);
    Task task = taskService2.createTaskQuery().singleResult();
    assertEquals("original task", task.getName());
   
    // Delete the deployment on second process engine
    repositoryService2.deleteDeployment(deploymentId, true);
View Full Code Here

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

                                 .singleResult();

        Map<String,Object> varMap = new HashMap<String,Object>();
        varMap.put("console",new Console());

        ProcessInstance proc = rtSvc.startProcessInstanceById(pDef.getId(),varMap);
       
        String procId = proc.getId();
        System.out.println("procId="+procId);
       
        long timeout = System.currentTimeMillis()+15*1000;
 
View Full Code Here

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

        ProcessDefinition pDef = repoSvc
                                 .createProcessDefinitionQuery()
                                 .deploymentId(d.getId())
                                 .singleResult();

        ProcessInstance proc = rtSvc.startProcessInstanceById(pDef.getId());
       
        String procId = proc.getId();
        System.out.println("procId="+procId);
       
        long timeout = System.currentTimeMillis()+15*1000;
 
View Full Code Here

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

        ProcessDefinition pDef = repoSvc
                                 .createProcessDefinitionQuery()
                                 .deploymentId(d.getId())
                                 .singleResult();

        ProcessInstance proc = rtSvc.startProcessInstanceById(pDef.getId());
       
        String procId = proc.getId();
        System.out.println("procId="+procId);
       
        long timeout = System.currentTimeMillis()+15*1000;
 
View Full Code Here

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

      .deploy()
      .getId();
   
    // Start process instance on second engine
    String processDefinitionId = repositoryService2.createProcessDefinitionQuery().singleResult().getId();
    runtimeService2.startProcessInstanceById(processDefinitionId);
    Task task = taskService2.createTaskQuery().singleResult();
    assertEquals("original task", task.getName());
   
    // Delete the deployment on second process engine
    repositoryService2.deleteDeployment(deploymentId, true);
View Full Code Here

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

            return null;
        }

        RuntimeService rt = pe.getRuntimeService();
        if (definitionID != null) {
            ProcessInstance pi = rt.startProcessInstanceById(definitionID);
            out().printf("Process instance %s Started\n", pi.getProcessInstanceId());
        }

        return null;
    }
View Full Code Here

Examples of org.camunda.bpm.engine.RuntimeService.startProcessInstanceById()

      .deploy()
      .getId();
   
    // Start process instance on second engine
    String processDefinitionId = repositoryService2.createProcessDefinitionQuery().singleResult().getId();
    runtimeService2.startProcessInstanceById(processDefinitionId);
    Task task = taskService2.createTaskQuery().singleResult();
    assertEquals("original task", task.getName());
   
    // Delete the deployment on second process engine
    repositoryService2.deleteDeployment(deploymentId, true);
View Full Code Here

Examples of org.camunda.bpm.engine.RuntimeService.startProcessInstanceById()

    try {
      Map<String, Object> variables = VariableValueDto.toMap(parameters.getVariables(), engine, objectMapper);
      String businessKey = parameters.getBusinessKey();
      String caseInstanceId = parameters.getCaseInstanceId();

      instance = runtimeService.startProcessInstanceById(processDefinitionId, businessKey, caseInstanceId, variables);

    } catch (ProcessEngineException e) {
      String errorMessage = String.format("Cannot instantiate process definition %s: %s", processDefinitionId, e.getMessage());
      throw new RestException(Status.INTERNAL_SERVER_ERROR, e, errorMessage);
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.