AUTO_LOGOUT

The AUTO_LOGOUT element defines the auto-logout mechanism to be used for an application.

Syntax

<AUTO_LOGOUT Using="component-id">
    [<TIMEOUT>...</TIMEOUT>]
    [<COMMAND>...</COMMAND>] 
    [<PROMPT>...</PROMPT>]
</AUTO_LOGOUT>
  1. The component-id references an AUTO_LOGOUT_COMPONENT to inherit its parameters.

Child elements

The AUTO_LOGOUT element may contain the following child elements:

  1. Zero or one TIMEOUT (for auto logout) element.
  2. Zero or one COMMAND (for auto logout) element.
  3. Zero or one PROMPT (for auto logout) element.

Usage

You use this element to define the auto logout mechanism for an application. You can reference the default auto-logout component or set the element directly in your application configuration file. Examples of both methods are shown.

When the AUTO_LOGOUT is set, the DVM detects when an application has no user activity. It then waits the number of seconds specified by the TIMEOUT element before triggering an auto logout event and sending the application a log out message.
  • For Genero Browser Client (GBC) applications, you get a log out page.
  • For Genero Desktop Client (GDC) applications, you get a pop-up window.
By default the ending page or pop-up window shows the following message when auto logout occurs:

You have been logged out.

Usage example - reference an auto logout component

When your applications reference the default application defaultwa, they inherit its AUTO_LOGOUT settings, which use the default AUTO_LOGOUT_COMPONENT identified by the Id value "cpn.wa.autologout", as shown in the example from the GAS configuration file.

<APPLICATION Id="defaultwa" Abstract="TRUE">
   <!-- This is the "default" application.
    It is not used directly: it is used for defining a "root" application. -->
   <EXECUTION Using="cpn.wa.execution.local"/>
   <AUTO_LOGOUT Using="cpn.wa.autologout"/>
   ...
</APPLICATION>
The default AUTO_LOGOUT_COMPONENT, cpn.wa.autologout, is shown in this example. The default timeout duration set to 0 seconds means the auto logout is ignored and applications keep running.
<COMPONENT_LIST>
   ...
   <AUTO_LOGOUT_COMPONENT Id="cpn.wa.autologout">
      <TIMEOUT>0</TIMEOUT>
   </AUTO_LOGOUT_COMPONENT>
   ...
</COMPONENT_LIST>

Usage example - use auto logout directly

If you want to set auto logout directly in your application configuration file (xcf), you can add an AUTO_LOGOUT element. In this example, the timeout duration is set to 30 seconds, which means the DVM waits 30 seconds from when it detects an application has no user activity before the application gets a log out message.
<APPLICATION Parent="defaultwa">
    <EXECUTION>
	   <PATH>my_app_dir</PATH>
	   <MODULE>my_module</MODULE>
	</EXECUTION/>
    <AUTO_LOGOUT>
         <TIMEOUT>30</TIMEOUT>
    </AUTO_LOGOUT>
    ...
 </APPLICATION>

Auto logout and child applications

When an application has launched child applications, the auto logout is not triggered as long as the parent or any of its child applications have user activity.
Important: If an application has child applications running when the AUTO_LOGOUT is triggered, the following describes the logout process:
  • An auto logout ending page or pop-up window will be generated and returned for all child applications.
  • The proxy will stay alive until the last child application has shown its ending page before closing the fglrun application.
Note: The order that applications close can not be determined by the AUTO_LOGOUT process as it depends mainly on when the auto logout is initiated in the front-end. If the order your applications close at auto logout is important, you will need to handle this in your application's code.

Parent elements

The AUTO_LOGOUT element is a child of the APPLICATION (for an application) element.