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

Java ScopeImpl类代码示例

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

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



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

示例1: getInstantiationStack

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public InstantiationStack getInstantiationStack() {

  if (instantiationStack == null) {
    FlowScopeWalker flowScopeWalker = new FlowScopeWalker(initial.getFlowScope());
    ScopeCollector scopeCollector = new ScopeCollector();
    flowScopeWalker.addPreVisitor(scopeCollector).walkWhile(new ReferenceWalker.WalkCondition<ScopeImpl>() {
      public boolean isFulfilled(ScopeImpl element) {
        return element == null || element == initial.getProcessDefinition();
      }
    });

    List<PvmActivity> scopeActivities = (List) scopeCollector.getScopes();
    Collections.reverse(scopeActivities);

    instantiationStack = new InstantiationStack(scopeActivities, initial, null);
  }

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


示例2: collectNonExistingFlowScopes

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
/**
 * Returns a list of flow scopes from the given scope until a scope is reached that is already present in the given
 * {@link MigratingScopeInstanceBranch} (exclusive). The order of the returned list is top-down, i.e. the highest scope
 * is the first element of the list.
 */
protected List<ScopeImpl> collectNonExistingFlowScopes(ScopeImpl scope, final MigratingScopeInstanceBranch migratingExecutionBranch) {
  FlowScopeWalker walker = new FlowScopeWalker(scope);
  final List<ScopeImpl> result = new LinkedList<ScopeImpl>();
  walker.addPreVisitor(new TreeVisitor<ScopeImpl>() {

    @Override
    public void visit(ScopeImpl obj) {
      result.add(0, obj);
    }
  });

  walker.walkWhile(new ReferenceWalker.WalkCondition<ScopeImpl>() {

    @Override
    public boolean isFulfilled(ScopeImpl element) {
      return migratingExecutionBranch.hasInstance(element);
    }
  });

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


示例3: addTransitionInstance

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
public MigratingTransitionInstance addTransitionInstance(
    MigrationInstruction migrationInstruction,
    TransitionInstance transitionInstance,
    ScopeImpl sourceScope,
    ScopeImpl targetScope,
    ExecutionEntity asyncExecution) {

  MigratingTransitionInstance migratingTransitionInstance = new MigratingTransitionInstance(
      transitionInstance,
      migrationInstruction,
      sourceScope,
      targetScope,
      asyncExecution);

  migratingTransitionInstances.add(migratingTransitionInstance);

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


示例4: addEventScopeInstance

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
public MigratingEventScopeInstance addEventScopeInstance(
    MigrationInstruction migrationInstruction,
    ExecutionEntity eventScopeExecution,
    ScopeImpl sourceScope,
    ScopeImpl targetScope,
    MigrationInstruction eventSubscriptionInstruction,
    EventSubscriptionEntity eventSubscription,
    ScopeImpl eventSubscriptionSourceScope,
    ScopeImpl eventSubscriptionTargetScope) {

  MigratingEventScopeInstance compensationInstance = new MigratingEventScopeInstance(
      migrationInstruction,
      eventScopeExecution,
      sourceScope,
      targetScope,
      eventSubscriptionInstruction,
      eventSubscription,
      eventSubscriptionSourceScope,
      eventSubscriptionTargetScope);

  migratingEventScopeInstances.add(compensationInstance);

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


示例5: instantiateScopes

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
protected void instantiateScopes(
    MigratingScopeInstance ancestorScopeInstance,
    MigratingScopeInstanceBranch executionBranch,
    List<ScopeImpl> scopesToInstantiate) {

  if (scopesToInstantiate.isEmpty()) {
    return;
  }

  // must always be an activity instance
  MigratingActivityInstance ancestorActivityInstance = (MigratingActivityInstance) ancestorScopeInstance;

  ExecutionEntity newParentExecution = ancestorActivityInstance.createAttachableExecution();

  Map<PvmActivity, PvmExecutionImpl> createdExecutions =
      newParentExecution.instantiateScopes((List) scopesToInstantiate, skipCustomListeners, skipIoMappings);

  for (ScopeImpl scope : scopesToInstantiate) {
    ExecutionEntity createdExecution = (ExecutionEntity) createdExecutions.get(scope);
    createdExecution.setActivity(null);
    createdExecution.setActive(false);
    executionBranch.visited(new MigratingActivityInstance(scope, createdExecution));
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:MigratingActivityInstanceVisitor.java


示例6: addActivityInstance

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
public MigratingActivityInstance addActivityInstance(
    MigrationInstruction migrationInstruction,
    ActivityInstance activityInstance,
    ScopeImpl sourceScope,
    ScopeImpl targetScope,
    ExecutionEntity scopeExecution) {

  MigratingActivityInstance migratingActivityInstance = new MigratingActivityInstance(
      activityInstance,
      migrationInstruction,
      sourceScope,
      targetScope,
      scopeExecution);

  migratingActivityInstances.add(migratingActivityInstance);

  if (processInstanceId.equals(activityInstance.getId())) {
    rootInstance = migratingActivityInstance;
  }

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


示例7: handle

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@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);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:23,代码来源:TransitionInstanceJobHandler.java


示例8: parseUserTask

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
/**
 * Hooks listeners to assignment and creation of tasks.
 * @param userTaskElement task to hook to
 * @param scope a BPMN scope
 * @param activity an Activity scope
 */
@Override
public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
    UserTaskActivityBehavior activityBehavior = (UserTaskActivityBehavior) activity.getActivityBehavior();
    TaskDefinition taskDefinition = activityBehavior.getTaskDefinition();
    addTaskAssignmentListeners(taskDefinition);
}
 
开发者ID:LIBCAS,项目名称:ARCLib,代码行数:13,代码来源:NotifyEventParseListener.java


示例9: preInit

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@Override
public void preInit(final ProcessEngineConfigurationImpl configuration) {
  new ShowcaseSetup().run();

  customPreBPMNParseListeners(configuration).add(new AbstractBpmnParseListener() {
    @Override
    public void parseUserTask(final Element userTaskElement, final ScopeImpl scope, final ActivityImpl activity) {
      taskDefinition(activity).addTaskListener(EVENTNAME_CREATE, new SkillBasedRoutingListener());
    }
  });
}
 
开发者ID:holisticon,项目名称:skill-based-routing,代码行数:12,代码来源:SkillBasedRoutingProcessEnginePlugin.java


示例10: parseSequenceFlow

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@Override
public void parseSequenceFlow(Element sequenceFlowElement, ScopeImpl scopeElement,
        org.camunda.bpm.engine.impl.pvm.process.TransitionImpl transition) {

    final PathCoverageExecutionListener pathCoverageExecutionListener = new PathCoverageExecutionListener(
            coverageTestRunState);
    transition.addListener(ExecutionListener.EVENTNAME_TAKE, pathCoverageExecutionListener);

}
 
开发者ID:camunda,项目名称:camunda-bpm-process-test-coverage,代码行数:10,代码来源:PathCoverageParseListener.java


示例11: parseIntermediateCatchEvent

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@Override
public void parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scope,
        org.camunda.bpm.engine.impl.pvm.process.ActivityImpl activity) {

    final IntermediateEventExecutionListener startListener = new IntermediateEventExecutionListener(
            coverageTestRunState);
    activity.addListener(ExecutionListener.EVENTNAME_START, startListener);

    final IntermediateEventExecutionListener endListener = new IntermediateEventExecutionListener(
            coverageTestRunState);
    activity.addListener(ExecutionListener.EVENTNAME_END, endListener);
}
 
开发者ID:camunda,项目名称:camunda-bpm-process-test-coverage,代码行数:13,代码来源:PathCoverageParseListener.java


示例12: eventSubprocessConcurrentChildExecutionEnded

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
public static boolean eventSubprocessConcurrentChildExecutionEnded(ActivityExecution scopeExecution, ActivityExecution endedExecution) {
  boolean performLegacyBehavior = isLegacyBehaviorRequired(endedExecution);

  if(performLegacyBehavior) {
    LOG.endConcurrentExecutionInEventSubprocess();
    // notify the grandparent flow scope in a similar way PvmAtomicOperationAcitivtyEnd does
    ScopeImpl flowScope = endedExecution.getActivity().getFlowScope();
    if (flowScope != null) {
      flowScope = flowScope.getFlowScope();

      if (flowScope != null) {
        if (flowScope == endedExecution.getActivity().getProcessDefinition()) {
          endedExecution.remove();
          scopeExecution.tryPruneLastConcurrentChild();
          scopeExecution.forceUpdate();
        }
        else {
          PvmActivity flowScopeActivity = (PvmActivity) flowScope;

          ActivityBehavior activityBehavior = flowScopeActivity.getActivityBehavior();
          if (activityBehavior instanceof CompositeActivityBehavior) {
            ((CompositeActivityBehavior) activityBehavior).concurrentChildExecutionEnded(scopeExecution, endedExecution);
          }
        }
      }
    }
  }

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


示例13: initializeTimerDeclarations

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@Override
public void initializeTimerDeclarations() {
  LOG.initializeTimerDeclaration(this);
  ScopeImpl scope = getScopeActivity();
  Collection<TimerDeclarationImpl> timerDeclarations = TimerDeclarationImpl.getDeclarationsForScope(scope).values();
  for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
    timerDeclaration.createTimerInstance(this);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:10,代码来源:ExecutionEntity.java


示例14: parseIntermediateCatchEvent

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@Override
public void parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) {
  String type = activity.getProperties().get(BpmnProperties.TYPE);
  if (type != null && type.equals(INTERMEDIATE_TIMER)) {
    this.setFailedJobRetryTimeCycleValue(intermediateEventElement, activity);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:8,代码来源:DefaultFailedJobParseListener.java


示例15: getExecutions

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
public Set<ExecutionEntity> getExecutions(ScopeImpl activity) {
  Set<ExecutionEntity> executionsForActivity = activityExecutionMapping.get(activity);
  if (executionsForActivity == null) {
    executionsForActivity = new HashSet<ExecutionEntity>();
    activityExecutionMapping.put(activity, executionsForActivity);
  }

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


示例16: MigratingTransitionInstance

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
public MigratingTransitionInstance(
    TransitionInstance transitionInstance,
    MigrationInstruction migrationInstruction,
    ScopeImpl sourceScope,
    ScopeImpl targetScope,
    ExecutionEntity asyncExecution) {
  this.transitionInstance = transitionInstance;
  this.migrationInstruction = migrationInstruction;
  this.sourceScope = sourceScope;
  this.targetScope = targetScope;
  this.currentScope = sourceScope;
  this.representativeExecution = asyncExecution;
  this.activeState = representativeExecution.isActive();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:15,代码来源:MigratingTransitionInstance.java


示例17: validate

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@Override
public void validate(MigratingActivityInstance migratingInstance, MigratingProcessInstance migratingProcessInstance,
    MigratingActivityInstanceValidationReportImpl instanceReport) {

  ScopeImpl sourceScope = migratingInstance.getSourceScope();

  if (sourceScope != sourceScope.getProcessDefinition()) {
    ActivityImpl sourceActivity = (ActivityImpl) migratingInstance.getSourceScope();

    if (!SupportedActivityValidator.INSTANCE.isSupportedActivity(sourceActivity)) {
      instanceReport.addFailure("The type of the source activity is not supported for activity instance migration");
    }
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:15,代码来源:SupportedActivityInstanceValidator.java


示例18: testParseCompensationHandlerOfMiActivity

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
@Deployment(resources = "org/camunda/bpm/engine/test/bpmn/event/compensate/CompensateEventTest.compensationMiActivity.bpmn20.xml")
public void testParseCompensationHandlerOfMiActivity() {
  ActivityImpl miActivity = findActivityInDeployedProcessDefinition("undoBookHotel");
  ScopeImpl flowScope = miActivity.getFlowScope();

  assertEquals(ActivityTypes.MULTI_INSTANCE_BODY, flowScope.getProperty(BpmnParse.PROPERTYNAME_TYPE));
  assertEquals("bookHotel" + BpmnParse.MULTI_INSTANCE_BODY_ID_SUFFIX, ((ActivityImpl) flowScope).getActivityId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:9,代码来源:BpmnParseTest.java


示例19: getInstructionsByTargetScope

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
public List<ValidatingMigrationInstruction> getInstructionsByTargetScope(ScopeImpl scope) {
  List<ValidatingMigrationInstruction> instructions = instructionsByTargetScope.get(scope);

  if (instructions == null) {
    return Collections.emptyList();
  }
  else {
    return instructions;
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:ValidatingMigrationInstructions.java


示例20: MigratingEventScopeInstance

import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入依赖的package包/类
/**
 * Creates an emerged scope
 */
public MigratingEventScopeInstance(
    EventSubscriptionEntity eventSubscription,
    ExecutionEntity eventScopeExecution,
    ScopeImpl targetScope
    ) {
  this.migratingEventSubscription =
      new MigratingCompensationEventSubscriptionInstance(null, null, targetScope, eventSubscription);
  this.eventScopeExecution = eventScopeExecution;

  // compensation handlers (not boundary events)
  // or parent flow scopes
  this.targetScope = targetScope;
  this.currentScope = targetScope;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:MigratingEventScopeInstance.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java IniWebEnvironment类代码示例发布时间:2022-05-23
下一篇:
Java HttpClient类代码示例发布时间: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