Ending a session

Hooks are attached to events that occur when a user interacts with HCL Compass. Because hooks execute at predefined times during the middle of a session, your hook code does not end a session. The session ends automatically when the user logs off.

However, when you write an external application, you must end the current session by deleting the Session object that you have created.

Your external application should end a session properly. Delete any objects that you explicitly created and do not need any more, including a Session object.

  • For Perl, you must destroy it using Unbuild. For example:
    
    CQSession::Unbuild($currentSession);
    
  • For VBScript, the session ends when the final reference to the Session object ceases to exist.