• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java HistoricActivityInstanceEntity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity的典型用法代码示例。如果您正苦于以下问题:Java HistoricActivityInstanceEntity类的具体用法?Java HistoricActivityInstanceEntity怎么用?Java HistoricActivityInstanceEntity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HistoricActivityInstanceEntity类属于org.activiti.engine.impl.persistence.entity包,在下文中一共展示了HistoricActivityInstanceEntity类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getHistoricActivityInstanceEntity

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的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.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的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.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的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: recordExecutionReplacedBy

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的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


示例5: notify

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
public void notify(DelegateExecution execution) throws Exception {
  String executionId = execution.getId();
  String activityId = ((ExecutionEntity)execution).getActivityId();

  CommandContext commandContext = Context.getCommandContext();
  // 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.equals(cachedHistoricActivityInstance.getActivityId()))
         && (cachedHistoricActivityInstance.getEndTime()==null)
       ) {
      cachedHistoricActivityInstance.markEnded(null);
      return;
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:StartEventEndHandler.java


示例6: notify

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
public void notify(DelegateExecution execution) {
  IdGenerator idGenerator = Context.getProcessEngineConfiguration().getIdGenerator();
  
  ExecutionEntity executionEntity = (ExecutionEntity) execution;
  String processDefinitionId = executionEntity.getProcessDefinitionId();
  String processInstanceId = executionEntity.getProcessInstanceId();
  String executionId = execution.getId();

  HistoricActivityInstanceEntity historicActivityInstance = new HistoricActivityInstanceEntity();
  historicActivityInstance.setId(idGenerator.getNextId());
  historicActivityInstance.setProcessDefinitionId(processDefinitionId);
  historicActivityInstance.setProcessInstanceId(processInstanceId);
  historicActivityInstance.setExecutionId(executionId);
  historicActivityInstance.setActivityId(executionEntity.getActivityId());
  historicActivityInstance.setActivityName((String) executionEntity.getActivity().getProperty("name"));
  historicActivityInstance.setActivityType((String) executionEntity.getActivity().getProperty("type"));
  historicActivityInstance.setStartTime(ClockUtil.getCurrentTime());
  
  Context
    .getCommandContext()
    .getDbSqlSession()
    .insert(historicActivityInstance);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:24,代码来源:ActivityInstanceStartHandler.java


示例7: notify

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
public void notify(DelegateExecution execution) throws Exception {
  String executionId = execution.getId();
  String activityId = ((ExecutionEntity)execution).getActivityId();
  
  // interrupted executions might not have an activityId set.
  if(activityId == null) {
    return;
  }

  CommandContext commandContext = Context.getCommandContext();
  // 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.equals(cachedHistoricActivityInstance.getActivityId()))
         && (cachedHistoricActivityInstance.getEndTime()==null)
       ) {
      cachedHistoricActivityInstance.markEnded(null);
      return;
    }
  }
}
 
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:24,代码来源:StartEventEndHandler.java


示例8: recordActivityStart

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
/**
 * Record the start of an activitiy, if activity history is enabled.
 */
public void recordActivityStart(ExecutionEntity executionEntity) {
  if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
    IdGenerator idGenerator = Context.getProcessEngineConfiguration().getIdGenerator();
    
    String processDefinitionId = executionEntity.getProcessDefinitionId();
    String processInstanceId = executionEntity.getProcessInstanceId();
    String executionId = executionEntity.getId();

    HistoricActivityInstanceEntity historicActivityInstance = new HistoricActivityInstanceEntity();
    historicActivityInstance.setId(idGenerator.getNextId());
    historicActivityInstance.setProcessDefinitionId(processDefinitionId);
    historicActivityInstance.setProcessInstanceId(processInstanceId);
    historicActivityInstance.setExecutionId(executionId);
    historicActivityInstance.setActivityId(executionEntity.getActivityId());
    historicActivityInstance.setActivityName((String) executionEntity.getActivity().getProperty("name"));
    historicActivityInstance.setActivityType((String) executionEntity.getActivity().getProperty("type"));
    historicActivityInstance.setStartTime(ClockUtil.getCurrentTime());
    
    getDbSqlSession().insert(historicActivityInstance);
  }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:25,代码来源:HistoryManager.java


示例9: recordStartEventEnded

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
/**
 * Record the end of a start-task, if activity history is enabled.
 */
