org.activiti.engine.impl.HistoricTaskInstanceQueryImpl Java Examples

The following examples show how to use org.activiti.engine.impl.HistoricTaskInstanceQueryImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RollbackTaskCmd.java    From lemon with Apache License 2.0 6 votes vote down vote up
/**
 * 找到想要回退对应的任务历史.
 */
public HistoricTaskInstanceEntity findTargetHistoricTask(
        CommandContext commandContext, TaskEntity taskEntity,
        ActivityImpl activityImpl) {
    HistoricTaskInstanceQueryImpl historicTaskInstanceQueryImpl = new HistoricTaskInstanceQueryImpl();
    historicTaskInstanceQueryImpl.taskDefinitionKey(activityImpl.getId());
    historicTaskInstanceQueryImpl.processInstanceId(taskEntity
            .getProcessInstanceId());
    historicTaskInstanceQueryImpl.setFirstResult(0);
    historicTaskInstanceQueryImpl.setMaxResults(1);
    historicTaskInstanceQueryImpl.orderByTaskCreateTime().desc();

    HistoricTaskInstanceEntity historicTaskInstanceEntity = (HistoricTaskInstanceEntity) commandContext
            .getHistoricTaskInstanceEntityManager()
            .findHistoricTaskInstancesByQueryCriteria(
                    historicTaskInstanceQueryImpl).get(0);

    return historicTaskInstanceEntity;
}
 
Example #2
Source File: HistoricTaskInstanceEntityManagerImpl.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@Override
public long findHistoricTaskInstanceCountByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) {
  if (getHistoryManager().isHistoryEnabled()) {
    return historicTaskInstanceDataManager.findHistoricTaskInstanceCountByQueryCriteria(historicTaskInstanceQuery);
  }
  return 0;
}
 
Example #3
Source File: HistoricTaskInstanceEntityManagerImpl.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public List<HistoricTaskInstance> findHistoricTaskInstancesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) {
  if (getHistoryManager().isHistoryEnabled()) {
    return historicTaskInstanceDataManager.findHistoricTaskInstancesByQueryCriteria(historicTaskInstanceQuery);
  }
  return Collections.EMPTY_LIST;
}
 
Example #4
Source File: HistoricTaskInstanceEntityManagerImpl.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public List<HistoricTaskInstance> findHistoricTaskInstancesAndVariablesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) {
  if (getHistoryManager().isHistoryEnabled()) {
   return historicTaskInstanceDataManager.findHistoricTaskInstancesAndVariablesByQueryCriteria(historicTaskInstanceQuery);
  }
  return Collections.EMPTY_LIST;
}
 
Example #5
Source File: HistoricTaskInstanceEntityManager.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
public List<HistoricTaskInstance> findHistoricTaskInstancesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) {
    if (getHistoryManager().isHistoryEnabled()) {
        return getDbSqlSession().selectList("selectHistoricTaskInstancesByQueryCriteria", historicTaskInstanceQuery);
    }
    return Collections.EMPTY_LIST;
}
 
Example #6
Source File: MybatisHistoricTaskInstanceDataManager.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
@Override
public long findHistoricTaskInstanceCountByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) {
  return (Long) getDbSqlSession().selectOne("selectHistoricTaskInstanceCountByQueryCriteria", historicTaskInstanceQuery);
}
 
Example #7
Source File: MybatisHistoricTaskInstanceDataManager.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public List<HistoricTaskInstance> findHistoricTaskInstancesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) {
  return getDbSqlSession().selectList("selectHistoricTaskInstancesByQueryCriteria", historicTaskInstanceQuery);
}
 
Example #8
Source File: DbSqlSession.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
public HistoricTaskInstanceQueryImpl createHistoricTaskInstanceQuery() {
  return new HistoricTaskInstanceQueryImpl();
}
 
Example #9
Source File: HistoricTaskInstanceEntityManager.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
public long findHistoricTaskInstanceCountByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) {
    if (getHistoryManager().isHistoryEnabled()) {
        return (Long) getDbSqlSession().selectOne("selectHistoricTaskInstanceCountByQueryCriteria", historicTaskInstanceQuery);
    }
    return 0;
}
 
Example #10
Source File: DbSqlSession.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
public HistoricTaskInstanceQueryImpl createHistoricTaskInstanceQuery() {
    return new HistoricTaskInstanceQueryImpl();
}
 
Example #11
Source File: HistoricTaskInstanceDataManager.java    From activiti6-boot2 with Apache License 2.0 votes vote down vote up
long findHistoricTaskInstanceCountByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery); 
Example #12
Source File: HistoricTaskInstanceDataManager.java    From activiti6-boot2 with Apache License 2.0 votes vote down vote up
List<HistoricTaskInstance> findHistoricTaskInstancesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery); 
Example #13
Source File: HistoricTaskInstanceDataManager.java    From activiti6-boot2 with Apache License 2.0 votes vote down vote up
List<HistoricTaskInstance> findHistoricTaskInstancesAndVariablesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery); 
Example #14
Source File: HistoricTaskInstanceEntityManager.java    From activiti6-boot2 with Apache License 2.0 votes vote down vote up
long findHistoricTaskInstanceCountByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery); 
Example #15
Source File: HistoricTaskInstanceEntityManager.java    From activiti6-boot2 with Apache License 2.0 votes vote down vote up
List<HistoricTaskInstance> findHistoricTaskInstancesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery); 
Example #16
Source File: HistoricTaskInstanceEntityManager.java    From activiti6-boot2 with Apache License 2.0 votes vote down vote up
List<HistoricTaskInstance> findHistoricTaskInstancesAndVariablesByQueryCriteria(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery);