code: public static void removeLongLivedPageFlow( String modulePath, HttpServletRequest request,
                                                  ServletContext servletContext )
      {
          StorageHandler sh = Handlers.get( servletContext ).getStorageHandler();
          HttpServletRequest unwrappedRequest = unwrapMultipart( request );
          RequestContext rc = new RequestContext( unwrappedRequest, null );
          
          String attrName = InternalUtils.getLongLivedFlowAttr( modulePath );
          attrName = ScopedServletUtils.getScopedSessionAttrName( attrName, unwrappedRequest );
          sh.removeAttribute( rc, attrName );
  
          //
          // Now, if the current page flow is long-lived, remove the reference.
          //
          String currentLongLivedAttrName =
                  ScopedServletUtils.getScopedSessionAttrName( CURRENT_LONGLIVED_ATTR, unwrappedRequest );
          String currentLongLivedModulePath =
                  ( String ) sh.getAttribute( rc, currentLongLivedAttrName );
          
          if ( modulePath.equals( currentLongLivedModulePath ) )
          {
              sh.removeAttribute( rc, currentLongLivedAttrName );
          }
      }
docs: Remove a "long-lived" page flow from the session. Once it is created, a long-lived page flow
  is never removed from the session unless this method or {@link PageFlowController#remove} is
  called.  Navigating to another page flow hides the current long-lived controller, but does not
  remove it.