Examples of processInstanceId()


Examples of org.activiti.engine.impl.HistoricActivityInstanceQueryImpl.processInstanceId()

        HistoricActivityInstanceQueryImpl historicActivityInstanceQueryImpl = new HistoricActivityInstanceQueryImpl();
        // historicActivityInstanceQueryImpl.processInstanceId(processInstanceId)
        // .orderByHistoricActivityInstanceStartTime().asc();
        // TODO: 如果用了uuid会造成这样排序出问题
        // 但是如果用startTime,可能出现因为处理速度太快,时间一样,导致次序颠倒的问题
        historicActivityInstanceQueryImpl.processInstanceId(processInstanceId)
                .orderByHistoricActivityInstanceId().asc();

        Page page = new Page(0, 100);
        historicActivityInstances = Context
                .getCommandContext()
View Full Code Here

Examples of org.activiti.engine.runtime.ExecutionQuery.processInstanceId()

    // Populate query based on request
    if (queryRequest.getId() != null) {
      query.executionId(queryRequest.getId());
    }
    if (queryRequest.getProcessInstanceId() != null) {
      query.processInstanceId(queryRequest.getProcessInstanceId());
    }
    if (queryRequest.getProcessDefinitionKey() != null) {
      query.processDefinitionKey(queryRequest.getProcessDefinitionKey());
    }
    if (queryRequest.getProcessDefinitionId() != null) {
View Full Code Here

Examples of org.activiti.engine.runtime.JobQuery.processInstanceId()

   
    if (allRequestParams.containsKey("id")) {
      query.jobId(allRequestParams.get("id"));
    }
    if (allRequestParams.containsKey("processInstanceId")) {
      query.processInstanceId(allRequestParams.get("processInstanceId"));
    }
    if (allRequestParams.containsKey("executionId")) {
      query.executionId(allRequestParams.get("executionId"));
    }
    if (allRequestParams.containsKey("processDefinitionId")) {
View Full Code Here

Examples of org.activiti.engine.runtime.ProcessInstanceQuery.processInstanceId()

   */
  public ProcessInstance getProcessInstance( String id ){
    ProcessInstanceQuery query = runtimeService
      .createProcessInstanceQuery();
   
    query.processInstanceId(id);
   
    return query.singleResult();
  }
 
  /**
 
View Full Code Here

Examples of org.activiti.engine.task.TaskQuery.processInstanceId()

   * 查询流程中活动的任务
   */
  public List<Task> listTaskByProcessId( String processId ){
    TaskQuery query = taskService.createTaskQuery();
    query.active();
    query.processInstanceId(processId);
   
    return query.list();
  }
 
  /**
 
View Full Code Here

Examples of org.activiti.engine.task.TaskQuery.processInstanceId()

   * @param processId 流程实例ID
   */
  protected Task getCurrentTask( String processId ){
    TaskQuery query = taskService.createTaskQuery();
    query.active();
    query.processInstanceId(processId).listPage(0,1);
   
    return query.singleResult();
  }
 
  /**
 
View Full Code Here

Examples of org.camunda.bpm.engine.history.HistoricIncidentQuery.processInstanceId()

  }

  public void testQueryByInvalidProcessInsanceId() {
    HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();

    assertEquals(0, query.processInstanceId("invalid").list().size());
    assertEquals(0, query.processInstanceId("invalid").count());

    try {
      query.processInstanceId(null);
      fail("It was possible to set a null value as processInstanceId.");
View Full Code Here

Examples of org.camunda.bpm.engine.history.HistoricIncidentQuery.processInstanceId()

  public void testQueryByInvalidProcessInsanceId() {
    HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();

    assertEquals(0, query.processInstanceId("invalid").list().size());
    assertEquals(0, query.processInstanceId("invalid").count());

    try {
      query.processInstanceId(null);
      fail("It was possible to set a null value as processInstanceId.");
    } catch (ProcessEngineException e) { }
View Full Code Here

Examples of org.camunda.bpm.engine.history.HistoricIncidentQuery.processInstanceId()

    assertEquals(0, query.processInstanceId("invalid").list().size());
    assertEquals(0, query.processInstanceId("invalid").count());

    try {
      query.processInstanceId(null);
      fail("It was possible to set a null value as processInstanceId.");
    } catch (ProcessEngineException e) { }
  }

  @Deployment(resources={"org/camunda/bpm/engine/test/api/runtime/oneFailingServiceProcess.bpmn20.xml"})
View Full Code Here

Examples of org.camunda.bpm.engine.history.HistoricIncidentQuery.processInstanceId()

        .singleResult();
    assertNotNull(pi2);

    HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();

    HistoricIncident rootCauseHistoricIncident = query.processInstanceId(pi2.getId()).singleResult();
    assertNotNull(rootCauseHistoricIncident);

    // cause and root cause id is equal to the id of the root incident
    assertEquals(rootCauseHistoricIncident.getId(), rootCauseHistoricIncident.getCauseIncidentId());
    assertEquals(rootCauseHistoricIncident.getId(), rootCauseHistoricIncident.getRootCauseIncidentId());
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.