use of org.camunda.bpm.engine.impl.migration.instance.MigratingAsyncJobInstance in project camunda-bpm-platform by camunda.
the class TransitionInstanceJobHandler method handle.
@Override
public void handle(MigratingInstanceParseContext parseContext, MigratingTransitionInstance transitionInstance, List<JobEntity> elements) {
for (JobEntity job : elements) {
if (!isAsyncContinuation(job)) {
continue;
}
ScopeImpl targetScope = transitionInstance.getTargetScope();
if (targetScope != null) {
JobDefinitionEntity targetJobDefinitionEntity = parseContext.getTargetJobDefinition(transitionInstance.getTargetScope().getId(), job.getJobHandlerType());
MigratingAsyncJobInstance migratingJobInstance = new MigratingAsyncJobInstance(job, targetJobDefinitionEntity, transitionInstance.getTargetScope());
transitionInstance.setDependentJobInstance(migratingJobInstance);
parseContext.submit(migratingJobInstance);
}
parseContext.consume(job);
}
}
Aggregations