8.4 Configuring the Workflow Engine and Cluster Settings

This section provides instructions on configuring the Workflow Engine and on 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 new values. The engines check for changes to these settings at the same rate as specified by the pending process interval.

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

8.4.1 Configuring the Workflow Engine

To configure the Workflow Engine settings:

  1. Select the Provisioning tab.

  2. Select Engine and Cluster Settings from the left navigation menu.

    The user interface displays the Workflow Configuration Settings page. To configure the engine, you need to make some changes in the Workflow Engine box.

  3. To change an engine setting, click the target field for the setting and type the new value. The engine settings are described below:

    Engine Setting

    Description

    Email Notification (per workflow engine)

    Enables or disables e-mail 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 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 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.

    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 prestarted threads in the pool when it is created. The default is 5.

    Thread Keep Alive Time (second)

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

    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.

    A good value for this setting should be less than product of the Process Cache Initial Capacity and the Process Cache Load Factor. This gives the cache a chance to remove older inactive processes from the cache before having to increase its capacity.

    Take the following example:

    Process Cache Initial Capacity = 700;

    Process Cache Load Factor =.75;

    Process Cache Maximum Capacity = 500;

    Number of processes in cache = 500;

    In this case, the number of processes in the cache that will trigger the cache to grow its capacity and perform a rehash would be 525, because the Initial capacity multiplied by the load factor is equal to 525.In this example, when there are 500 processes in the cache, the cache is approaching the point where it must increase its size and perform a rehash, which is at 525 processes. When another process is added to the cache, the engine attempts to remove the least recently used inactive process instead of letting the cache get closer to 525 processes.

    The default is 500.

    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.

8.4.2 Configuring the Workflow Cluster

To configure the Workflow Cluster settings:

  1. Select the Provisioning tab.

  2. Select Engine and Cluster Settings from the left navigation menu.

    The user interface displays the Workflow Configuration Settings page. To configure cluster settings, you need to make some changes in the Workflow Cluster box.

  3. To change a cluster setting, click the target field for the setting and type the new value. The cluster settings are described below:

    Cluster Setting

    Description

    Heartbeat Interval (second, minimum 60)

    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 User Application 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. The workflow engine therefore 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 (minimum 2)

    Specifies the factor that is multiplied with the hearbeat 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.