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>

Author:
Daniel Meyer

Field Summary
protected  String processInstanceId
           
 
Constructor Summary
GetActivityInstanceCmd(String processInstanceId)
           
 
Method Summary
 ActivityInstance execute(CommandContext commandContext)
           
protected  ScopeImpl getActivity(ExecutionEntity executionEntity)
           
protected  void initActivityInstanceTree(ActivityInstanceImpl parentActInst, Map<String,List<ExecutionEntity>> executionsByParentActIds)
           
protected  boolean isInactiveConcurrentRoot(ExecutionEntity execution)
          returns true if execution is a concurrent root.
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)
           
 
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)
Parameters:
processInstanceId -
Method Detail

execute

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

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

initActivityInstanceTree

protected void initActivityInstanceTree(ActivityInstanceImpl parentActInst,
                                        Map<String,List<ExecutionEntity>> executionsByParentActIds)

isInactiveConcurrentRoot

protected boolean isInactiveConcurrentRoot(ExecutionEntity execution)
returns true if execution is a concurrent root.


getActivity

protected ScopeImpl getActivity(ExecutionEntity executionEntity)


Copyright © 2014 camunda services GmbH. All Rights Reserved.