@Override
  public void destroy() {

    ensureParentInitialized();

    // execute Output Mappings (if they exist).
    ensureActivityInitialized();
    if (activity != null && activity.getIoMapping() != null && !skipIoMapping) {
      activity.getIoMapping().executeOutputParameters(this);
    }

    clearExecution();

    super.destroy();

    removeEventSubscriptionsExceptCompensation();
  }
@ Override public void destroy ( ) { ensureParentInitialized ( ) ; ensureActivityInitialized ( ) ; if ( activity != null && activity . getIoMapping ( ) != null && ! skipIoMapping ) { activity . getIoMapping ( ) . executeOutputParameters ( this ) ; } clearExecution ( ) ; super . destroy ( ) ; removeEventSubscriptionsExceptCompensation ( ) ; }
Method used for destroying a scope in a way that the execution can be
removed afterwards.