本文整理汇总了Java中org.activiti.engine.impl.HistoricActivityInstanceQueryImpl类的典型用法代码示例。如果您正苦于以下问题:Java HistoricActivityInstanceQueryImpl类的具体用法?Java HistoricActivityInstanceQueryImpl怎么用?Java HistoricActivityInstanceQueryImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HistoricActivityInstanceQueryImpl类属于org.activiti.engine.impl包,在下文中一共展示了HistoricActivityInstanceQueryImpl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getHistoricActivityInstanceEntity
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
/**
* 查询历史节点.
*/
public HistoricActivityInstanceEntity getHistoricActivityInstanceEntity(
String historyTaskId) {
logger.info("historyTaskId : {}", historyTaskId);
JdbcTemplate jdbcTemplate = ApplicationContextHelper
.getBean(JdbcTemplate.class);
String historicActivityInstanceId = jdbcTemplate.queryForObject(
"SELECT ID_ FROM ACT_HI_ACTINST WHERE TASK_ID_=?",
String.class, historyTaskId);
logger.info("historicActivityInstanceId : {}",
historicActivityInstanceId);
HistoricActivityInstanceQueryImpl historicActivityInstanceQueryImpl = new HistoricActivityInstanceQueryImpl();
historicActivityInstanceQueryImpl
.activityInstanceId(historicActivityInstanceId);
HistoricActivityInstanceEntity historicActivityInstanceEntity = (HistoricActivityInstanceEntity) Context
.getCommandContext()
.getHistoricActivityInstanceEntityManager()
.findHistoricActivityInstancesByQueryCriteria(
historicActivityInstanceQueryImpl, new Page(0, 1))
.get(0);
return historicActivityInstanceEntity;
}
开发者ID:zhaojunfei,项目名称:lemon,代码行数:29,代码来源:RollbackTaskCmd.java
示例2: getHistoricActivityInstanceEntity
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
public HistoricActivityInstanceEntity getHistoricActivityInstanceEntity(
String historyTaskId) {
logger.info("historyTaskId : {}", historyTaskId);
JdbcTemplate jdbcTemplate = ApplicationContextHelper
.getBean(JdbcTemplate.class);
String historicActivityInstanceId = jdbcTemplate.queryForObject(
"select id_ from ACT_HI_ACTINST where task_id_=?",
String.class, historyTaskId);
logger.info("historicActivityInstanceId : {}",
historicActivityInstanceId);
HistoricActivityInstanceQueryImpl historicActivityInstanceQueryImpl = new HistoricActivityInstanceQueryImpl();
historicActivityInstanceQueryImpl
.activityInstanceId(historicActivityInstanceId);
HistoricActivityInstanceEntity historicActivityInstanceEntity = (HistoricActivityInstanceEntity) Context
.getCommandContext()
.getHistoricActivityInstanceEntityManager()
.findHistoricActivityInstancesByQueryCriteria(
historicActivityInstanceQueryImpl, new Page(0, 1))
.get(0);
return historicActivityInstanceEntity;
}
开发者ID:zhaojunfei,项目名称:lemon,代码行数:26,代码来源:WithdrawTaskCmd.java
示例3: findTargetHistoricActivity
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
/**
* 找到想要回退对应的节点历史.
*/
public HistoricActivityInstanceEntity findTargetHistoricActivity(
CommandContext commandContext, TaskEntity taskEntity,
ActivityImpl activityImpl) {
HistoricActivityInstanceQueryImpl historicActivityInstanceQueryImpl = new HistoricActivityInstanceQueryImpl();
historicActivityInstanceQueryImpl.activityId(activityImpl.getId());
historicActivityInstanceQueryImpl.processInstanceId(taskEntity
.getProcessInstanceId());
historicActivityInstanceQueryImpl
.orderByHistoricActivityInstanceEndTime().desc();
HistoricActivityInstanceEntity historicActivityInstanceEntity = (HistoricActivityInstanceEntity) commandContext
.getHistoricActivityInstanceEntityManager()
.findHistoricActivityInstancesByQueryCriteria(
historicActivityInstanceQueryImpl, new Page(0, 1))
.get(0);
return historicActivityInstanceEntity;
}
开发者ID:zhaojunfei,项目名称:lemon,代码行数:22,代码来源:RollbackTaskCmd.java
示例4: fetchHistoricActivityInstances
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
public void fetchHistoricActivityInstances() {
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()
.getHistoricActivityInstanceEntityManager()
.findHistoricActivityInstancesByQueryCriteria(
historicActivityInstanceQueryImpl, page);
}
开发者ID:zhaojunfei,项目名称:lemon,代码行数:17,代码来源:ActivitiHistoryGraphBuilder.java
示例5: recordExecutionReplacedBy
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public void recordExecutionReplacedBy(ExecutionEntity execution, InterpretableExecution replacedBy) {
if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
// Update the cached historic activity instances that are open
List<HistoricActivityInstanceEntity> cachedHistoricActivityInstances = getDbSqlSession().findInCache(HistoricActivityInstanceEntity.class);
for (HistoricActivityInstanceEntity cachedHistoricActivityInstance : cachedHistoricActivityInstances) {
if ((cachedHistoricActivityInstance.getEndTime() == null)
&& (execution.getId().equals(cachedHistoricActivityInstance.getExecutionId()))) {
cachedHistoricActivityInstance.setExecutionId(replacedBy.getId());
}
}
// Update the persisted historic activity instances that are open
List<HistoricActivityInstanceEntity> historicActivityInstances = (List) new HistoricActivityInstanceQueryImpl(Context.getCommandContext())
.executionId(execution.getId())
.unfinished()
.list();
for (HistoricActivityInstanceEntity historicActivityInstance : historicActivityInstances) {
historicActivityInstance.setExecutionId(replacedBy.getId());
}
}
}
开发者ID:flowable,项目名称:flowable-engine,代码行数:25,代码来源:DefaultHistoryManager.java
示例6: recordExecutionReplacedBy
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
/**
* Replaces any open historic activityInstances' execution-id's to the id of the replaced
* execution, if activity history is enabled.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public void recordExecutionReplacedBy(ExecutionEntity execution, InterpretableExecution replacedBy) {
if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
// Update the cached historic activity instances that are open
List<HistoricActivityInstanceEntity> cachedHistoricActivityInstances = getDbSqlSession().findInCache(HistoricActivityInstanceEntity.class);
for (HistoricActivityInstanceEntity cachedHistoricActivityInstance: cachedHistoricActivityInstances) {
if ( (cachedHistoricActivityInstance.getEndTime()==null)
&& (execution.getId().equals(cachedHistoricActivityInstance.getExecutionId()))
) {
cachedHistoricActivityInstance.setExecutionId(replacedBy.getId());
}
}
// Update the persisted historic activity instances that are open
List<HistoricActivityInstanceEntity> historicActivityInstances = (List) new HistoricActivityInstanceQueryImpl(Context.getCommandContext())
.executionId(execution.getId())
.unfinished()
.list();
for (HistoricActivityInstanceEntity historicActivityInstance: historicActivityInstances) {
historicActivityInstance.setExecutionId(replacedBy.getId());
}
}
}
开发者ID:springvelocity,项目名称:xbpm5,代码行数:29,代码来源:HistoryManager.java
示例7: findActivityInstance
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
protected HistoricActivityInstanceEntity findActivityInstance(ExecutionEntity execution, String activityId, boolean checkPersistentStore) {
String executionId = execution.getId();
// search for the historic activity instance in the dbsqlsession cache
List<HistoricActivityInstanceEntity> cachedHistoricActivityInstances = getDbSqlSession()
.findInCache(HistoricActivityInstanceEntity.class);
for (HistoricActivityInstanceEntity cachedHistoricActivityInstance : cachedHistoricActivityInstances) {
if (executionId.equals(cachedHistoricActivityInstance.getExecutionId())
&& activityId != null
&& (activityId.equals(cachedHistoricActivityInstance.getActivityId()))
&& (cachedHistoricActivityInstance.getEndTime() == null)) {
return cachedHistoricActivityInstance;
}
}
List<HistoricActivityInstance> historicActivityInstances = null;
if (checkPersistentStore) {
historicActivityInstances = new HistoricActivityInstanceQueryImpl(Context.getCommandContext())
.executionId(executionId)
.activityId(activityId)
.unfinished()
.listPage(0, 1);
}
if (historicActivityInstances != null && !historicActivityInstances.isEmpty()) {
return (HistoricActivityInstanceEntity) historicActivityInstances.get(0);
}
if (execution.getParentId() != null) {
return findActivityInstance(execution.getParent(), activityId, checkPersistentStore);
}
return null;
}
开发者ID:flowable,项目名称:flowable-engine,代码行数:36,代码来源:DefaultHistoryManager.java
示例8: findActivityInstance
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
/**
* Finds the {@link HistoricActivityInstanceEntity} that is active in the given
* execution. Uses the {@link DbSqlSession} cache to make sure the right instance
* is returned, regardless of whether or not entities have already been flushed to DB.
*/
public static HistoricActivityInstanceEntity findActivityInstance(ExecutionEntity execution) {
CommandContext commandContext = Context.getCommandContext();
String executionId = execution.getId();
String activityId = execution.getActivityId();
// search for the historic activity instance in the dbsqlsession cache
DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
List<HistoricActivityInstanceEntity> cachedHistoricActivityInstances = dbSqlSession.findInCache(HistoricActivityInstanceEntity.class);
for (HistoricActivityInstanceEntity cachedHistoricActivityInstance: cachedHistoricActivityInstances) {
if (executionId.equals(cachedHistoricActivityInstance.getExecutionId())
&& activityId != null
&& (activityId.equals(cachedHistoricActivityInstance.getActivityId()))
&& (cachedHistoricActivityInstance.getEndTime()==null)
) {
return cachedHistoricActivityInstance;
}
}
List<HistoricActivityInstance> historicActivityInstances = new HistoricActivityInstanceQueryImpl(commandContext)
.executionId(executionId)
.activityId(activityId)
.unfinished()
.listPage(0, 1);
if (!historicActivityInstances.isEmpty()) {
return (HistoricActivityInstanceEntity) historicActivityInstances.get(0);
}
if (execution.getParentId()!=null) {
return findActivityInstance((ExecutionEntity) execution.getParent());
}
return null;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:41,代码来源:ActivityInstanceEndHandler.java
示例9: findActivityInstance
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
/**
* Finds the {@link HistoricActivityInstanceEntity} that is active in the given
* execution. Uses the {@link DbSqlSession} cache to make sure the right instance
* is returned, regardless of whether or not entities have already been flushed to DB.
*/
public HistoricActivityInstanceEntity findActivityInstance(ExecutionEntity execution) {
String executionId = execution.getId();
String activityId = execution.getActivityId();
// search for the historic activity instance in the dbsqlsession cache
List<HistoricActivityInstanceEntity> cachedHistoricActivityInstances = getDbSqlSession().findInCache(HistoricActivityInstanceEntity.class);
for (HistoricActivityInstanceEntity cachedHistoricActivityInstance: cachedHistoricActivityInstances) {
if (executionId.equals(cachedHistoricActivityInstance.getExecutionId())
&& activityId != null
&& (activityId.equals(cachedHistoricActivityInstance.getActivityId()))
&& (cachedHistoricActivityInstance.getEndTime()==null)
) {
return cachedHistoricActivityInstance;
}
}
List<HistoricActivityInstance> historicActivityInstances = new HistoricActivityInstanceQueryImpl(Context.getCommandContext())
.executionId(executionId)
.activityId(activityId)
.unfinished()
.listPage(0, 1);
if (!historicActivityInstances.isEmpty()) {
return (HistoricActivityInstanceEntity) historicActivityInstances.get(0);
}
if (execution.getParentId()!=null) {
return findActivityInstance((ExecutionEntity) execution.getParent());
}
return null;
}
开发者ID:springvelocity,项目名称:xbpm5,代码行数:38,代码来源:HistoryManager.java
示例10: findHistoricActivityInstanceCountByQueryCriteria
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
public long findHistoricActivityInstanceCountByQueryCriteria(HistoricActivityInstanceQueryImpl historicActivityInstanceQuery) {
return (Long) getDbSqlSession().selectOne("selectHistoricActivityInstanceCountByQueryCriteria", historicActivityInstanceQuery);
}
开发者ID:flowable,项目名称:flowable-engine,代码行数:4,代码来源:HistoricActivityInstanceEntityManager.java
示例11: findHistoricActivityInstancesByQueryCriteria
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public List<HistoricActivityInstance> findHistoricActivityInstancesByQueryCriteria(HistoricActivityInstanceQueryImpl historicActivityInstanceQuery, Page page) {
return getDbSqlSession().selectList("selectHistoricActivityInstancesByQueryCriteria", historicActivityInstanceQuery, page);
}
开发者ID:flowable,项目名称:flowable-engine,代码行数:5,代码来源:HistoricActivityInstanceEntityManager.java
示例12: createHistoricActivityInstanceQuery
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
public HistoricActivityInstanceQueryImpl createHistoricActivityInstanceQuery() {
return new HistoricActivityInstanceQueryImpl();
}
开发者ID:flowable,项目名称:flowable-engine,代码行数:4,代码来源:DbSqlSession.java
示例13: findHistoricActivityInstanceCountByQueryCriteria
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
public long findHistoricActivityInstanceCountByQueryCriteria(HistoricActivityInstanceQueryImpl historicActivityInstanceQuery) {
return (Long) getDbSqlSession().selectOne("selectHistoricActivityInstanceCountByQueryCriteria", historicActivityInstanceQuery);
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:4,代码来源:HistoricActivityInstanceManager.java
示例14: findHistoricActivityInstancesByQueryCriteria
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public List<HistoricActivityInstance> findHistoricActivityInstancesByQueryCriteria(HistoricActivityInstanceQueryImpl historicActivityInstanceQuery, Page page) {
return getDbSqlSession().selectList("selectHistoricActivityInstancesByQueryCriteria", historicActivityInstanceQuery, page);
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:5,代码来源:HistoricActivityInstanceManager.java
示例15: createHistoricActivityInstanceQuery
import org.activiti.engine.impl.HistoricActivityInstanceQueryImpl; //导入依赖的package包/类
public HistoricActivityInstanceQueryImpl createHistoricActivityInstanceQuery() {
return new HistoricActivityInstanceQueryImpl();
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:4,代码来源:DbSqlSession.java
注:本文中的org.activiti.engine.impl.HistoricActivityInstanceQueryImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论