Previous Topic

Book Contents

Book Index

Next Topic

WatchDog

Current version of Valuemation differentiates WatchDog functions on the web client and on the rich client. While WatchDog on web can monitor other nodes and start the engine on any node defined in the configuration, WatchDog on the rich client is supposed to be used by Process Engineer in the development/test phase, but it should not be used in the productive environment.

WatchDog on the Web client

WatchDog takes care of starting the engines with the parameter startOnLoad. To start the process engine together with the web client, uncomment the parameter load-on-startup of cxf servlet in web.xml. WatchDog will then be created during the web client startup.

WatchDog parameters are specified in cxf-servlet.xml.

Note: WatchDog should run ONLY on a node specified in Process engine configuration file.

If there is a web client dedicated to end users, not listed in the configuration, WatchDog should be switched OFF there. To do it set theWatchDog.stepInMillis = -1 in cxf-servlet.xml

WatchDog running on a node which is NOT listed in the process engine configuration file is not being informed about user actions requesting to STOP the engine in the process engine console. It would try to start the engine immediately after recognizing that the engine is no longer running, breaking thus the users request to STOP the engine.

cxf-servlet.xml: theWatchDog

Help Image
cxf-servlet.xml defines the WatchDog. Use stepInMillis = -1 of theWatchDog, to switch OFF functionality of the WatchDog.

userName and cryptedPassword

WatchDog needs a valid user account to run. Credentials are specified by parameters userName and cryptedPassword.

Help Image
WatchDog records its login in AMT_SESSION. It is displayed in the catalog Sessions of Process Engine.

User PEWATCHDOG has a role -Bpm.Engine.WatchDog which has a minimal permission All | Default | No Read/No Execute.

stepsInMillis

Parameter stepsInMillis specifies the interval between checks whether the engines are still running. Recommended value is > 180000 ms (3 minutes).

  • stepInMillis = 0 - WatchDog ONLY starts engines on load but it does not periodically check whether the engines are still running.
  • stepInMillis > 0 - WatchDog starts BOTH engines on load AND it periodically checks whether the engines are still running.
  • stepInMillis = -1 - WatchDog starts NO engines on load and it does NOT periodically check whether the engines are still running.

delayStartInMillis

Parameter delayStartInMillis specifies a delay in which WatchDog performs the first check and thus starts the engines according to the configuration. Delay allows other nodes in cluster to start and thus to start engines on preferred nodes. Recommended value is > 30000 ms (30 sec).

logSteps

When parameter logSteps = true, detailed information about performed steps are written into stdout. Example:


05/25 09:45:39.779 | FINEST | WatchDog | doStep()
05/25 09:45:40.952 | FINEST | WatchDog | WatchDog | start(PROCESSINTERPRETER) at 8080 returned STARTED
05/25 09:45:41.118 | FINEST | WatchDog | WatchDog | start(TASKEXECUTOR01) at 8080 returned STARTED
05/25 09:49:41.136 | FINEST | WatchDog | doStep()
05/25 09:53:41.211 | FINEST | WatchDog | doStep()

timeoutToMailProblemAgainInMinutes

Parameter timeoutToMailProblemAgainInMinutes specifies an interval after which WatchDog can send a notification email about problem, having the same subject. Recommended value is 30 min.

Help Image
Example on email reporting a problem to connect to node named "8080" experienced by WatchDog running on a computer with name "SKM".

Controllers

A list of controllers specifies implementing endpoints available on a node. By default each node provides endpoints theProcessInterpreterEndpoint, taskExecutorEndpointA, taskExecutorEndpointB, which allow to start the Process Interpreter and 2 Task Executors on a node at a time.

WatchDog is created after all controllers are created. When a server is being shut down, WatchDog stops all controllers at first and then stops itself.

Next chapter describes how to add a new endpoint for Task Executor. When a new endpoint and corresponding controller are defined, the new controller should be listed in the list of controllers to be managed by the WatchDog.

