How to increase the session and engine timeout in Bonita Version 7

marielle.spiteri
Blog Categories: 

Component: Bonita Tomcat | Version: 7.+

Question
How to increase the session and engine timeout in Bonita V7 Tomcat

Answer

Two type of session are involved when using Bonita BPM Portal:

1 - The HTTP session
2 - The Bonita BPM Engine session

Warning: The session timeout values for these two sections should be set to the same value (https://documentation.bonitasoft.com/bonita/7.8/user-authentication-over...). 2 different values would lead to unexpected behavior...

Resolution

1. Updating the HTTP Session in Bonita BPM Tomcat Bundle

a. The HTTP tomcat session timeout can be updated in the following file:

BonitaBPM version lower than 7.4.x: <TOMCAT_HOME>/conf/web.xml
BonitaBPM version 7.4.x or higher: <TOMCAT_HOME>/server/conf/web.xml

b. Find the following line and update the value:

<!-- You can set the default session timeout (in minutes) for all newly -->
<session-timeout>60</session-timeout>

2. Updating the Bonita BPM Engine Session in Bonita BPM Tomcat Bundle

This session is created by Bonita BPM Engine on the Bonita BPM Portal request, when the user submits a login page.

Session expiration:
If the Engine session has expired and the user tries to reach one of the Bonita BPM Portal pages, an exception will be raised. Bonita BPM Portal will catch this exception, invalidate the HTTP session and redirect the user to the login page. The Bonita BPM Engine default session duration is one hour (default value defined in SessionServiceImpl).

You can configure a different session duration by editing the bonita.tenant.session.duration property in the file bonita-tenant-community-custom.properties. Specify the duration in milliseconds:

For BonitaBPM version lower than 7.3.x

a. Update bonita.tenant.session.duration:

  • Before the platform is created, edit the file and uncomment the property bonita.tenant.session.duration: <BONITA_HOME>/engine-server/conf/tenants/template/bonita-tenant-community-custom.properties

  • For an already existing tenant, edit the file: <BONITA_HOME>/engine-server/conf/tenants/TENANT_ID/bonita-tenant-community-custom.properties

b. Find the following lines and uncomment the bonita.tenant.session.duration property and set the value at your convenience (3600000 --1 hour-- is the default value)
## Session service
## Session duration in ms
bonita.tenant.session.duration=3600000

For BonitaBPM version 7.3.x

a. Stop Tomcat server with the command:

Windows:<TOMCAT_HOME>\bonita-stop.bat
Linux:<TOMCAT_HOME>/bonita-stop.sh

b. Run the setup tool to retrieve the latest configuration: Run setup.[sh|bat] pull

c. Edit the files:

  • Before the platform is created: <TOMCAT_HOME>/setup/platform_conf/initial/tenant_template_engine/bonita-tenant-community-custom.properties
  • For an already existing tenant: <TOMCAT_HOME>/setup/platform_conf/current/tenants/<TENANT_ID>/tenant_engine/bonita-tenant-community-custom.properties

d. Uncomment the bonita.tenant.session.duration property and set the value at your convenience (3600000 --1 hour-- is the default value)

## Session service
## Session duration in ms
bonita.tenant.session.duration=3600000

e. Run the setup tool to push the updated configuration: Run setup.[sh|bat] push

f. Restart the Tomcat server with command:

Windows: <TOMCAT_HOME>\bonita-start.bat
Linux: <TOMCAT_HOME>/bonita-start.sh

For BonitaBPM version 7.4.x and higher

a. Stop Tomcat server with the command:

Windows: <TOMCAT_HOME>\stop-bonita.bat
Linux: <TOMCAT_HOME>/stop-bonita.sh

b. Run the setup tool to retrieve the latest configuration: Run setup.[sh|bat] pull

c. Edit the files:

  • Before the platform is created: <TOMCAT_HOME>/setup/platform_conf/initial/tenant_template_engine/bonita-tenant-community-custom.properties
  • For an already existing tenant: <TOMCAT_HOME>/setup/platform_conf/current/tenants/<TENANT_ID>/tenant_engine/bonita-tenant-community-custom.properties

d. Uncomment the bonita.tenant.session.duration property and set the value at your convenience (3600000 --1 hour-- is the default value)

## Session service
## Session duration in ms
bonita.tenant.session.duration=3600000

e. Run the setup tool to push the updated configuration: Run setup.[sh|bat] push

f. Start the Tomcat server with command:

Windows: <TOMCAT_HOME>\start-bonita.bat
Linux: <TOMCAT_HOME>/start-bonita.sh

Comments

Submitted by jmiralles_1385549 on Tue, 12/03/2019 - 08:21

Please, include this post in the Official Documentation of Bonita.
And, if it's possible, adapt it to Wildfly Bundle.

Notifications