org.camunda.bpm.engine.impl.tree
Class ActivityAwareScopeExecutionCollector

java.lang.Object
  extended by org.camunda.bpm.engine.impl.tree.ActivityAwareScopeExecutionCollector
All Implemented Interfaces:
TreeVisitor<PvmExecutionImpl>

public class ActivityAwareScopeExecutionCollector
extends Object
implements TreeVisitor<PvmExecutionImpl>

Only collects scope executions that execute ancestor scopes of the given commonChildScope.

In regular process execution, collects all scope executions. Yet in cases where the execution tree is not aligned to the activity tree (such as with compensation throwing executions), executions are skipped if they execute an activity that is not a parent/ancestor of the given commonChildScope.

Author:
Thorben Lindhauer

Field Summary
protected  ScopeImpl commonChildScope
           
protected  ScopeImpl currentActivity
           
protected  List<PvmExecutionImpl> executions
           
 
Constructor Summary
ActivityAwareScopeExecutionCollector(ScopeImpl commonChildScope)
           
 
Method Summary
 List<PvmExecutionImpl> getExecutions()
           
protected  ScopeImpl getFlowScope(ScopeImpl scope)
           
protected  boolean isAncestorOf(ScopeImpl ancestorScope, ScopeImpl candidateDescendantScope)
           
 void visit(PvmExecutionImpl obj)
          Invoked for a node in tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commonChildScope

protected ScopeImpl commonChildScope

currentActivity

protected ScopeImpl currentActivity

executions

protected List<PvmExecutionImpl> executions
Constructor Detail

ActivityAwareScopeExecutionCollector

public ActivityAwareScopeExecutionCollector(ScopeImpl commonChildScope)
Method Detail

visit

public void visit(PvmExecutionImpl obj)
Description copied from interface: TreeVisitor
Invoked for a node in tree.

Specified by:
visit in interface TreeVisitor<PvmExecutionImpl>
Parameters:
obj - a reference to the node

getExecutions

public List<PvmExecutionImpl> getExecutions()

isAncestorOf

protected boolean isAncestorOf(ScopeImpl ancestorScope,
                               ScopeImpl candidateDescendantScope)

getFlowScope

protected ScopeImpl getFlowScope(ScopeImpl scope)


Copyright © 2015 camunda services GmbH. All rights reserved.