code: @Override
    public void end(boolean completeScope) {
  
  
      setCompleteScope(completeScope);
  
      isActive = false;
      isEnded = true;
  
      if (hasReplacedParent()) {
        getParent().replacedBy = null;
      }
  
      performOperation(PvmAtomicOperation.ACTIVITY_NOTIFY_LISTENER_END);
    }
docs: Ends an execution. Invokes end listeners for the current activity and notifies the flow scope execution
  of this happening which may result in the flow scope ending.
  
  @param completeScope true if ending the execution contributes to completing the BPMN 2.0 scope