org.camunda.bpm.engine.impl.bpmn.helper
Class ScopeUtil

java.lang.Object
  extended by org.camunda.bpm.engine.impl.bpmn.helper.ScopeUtil

public class ScopeUtil
extends Object

Author:
Daniel Meyer, Nico Rehwaldt

Constructor Summary
ScopeUtil()
           
 
Method Summary
static void createEventScopeExecution(ExecutionEntity execution)
          creates an event scope for the given execution: create a new event scope execution under the parent of the given execution and move all event subscriptions to that execution.
static ActivityImpl findInParentScopesByBehaviorType(ActivityImpl activity, Class<? extends ActivityBehavior> behaviorType)
           
static ActivityExecution findScopeExecution(ActivityExecution execution)
          Find the next scope execution in the parent execution hierarchy That method works different than findScopeExecutionForScope(org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity, org.camunda.bpm.engine.impl.pvm.PvmScope) which returns the most outer scope execution.
static ExecutionEntity findScopeExecutionForScope(ExecutionEntity execution, PvmScope scopeActivity)
          returns the top-most execution sitting in an activity part of the scope defined by 'scopeActivitiy'.
static void throwCompensationEvent(List<CompensateEventSubscriptionEntity> eventSubscriptions, ActivityExecution execution, boolean async)
          we create a separate execution for each compensation handler invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopeUtil

public ScopeUtil()
Method Detail

findScopeExecution

public static ActivityExecution findScopeExecution(ActivityExecution execution)
Find the next scope execution in the parent execution hierarchy That method works different than findScopeExecutionForScope(org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity, org.camunda.bpm.engine.impl.pvm.PvmScope) which returns the most outer scope execution.

Parameters:
execution - the execution from which to start the search
Returns:
the next scope execution in the parent execution hierarchy

findScopeExecutionForScope

public static ExecutionEntity findScopeExecutionForScope(ExecutionEntity execution,
                                                         PvmScope scopeActivity)
returns the top-most execution sitting in an activity part of the scope defined by 'scopeActivitiy'.


findInParentScopesByBehaviorType

public static ActivityImpl findInParentScopesByBehaviorType(ActivityImpl activity,
                                                            Class<? extends ActivityBehavior> behaviorType)

throwCompensationEvent

public static void throwCompensationEvent(List<CompensateEventSubscriptionEntity> eventSubscriptions,
                                          ActivityExecution execution,
                                          boolean async)
we create a separate execution for each compensation handler invocation.


createEventScopeExecution

public static void createEventScopeExecution(ExecutionEntity execution)
creates an event scope for the given execution: create a new event scope execution under the parent of the given execution and move all event subscriptions to that execution. this allows us to "remember" the event subscriptions after finishing a scope



Copyright © 2014 camunda services GmbH. All rights reserved.