本文整理汇总了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));
}
示例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;
}