public void recordStartEventEnded(String executionId, String activityId) {
  if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
    
    // Interrupted executions might not have an activityId set, skip recording history.
    if(activityId == null) {
      return;
    }
    
    // Search for the historic activity instance in the dbsqlsession cache, since process hasn't been persisted to db yet
    List<HistoricActivityInstanceEntity> cachedHistoricActivityInstances = getDbSqlSession().findInCache(HistoricActivityInstanceEntity.class);
    for (HistoricActivityInstanceEntity cachedHistoricActivityInstance: cachedHistoricActivityInstances) {
      if ( executionId.equals(cachedHistoricActivityInstance.getExecutionId())
              && (activityId.equals(cachedHistoricActivityInstance.getActivityId()))
              && (cachedHistoricActivityInstance.getEndTime()==null)
              ) {
        cachedHistoricActivityInstance.markEnded(null);
        return;
      }
    }
  }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:25,代码来源:HistoryManager.java


示例10: recordExecutionReplacedBy

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的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


示例11: getActivity

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
/**
 * 获得历史节点对应的节点信息.
 */
public ActivityImpl getActivity(
        HistoricActivityInstanceEntity historicActivityInstanceEntity) {
    ProcessDefinitionEntity processDefinitionEntity = new GetDeploymentProcessDefinitionCmd(
            historicActivityInstanceEntity.getProcessDefinitionId())
            .execute(Context.getCommandContext());

    return processDefinitionEntity
            .findActivity(historicActivityInstanceEntity.getActivityId());
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:13,代码来源:RollbackTaskCmd.java


示例12: execute

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
/**
 * 撤销流程.
 * 
 * @return 0-撤销成功 1-流程结束 2-下一结点已经通过,不能撤销
 */
public Integer execute(CommandContext commandContext) {
    // 获得历史任务
    HistoricTaskInstanceEntity historicTaskInstanceEntity = Context
            .getCommandContext().getHistoricTaskInstanceEntityManager()
            .findHistoricTaskInstanceById(historyTaskId);

    // 获得历史节点
    HistoricActivityInstanceEntity historicActivityInstanceEntity = getHistoricActivityInstanceEntity(historyTaskId);

    Graph graph = new ActivitiHistoryGraphBuilder(
            historicTaskInstanceEntity.getProcessInstanceId()).build();

    Node node = graph.findById(historicActivityInstanceEntity.getId());

    if (!checkCouldWithdraw(node)) {
        logger.info("cannot withdraw {}", historyTaskId);

        return 2;
    }

    // 删除所有活动中的task
    this.deleteActiveTasks(historicTaskInstanceEntity
            .getProcessInstanceId());

    // 获得期望撤销的节点后面的所有节点历史
    List<String> historyNodeIds = new ArrayList<String>();
    this.collectNodes(node, historyNodeIds);
    this.deleteHistoryActivities(historyNodeIds);
    // 恢复期望撤销的任务和历史
    this.processHistoryTask(historicTaskInstanceEntity,
            historicActivityInstanceEntity);

    logger.info("activiti is withdraw {}",
            historicTaskInstanceEntity.getName());

    return 0;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:43,代码来源:WithdrawTaskCmd.java


示例13: getActivity

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
public ActivityImpl getActivity(
        HistoricActivityInstanceEntity historicActivityInstanceEntity) {
    ProcessDefinitionEntity processDefinitionEntity = new GetDeploymentProcessDefinitionCmd(
            historicActivityInstanceEntity.getProcessDefinitionId())
            .execute(Context.getCommandContext());

    return processDefinitionEntity
            .findActivity(historicActivityInstanceEntity.getActivityId());
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:10,代码来源:WithdrawTaskCmd.java


示例14: validateTargetActivity

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
/**
 * 校验目标节点是否可以回退.
 */
public boolean validateTargetActivity(String targetActivityId) {
    JdbcTemplate jdbcTemplate = ApplicationContextHelper
            .getBean(JdbcTemplate.class);
    String historyTaskId = jdbcTemplate
            .queryForObject(
                    "select id_ from ACT_HI_TASKINST where act_id_=? order by END_TIME_ desc",
                    String.class, targetActivityId);

    // 先找到历史任务
    HistoricTaskInstanceEntity historicTaskInstanceEntity = Context
            .getCommandContext().getHistoricTaskInstanceEntityManager()
            .findHistoricTaskInstanceById(historyTaskId);

    // 再反向查找历史任务对应的历史节点
    HistoricActivityInstanceEntity historicActivityInstanceEntity = getHistoricActivityInstanceEntity(historyTaskId);

    logger.info("historic activity instance is : {}",
            historicActivityInstanceEntity.getId());

    Graph graph = new ActivitiHistoryGraphBuilder(
            historicTaskInstanceEntity.getProcessInstanceId()).build();

    Node node = graph.findById(historicActivityInstanceEntity.getId());

    if (!this.checkCouldRollback(node)) {
        logger.info("cannot rollback {}", taskId);

        return false;
    }

    return true;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:36,代码来源:RollbackCmd.java


示例15: recordActivityStart

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
@Override
public void recordActivityStart(ExecutionEntity executionEntity) {
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
        if (executionEntity.getActivity() != null) {
            IdGenerator idGenerator = Context.getProcessEngineConfiguration().getIdGenerator();

            String processDefinitionId = executionEntity.getProcessDefinitionId();
            String processInstanceId = executionEntity.getProcessInstanceId();
            String executionId = executionEntity.getId();

            HistoricActivityInstanceEntity historicActivityInstance = new HistoricActivityInstanceEntity();
            historicActivityInstance.setId(idGenerator.getNextId());
            historicActivityInstance.setProcessDefinitionId(processDefinitionId);
            historicActivityInstance.setProcessInstanceId(processInstanceId);
            historicActivityInstance.setExecutionId(executionId);
            historicActivityInstance.setActivityId(executionEntity.getActivityId());
            historicActivityInstance.setActivityName((String) executionEntity.getActivity().getProperty("name"));
            historicActivityInstance.setActivityType((String) executionEntity.getActivity().getProperty("type"));
            historicActivityInstance.setStartTime(Context.getProcessEngineConfiguration().getClock().getCurrentTime());

            // Inherit tenant id (if applicable)
            if (executionEntity.getTenantId() != null) {
                historicActivityInstance.setTenantId(executionEntity.getTenantId());
            }

            getDbSqlSession().insert(historicActivityInstance);

            // Fire event
            ProcessEngineConfigurationImpl config = Context.getProcessEngineConfiguration();
            if (config != null && config.getEventDispatcher().isEnabled()) {
                config.getEventDispatcher().dispatchEvent(
                        ActivitiEventBuilder.createEntityEvent(FlowableEngineEventType.HISTORIC_ACTIVITY_INSTANCE_CREATED, historicActivityInstance));
            }

        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:38,代码来源:DefaultHistoryManager.java


示例16: recordActivityEnd

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
@Override
public void recordActivityEnd(ExecutionEntity executionEntity) {
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
        HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(executionEntity);
        if (historicActivityInstance != null) {
            endHistoricActivityInstance(historicActivityInstance);
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:DefaultHistoryManager.java


示例17: endHistoricActivityInstance

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
protected void endHistoricActivityInstance(HistoricActivityInstanceEntity historicActivityInstance) {
    historicActivityInstance.markEnded(null);

    // Fire event
    ProcessEngineConfigurationImpl config = Context.getProcessEngineConfiguration();
    if (config != null && config.getEventDispatcher().isEnabled()) {
        config.getEventDispatcher().dispatchEvent(
                ActivitiEventBuilder.createEntityEvent(FlowableEngineEventType.HISTORIC_ACTIVITY_INSTANCE_ENDED, historicActivityInstance));
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:11,代码来源:DefaultHistoryManager.java


示例18: recordStartEventEnded

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
@Override
public void recordStartEventEnded(ExecutionEntity execution, String activityId) {
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {

        // Interrupted executions might not have an activityId set, skip recording history.
        if (activityId == null) {
            return;
        }

        HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(execution, activityId, false); // false -> no need to check the persistent store, as process just started
        if (historicActivityInstance != null) {
            endHistoricActivityInstance(historicActivityInstance);
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:16,代码来源:DefaultHistoryManager.java


示例19: findActivityInstance

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的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


示例20: recordTaskAssignment

import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity; //导入依赖的package包/类
@Override
public void recordTaskAssignment(TaskEntity task) {
    ExecutionEntity executionEntity = task.getExecution();
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
        if (executionEntity != null) {
            HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(executionEntity);
            if (historicActivityInstance != null) {
                historicActivityInstance.setAssignee(task.getAssignee());
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:13,代码来源:DefaultHistoryManager.java



注:本文中的org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RequestMapping类代码示例发布时间:2022-05-23
下一篇:
Java Component类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap