Home Search

DriveWorks Pro 22
How To: Extend the Timeout In DriveWorks Live (KB12121020)

Send Feedback

How To: Extend the Timeout In DriveWorks Live

This topic applies to the Web Theme only.

When using the Integration Theme please refer to the topic Integration Theme Settings to extend the timeout.

Timeout is the interval at which DriveWorks Live will automatically log users out of a session. This will ensure the DriveWorks Live license in use is returned so it can be re-allocated.

Timeout can run in one of two modes:

  1. Timeout when the browser is closed and the user has not logged out.

    To keep a session alive DriveWorks Live runs a script that pings the server every 15 seconds. If no response is received the timeout setting is then activated.

    Additionally a Specification could timeout (for example when a browser tab is inactive) before the session timeout is reached.

    The period of time before Session and Specification Timeout activates is controlled in the Web.config file.

    See Editing the Session Timeout Setting and Editing the Specification Timeout Setting sections below.

  2. Timeout after a period of inactivity. Any running specifications will be cancelled.

    To run in this mode the ping script must be turned off.

    The period of time before Timeout activates is controlled in the Web.config file.

    The ping script is turned off in the main.js file.

    See Editing the Session Timeout Setting and Setting the Ping Interval sections below.

Editing the Session Timeout Setting

The session timeout setting is applied in the web.config file for the installed theme.

The sessionState timeout setting is the time in minutes before a session is logged out. It is automatically set to 5 in the DriveWorks Live Web Theme.

The web.config file is located in the root directory of where the theme was installed on setup. See How To: Customize the DriveWorks Live Web Theme (Advanced Customization section) for more information.

Make a back up of this file before editing any setting.

Change the default 5 value to the required number of minutes, and save the web.config file in the same location.

Web.config file
<!-- This setting controls the session timeout in minutes --> 
<sessionState timeout=" 5"/>

Editing the Specification Timeout Setting

The Specification timeout setting is applied in the web.config file for the installed theme.

The SpecificationTimeout setting is the time before an inactive Specification is timed out. It is set to 30 seconds by default.

The web.config file is located in the root directory of where the theme was installed on setup. See How To: Customize the DriveWorks Live Web Theme (Advanced Customization section) for more information.

Make a back up of this file before editing any setting.

Change the default 30 value to the required time, and save the web.config file in the same location.

When setting a value for SpecificationTimeout we recommend including an allowance for the ping sent when network faults occur (see To adjust the default Ping interval below.).

We recommend applying the following logic:

  • Ensure SpecificationTimeout => PingIntervalSeconds * 2
  • Ensure PingIntervalSeconds + 10 seconds < SpecificationTimeout

For example:

  1. SpecificationTimeout = 30s; PingIntervalSeconds = 15s (default values)

    This falls within the requirements as:

    • 30 seconds is equal to 15 * 2 (PingIntervalSeconds value)
    • 15 + 10 seconds is less than 30 seconds
  2. SpecificationTimeout = 10s; PingIntervalSeconds = 5s

    This does not meet the requirements as:

    • 10 seconds is equal to 5 * 2, but
    • 5 + 10 seconds is greater than 10 seconds (SpecificationTimeout value)

Web.config file
<add key="SpecificationTimeout" value="00:00:30"/>

Setting the Ping Interval

This setting adjusts the time (In seconds) between each ping which notifies DriveWorks Live that the user still has the Specification open.

The Ping script should only be turned off when Timeout is required after a period of inactivity.

The Ping Interval setting is applied in the main.js file for the installed theme.

See How To: Customize the DriveWorks Live Web Theme (Advanced Customization section) for information on where this file is located, and where it should be copied to be modified.

Make a back up of this file before editing any setting.

  • To adjust the default Ping interval:

    Change the default 15 value to the required time (in seconds), and save the main.js file.

    Network Faults

    The ping interval will ensure inactive specifications are closed, however when a response is not received (from a network related fault for example) another ping is sent after 5 seconds.

    We recommend building in a buffer of 10 seconds, for the this 5 second ping to trigger and receive a response, into the Specification Timeout setting.

  • To disable ping altogether:

    Change the default 15 value to 0 (zero), and save the main.js file.

main.js file
// Note: To stop the ping script from keeping the session alive set this to 0 
DriveWorks.RegisterSetting('PingIntervalSeconds', 15);

Adjusting the Update Interval

User Form controls that require keyboard input can have the time to send the input to the server adjusted.

Form controls that require keyboard input are:

  • Text Box
  • Numeric Text Box
  • Measurement Text Box

The Update Interval setting is applied in the main.js file for the installed theme.

See How To: Customize the DriveWorks Live Web Theme (Advanced Customization section) for information on where this file is located, and where it should be copied to be modified.
Make a back up of this file before editing any setting.

Text Box

main.js file
DriveWorks.RegisterSetting('TBUpdateIntervalSeconds', 0.8);
// Time between text box updates (in seconds)
// Note: Set this to 0 if the text box is not to be updated periodically
// and only when you have left the text box
        

Numeric Text Box

main.js file
DriveWorks.RegisterSetting('NTBUpdateIntervalSeconds', 0);
// Time between numeric text box updates (in seconds)
// Note: Set this to 0 if the numeric text box is not to be updated periodically
// and only when you have left the text box
        

Measurement Text Box

main.js file
DriveWorks.RegisterSetting('MTBUpdateIntervalSeconds', 0);
// Time between measurement text box updates (in seconds)
// Note: Set this to 0 if the measurement text box is not to be updated periodically
// and only when you have left the text box
        


Knowledge Base Article Ref:KB12121020