Package org.activiti.engine.history

Examples of org.activiti.engine.history.HistoricActivityInstanceQuery


 
  @Autowired
  protected HistoryService historyService;
 
  protected DataResponse getQueryResponse(HistoricActivityInstanceQueryRequest queryRequest, Map<String,String> allRequestParams, String serverRootUrl) {
    HistoricActivityInstanceQuery query = historyService.createHistoricActivityInstanceQuery();

    // Populate query based on request
    if (queryRequest.getActivityId() != null) {
      query.activityId(queryRequest.getActivityId());
    }
   
    if (queryRequest.getActivityInstanceId() != null) {
      query.activityInstanceId(queryRequest.getActivityInstanceId());
    }
   
    if (queryRequest.getActivityName() != null) {
      query.activityName(queryRequest.getActivityName());
    }
   
    if (queryRequest.getActivityType() != null) {
      query.activityType(queryRequest.getActivityType());
    }
   
    if (queryRequest.getExecutionId() != null) {
      query.executionId(queryRequest.getExecutionId());
    }
   
    if (queryRequest.getFinished() != null) {
      Boolean finished = queryRequest.getFinished();
      if (finished) {
        query.finished();
      } else {
        query.unfinished();
      }
    }
   
    if (queryRequest.getTaskAssignee() != null) {
      query.taskAssignee(queryRequest.getTaskAssignee());
    }
   
    if (queryRequest.getProcessInstanceId() != null) {
      query.processInstanceId(queryRequest.getProcessInstanceId());
    }
   
    if (queryRequest.getProcessDefinitionId() != null) {
      query.processDefinitionId(queryRequest.getProcessDefinitionId());
    }
   
    if(queryRequest.getTenantId() != null) {
      query.activityTenantId(queryRequest.getTenantId());
    }
   
    if(queryRequest.getTenantIdLike() != null) {
      query.activityTenantIdLike(queryRequest.getTenantIdLike());
    }
   
    if(Boolean.TRUE.equals(queryRequest.getWithoutTenantId())) {
      query.activityWithoutTenantId();
    }

    return new HistoricActivityInstancePaginateList(restResponseFactory, serverRootUrl).paginateList(
        allRequestParams, queryRequest, query, "startTime", allowedSortProperties);
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.history.HistoricActivityInstanceQuery

Copyright © 2018 www.massapicom. 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.