20.7 Configuring Workflow Engines and Cluster Settings

The Workflow Engine and Cluster Settings page helps in configuring the Workflow Engine and configuring cluster settings. These settings apply to all engines in the cluster. When any of these settings are changed, other engines in the cluster will detect these changes in the database and use the latest values. The engines check for changes to these settings at the same rate as specified by the Pending Process Interval. For more information about configuring workflow engines settings, see Configure the Workflow Engine Settings.

When the workflow engine starts up it checks to see if its engine ID is already in use by another node in the cluster. When this is the case, the workflow engine checks the cluster database to see if the status of the engine is SHUTDOWN or TIMEDOUT. If it is, the workflow engine starts. If the status is STARTING or RUNNING, the workflow engine logs a warning, then waits for a heartbeat timeout to occur. If the heartbeat timeout occurs, that means that the other workflow engine with the same ID was not shut down properly, so it's safe to start. If the heartbeat timer is updated, that means another workflow engine with the same ID is running in the cluster, so the workflow engine cannot start. You can specify the heartbeat timeout (the maximum elapsed time between heartbeats before a workflow engine is considered timed out) by setting Heartbeat Interval and Heartbeat Factor. For more information about configuring the cluster settings, see Configure Workflow Cluster Settings.

The process cache settings and heartbeat settings require a server restart to take effect.

20.7.1 Configure the Workflow Engine Settings

Following are the engine settings that you might require to configure for your workflow engine settings:

Engine Setting


Enable Email Notification

Enables or disables email notifications for the entire workflow engine. Defaults to enabled.

Web Service Activity Timeout (minute)

Specifies the default Web Service activity timeout in minutes. The default is 50 minutes.

User Activity Timeout (hour, 0 for no timeout)

Specifies the default user activity timeout. The default is 0 days, which indicates no timeout.

Completed Process Timeout (day)

Specifies the number of days that a completed process state is kept in the workflow database system. The default is 120 days.

Completed Process Cleanup Interval (hour)

Specifies how often the engine checks for and removes completed processes that have been in the workflow database system for longer than the completed process timeout. The default is 12 hours.

Pending Process Interval (second)

User activities that are executed on an engine which the process is not bound to are put into a pending state. This interval specifies how often to check for pending activities in order to continue their execution. The default is 30 seconds.

Retry Queue Interval (minute)

Activities that fail because of suspected database connectivity issues are put on a retry queue. This interval specifies how often the engine attempts to retry these activities. The default is 15 minutes.

Thread Keep Alive Time (second)

If the pool is larger than the minimum size, excess threads that have been idle for more than the keep-alive time will be destroyed. The default is 5 minutes.

Maximum Engine Shutdown Timeout (minute)

The engine attempts to shutdown gracefully. When shutting down it stops queuing new activities for execution and attempts to complete any activities already queued. This timeout specifies the maximum time that the engine waits for all queued activities and threads executing activities to complete. If this time is exceeded, the engine halts processing of queued activities and attempts to stop all threads executing activities. The default is 1 minute.

Maximum Thread Pool Size

The maximum number of threads that the engine uses to execute activities. The default is 20.

Minimum Thread Pool Size

The minimum number of threads that the engine uses to execute activities. When a thread is requested and fewer than the minimum are in the pool, a new thread will be created even if there are idle threads in the pool. The default is 10.

Initial Thread Pool Size

Number of pre-started threads in the pool when it is created. The default is 5.

Process Cache Load Factor

The load factor specifies how full the cache is allowed to get before increasing its capacity. If the number of entries in the cache exceeds the product of the load factor multiplied by the current capacity, then the capacity is increased. The default is 0.75.

Process Cache Initial Capacity

The process cache is backed by a hash map. The capacity is the number of buckets in the hash map. The initial capacity is the number of buckets at the time the cache is created. The default is 700.

Process Cache Maximum Capacity

Before adding a process to the cache, if the number of processes in the cache equals or exceeds the Process Cache Maximum Capacity, the cache attempts to remove the oldest inactive process from the cache. The maximum capacity is a soft limit, so the number of processes in the cache might exceed the Process Cache Maximum Capacity if there are no inactive processes (only active processes) in the cache.

The default is 500.

20.7.2 Configure Workflow Cluster Settings

Following are the settings that you might require to configure for your workflow cluster settings:

Cluster Setting


Heartbeat Interval

Specifies the interval at which the workflow engine’s heartbeat is updated.

When the workflow engine starts up, it detects if its engine ID is already being used by another node in the cluster and refuses to start if the ID is in use. The identity applications database maintains a list of engine IDs and engine states. If an engine crashes and is restarted, its last state in the database indicates that it is still running. Therefore, the workflow engine uses a heartbeat timer, which writes heartbeats at the specified interval, to determine if an engine with its ID is still running in the cluster. If it’s already running, it refuses to start.

The minimum value for the heartbeat interval is 60 seconds.

Heartbeat Factor

Specifies the factor that is multiplied with the heartbeat interval to arrive at the heartbeat timeout.

The timeout is the maximum elapsed time permitted between heartbeats before an engine will be considered timed out.

The minimum value for the heartbeat factor is 2.