Since no transitions are followed when leaving the inner activity, it is needed to call the end listeners yourself.
503797
protected void callActivityEndListeners(DelegateExecution execution) {
    Context.getCommandContext().getProcessEngineConfiguration().getListenerNotificationHelper()
      .executeExecutionListeners(activity, execution, ExecutionListener.EVENTNAME_END);
  }
1017669
void terminate( boolean removeFromActiveSession ) {
        if (!isLive()) {
            return;
        }

        isLive = false;

        JcrObservationManager jcrObservationManager = observationManager();
        if (jcrObservationManager != null) {
            jcrObservationManager.removeAllEventListeners();
        }

        cleanLocks();
        if (removeFromActiveSession) this.repository.runningState().removeSession(this);
        this.context.getSecurityContext().logout();
    }
1364894
private void signalNotFull() {
        final ReentrantLock putLock = this.putLock;
        putLock.lock();
        try {
            notFull.signal();
        } finally {
            putLock.unlock();
        }
    }
588394
function(){

            var self = this;
            self.pause();

            // notify before
            this.emit('destroy');

            // remove all listeners
            self.off( true );
            // remove everything
            self.remove( self.getBodies() );
            self.remove( self.getBehaviors() );
            self.integrator( null );
            self.renderer( null );
        }
573726
function() {
        if (finished === true) {
            return;
        }
        finished = true;
        req.removeAllListeners();
        if (response !== null) {
            response.removeAllListeners();
        }
        callback.apply(null, arguments);
    }
1294249
public static void endTransitions(final @NonNull ViewGroup sceneRoot) {
        sPendingTransitions.remove(sceneRoot);

        final ArrayList<Transition> runningTransitions = getRunningTransitions(sceneRoot);
        if (!runningTransitions.isEmpty()) {
            // Make a copy in case this is called by an onTransitionEnd listener
            ArrayList<Transition> copy = new ArrayList(runningTransitions);
            for (int i = copy.size() - 1; i >= 0; i--) {
                final Transition transition = copy.get(i);
                transition.forceToEnd(sceneRoot);
            }
        }
    }
1083297
private void setupStartEndListeners() {
        TransitionSetListener listener = new TransitionSetListener(this);
        for (Transition childTransition : mTransitions) {
            childTransition.addListener(listener);
        }
        mCurrentListeners = mTransitions.size();
    }
1151316
@Override
    public void stopTransition() {
        //call listeners so they can perform their actions first, like modifying this adapter's transitions
        for (int i = 0, size = mListenerList.size(); i < size; i++) {
            mListenerList.get(i).onTransitionEnd(this);
        }

        for (int i = 0, size = mTransitionList.size(); i < size; i++) {
            mTransitionList.get(i).stopTransition();
        }
    }
656114
public void endCall(SipServletMessage message, boolean callerTerminating) throws IOException {
		if(callerTerminating) {
			fireEvent(
				(String) message.getSession().getAttribute("boothNumber"), 
				null, 
				"org.mobicents.slee.service.interopdemo.END_MEDIA", 
				message.getSession().getAttribute("callManagerRef"));
		} else {
			sipServletResponse.getSession().createRequest("BYE").send();
		}
	}
1020912
function() {
		var bindingState = this._bindingState;
		var options = this._options;

		// Turn off the parent listener
		if (bindingState.parent === true && this._parentToChild === true) {
			bindingState.parent = false;
			turnOffListeningAndUpdate(options.parent, options.child, this._updateChild, options.queue);
		}

		// Turn off the child listener
		if (bindingState.child === true && this._childToParent === true) {
			bindingState.child = false;
			turnOffListeningAndUpdate(options.child, options.parent, this._updateParent, options.queue);
		}
	}
706439
public synchronized void interruptLeadership()
    {
        Future<?> task = ourTask.get();
        if ( task != null )
        {
            task.cancel(true);
        }
    }
663512
private final void closeInternal()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "closeInternal");

    stop(); // stop the stream
    dem.close();
    closed = true;

    // close all the JSRemoteConsumerPoints.
    Enumeration vEnum = consumerKeyTable.elements();
    while (vEnum.hasMoreElements())
    {
      JSRemoteConsumerPoint aock = (JSRemoteConsumerPoint) vEnum.nextElement();
      aock.close();
    }
    consumerKeyTable.clear();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "closeInternal");
  }
183857
@Override
    public synchronized void onClose() {
        super.onClose();
        if (phoneStateListener != null)
            telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE);
    }
916250
public void pleaseStop()
    {
    	if (stopRequired)
    		return;
    	
        stopRequired = true;
        try
        {
            if (receiver != null)
                receiver.close();
        }
        catch (JMSException e)
        {
        	ErrorTools.log(e, log);
        }
    }
1075892
function(now) {

		if (now < this._end_time) {

			this._callAnimators(this._transition((now - this._started_time) / this._duration));

		} else {

			this._callAnimators(this._transition(1));
			this._finish();

		}

	}
341411
function cancel() {
        if (ended) {
            return;
        }

        ended = true;

        for (let i = ran; i < pending; i++) {
            const child = waitFor[i];
            child.removeEventListener(TRANSITION_END, listener);
        }

        if (cancelFrame) {
            cancelFrame();
            classList.remove(initClass);
        } else {
            classList.remove(className);
        }
    }
407229
def remove_ephemeral_listener(self, uid):
        """"""
        self.ephemeral_listeners[:] = (listener for listener in self.ephemeral_listeners
                                       if listener['uid'] != uid)