当前位置: 首页>>代码示例>>Java>>正文


Java ExecutionEntity.getJobs方法代码示例

本文整理汇总了Java中org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.getJobs方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEntity.getJobs方法的具体用法?Java ExecutionEntity.getJobs怎么用?Java ExecutionEntity.getJobs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity的用法示例。


在下文中一共展示了ExecutionEntity.getJobs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handle

import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public void handle(MigratingInstanceParseContext parseContext, TransitionInstance transitionInstance) {

  if (!isAsyncTransitionInstance(transitionInstance)) {
    return;
  }

  MigrationInstruction applyingInstruction = parseContext.getInstructionFor(transitionInstance.getActivityId());

  ScopeImpl sourceScope = parseContext.getSourceProcessDefinition().findActivity(transitionInstance.getActivityId());
  ScopeImpl targetScope = null;

  if (applyingInstruction != null) {
    String activityId = applyingInstruction.getTargetActivityId();
    targetScope = parseContext.getTargetProcessDefinition().findActivity(activityId);
  }

  ExecutionEntity asyncExecution = Context
      .getCommandContext()
      .getExecutionManager()
      .findExecutionById(transitionInstance.getExecutionId());

  MigratingTransitionInstance migratingTransitionInstance = parseContext.getMigratingProcessInstance()
    .addTransitionInstance(
      applyingInstruction,
      transitionInstance,
      sourceScope,
      targetScope,
      asyncExecution);

  MigratingActivityInstance parentInstance = parseContext.getMigratingActivityInstanceById(transitionInstance.getParentActivityInstanceId());
  migratingTransitionInstance.setParent(parentInstance);

  List<JobEntity> jobs = asyncExecution.getJobs();
  parseContext.handleDependentTransitionInstanceJobs(migratingTransitionInstance, jobs);

  parseContext.handleDependentVariables(migratingTransitionInstance, collectTransitionInstanceVariables(migratingTransitionInstance));

}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:40,代码来源:TransitionInstanceHandler.java

示例2: isAsyncTransitionInstance

import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
/**
 * Workaround for CAM-5609: In general, only async continuations should be represented as TransitionInstances, but
 * due to this bug, completed multi-instances are represented like that as well. We tolerate the second case.
 */
protected boolean isAsyncTransitionInstance(TransitionInstance transitionInstance) {
  String executionId = transitionInstance.getExecutionId();
  ExecutionEntity execution = Context.getCommandContext().getExecutionManager().findExecutionById(executionId);
  for (JobEntity job : execution.getJobs()) {
    if (AsyncContinuationJobHandler.TYPE.equals(job.getJobHandlerType())) {
      return true;
    }
  }

  return false;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:TransitionInstanceHandler.java


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