org.camunda.bpm.engine.impl.cmd
Class GetActivityInstanceCmd

java.lang.Object
  extended by org.camunda.bpm.engine.impl.cmd.GetActivityInstanceCmd
All Implemented Interfaces:
Command<ActivityInstance>

public class GetActivityInstanceCmd
extends Object
implements Command<ActivityInstance>

Creates an activity instance tree according to the following strategy:

Author:
Thorben Lindhauer

Field Summary
protected  String processInstanceId
           
 
Constructor Summary
GetActivityInstanceCmd(String processInstanceId)
           
 
Method Summary
protected  ActivityInstanceImpl createActivityInstance(PvmExecutionImpl scopeExecution, ScopeImpl scope, String activityInstanceId, String parentActivityInstanceId)
           
protected  TransitionInstanceImpl createTransitionInstance(PvmExecutionImpl execution)
           
 ActivityInstance execute(CommandContext commandContext)
           
protected  List<ExecutionEntity> filterLeaves(List<ExecutionEntity> executionList)
           
protected  List<ExecutionEntity> filterNonEventScopeExecutions(List<ExecutionEntity> executionList)
           
protected  ExecutionEntity filterProcessInstance(List<ExecutionEntity> executionList)
           
protected  void loadChildExecutionsFromCache(ExecutionEntity execution, List<ExecutionEntity> childExecutions)
          Loads all executions that are part of this process instance tree from the dbSqlSession cache.
protected  List<ExecutionEntity> loadFromDb(String processInstanceId, CommandContext commandContext)
           
protected  List<ExecutionEntity> loadProcessInstance(String processInstanceId, CommandContext commandContext)
           
protected  void populateChildInstances(Map<String,ActivityInstanceImpl> activityInstances, Map<String,TransitionInstanceImpl> transitionInstances)
           
protected
<S,T> void
putListElement(Map<S,List<T>> mapOfLists, S key, T listElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processInstanceId

protected String processInstanceId
Constructor Detail

GetActivityInstanceCmd

public GetActivityInstanceCmd(String processInstanceId)
Method Detail

execute

public ActivityInstance execute(CommandContext commandContext)
Specified by:
execute in interface Command<ActivityInstance>

createActivityInstance

protected ActivityInstanceImpl createActivityInstance(PvmExecutionImpl scopeExecution,
                                                      ScopeImpl scope,
                                                      String activityInstanceId,
                                                      String parentActivityInstanceId)

createTransitionInstance

protected TransitionInstanceImpl createTransitionInstance(PvmExecutionImpl execution)

populateChildInstances

protected void populateChildInstances(Map<String,ActivityInstanceImpl> activityInstances,
                                      Map<String,TransitionInstanceImpl> transitionInstances)

putListElement

protected <S,T> void putListElement(Map<S,List<T>> mapOfLists,
                                    S key,
                                    T listElement)

filterProcessInstance

protected ExecutionEntity filterProcessInstance(List<ExecutionEntity> executionList)

filterLeaves

protected List<ExecutionEntity> filterLeaves(List<ExecutionEntity> executionList)

filterNonEventScopeExecutions

protected List<ExecutionEntity> filterNonEventScopeExecutions(List<ExecutionEntity> executionList)

loadProcessInstance

protected List<ExecutionEntity> loadProcessInstance(String processInstanceId,
                                                    CommandContext commandContext)

loadFromDb

protected List<ExecutionEntity> loadFromDb(String processInstanceId,
                                           CommandContext commandContext)

loadChildExecutionsFromCache

protected void loadChildExecutionsFromCache(ExecutionEntity execution,
                                            List<ExecutionEntity> childExecutions)
Loads all executions that are part of this process instance tree from the dbSqlSession cache. (optionally querying the db if a child is not already loaded.

Parameters:
execution - the current root execution (already contained in childExecutions)
childExecutions - the list in which all child executions should be collected


Copyright © 2016 camunda services GmbH. All rights reserved.