code: public static PvmExecutionImpl getScopeExecution(ScopeImpl scope, Map<ScopeImpl, PvmExecutionImpl> activityExecutionMapping) {
      ScopeImpl flowScope = scope.getFlowScope();
      return activityExecutionMapping.get(flowScope);
    }
docs: In case the process instance was migrated from a previous version, activities which are now parsed as scopes
  do not have scope executions. Use the flow scopes of these activities in order to find their execution.
  - For an event subprocess this is the scope execution of the scope in which the event subprocess is embeded in
  - For a multi instance sequential subprocess this is the multi instace scope body.
  
  @param scope
  @param activityExecutionMapping
  @return