cxf-servlet.xml: taskExecutorControllerC

To enable to run additional Task Executors on a node, a new endpoint with the corresponding controller have to be defined in cxf-servlet.xml.
Copy and paste the controller and endpoint taskExecutorEndpointB and rename all occurrences of '*B' to '*C'.
Add a new taskExecutorControllerC controller to the list of controllers.

Help Image
taskExecutorEndpointB

WatchDog on rich client

WatchDog on rich client periodically checks whether the process engine is still running after it was started. In a contrary to the web client, it does not start engine(s). Engines are started by the rich client, provided the corresponding java system properties ProcessInterpreter.*, TaskExecutor.* are defined. See example below.

The following Java system properties are used to configure the WatchDog:

  • PEWatchDog.stepInMillis defines the interval, in which the Watch Dog should check the status of engine(s).
    When value is:
    • 0, negative value, or invalid value (not an integer) - WatchDog function is switched off
    • not specified - default value 60000 ms (i.e. 1 minute) is used.
  • PEWatchDog.logSteps defines whether WatchDog logs its activity into standard output.

07/26 10:25:22.261 FINEST: main | PE-WatchDog is created
07/26 10:25:22.261 FINEST: main | PEWatchDog.stepInMillis=5000
07/26 10:25:24.523 FINEST: main | ProcessInterpreterController (PROCESSI...) is created
07/26 10:25:24.618 FINEST: main | ProcessInterpreterController has to be started ...
07/26 10:25:24.634 FINEST: main | TaskExecutorController (TASKEXECUTOR01) is created
07/26 10:25:24.727 FINEST: main | TaskExecutorController has to be started by start()
...
07/26 10:25:53.903 FINEST: PI-Worker | duration=18 count=1 avg=18 max=18
07/26 10:25:56.415 FINEST: TE-Worker | duration=7 count=1 avg=7 max=7
07/26 10:25:57.305 FINEST: PE-WatchDog | Check of ProcessInterpreterController
07/26 10:25:57.305 FINEST: PE-WatchDog | Check of TaskExecutorController
07/26 10:25:58.881 FINEST: PI-Worker | duration=10 count=2 avg=14 max=18
07/26 10:26:01.425 FINEST: TE-Worker | duration=6 count=2 avg=6 max=7
07/26 10:26:02.315 FINEST: PE-WatchDog | Check of ProcessInterpreterController
07/26 10:26:02.315 FINEST: PE-WatchDog | Check of TaskExecutorController
07/26 10:26:03.891 FINEST: PI-Worker | duration=11 count=3 avg=13 max=18
07/26 10:26:06.434 FINEST: TE-Worker | duration=5 count=3 avg=6 max=7

Example: modify set_env.bat and admin.bat to define java system properties below.

-DPEWatchDog.stepInMillis=15000
-DPEWatchDog.logSteps=true

-DProcessInterpreter.enabled=true
-DProcessInterpreter.userName=PROCESSINTERPRETER
-DProcessInterpreter.cryptedPassword=9A1E8801BD3B8B1AFF764F3709D0DF19
-DProcessInterpreter.stepInMillis=5000
-DProcessInterpreter.startOnLoad=false

-DTaskExecutor.enabled=true
-DTaskExecutor.userName=TASKEXECUTOR01
-DTaskExecutor.cryptedPassword=9A1E8801BD3B8B1AFF764F3709D0DF19
-DTaskExecutor.stepInMillis=5000
-DTaskExecutor.startOnLoad=false

See Also

Process Engine Settings

How to start Process Engine on the Rich client

How to set-up and start Process Engine on Tomcat

How to Upgrade Existing Installation of Web-App with Process Engine

Process Engine Configuration File

Process Engine Console

Closing session in the catalog Sessions of Process Engine

Test

Example

Parameters for Process Engine Caching

Multilingual Support

Process Engine and Security Certificates