Previous Topic

Book Contents

Book Index

Next Topic

Test

Test verifies that:

  • WatchDog
    • can start process engine according to configuration
    • can start process engine on one running node out of 2 specified in the configuration
    • can recover from failure of one node by using the other node
    • uses the first allowed node to start the engine
    • sends a notification e-mail about a problem
  • Process Engine Console can be used to stop and to start the engine manually.

Environment:

2 nodes (tomcats) with installed Valuemation and using the same configuration are used in the test. Process engine is composed out of PROCESSINTERPRETER, TASKEXECUTOR01, TASKEXECUTOR02 engines. Tomcats are killed and started manually to simulate HW failure. The following process engine configuration is used:

 

Node 8080

Node 8081

PROCESSINTERPRETER

1st node

2nd node

TASKEXECUTOR01

2nd node

1st node

TASKEXECUTOR02

1st node

not allowed

PROCESSINTERPRETER can run on both nodes, node 8080 is the main node to be used. TASKEXECUTOR01 can run on both nodes, node 8081 is the main node to be used. TASKEXECUTOR02 can run only on node 8080.

Setup

Install Valuemation on 2 tomcats

Install Valuemation on 2 tomcats. Let us refer to them as "8080" and "8081".
Both installations should use the same database.
Verify that it is possible to login to GUI on both installations.
Verify that WatchDog is not started by checking

  • stdout: there should not be messages:

    05/27 22:07:26.090 | INFO | Thread-2 | WatchDog | (PEWATCHDOG) created
    05/27 22:07:26.151 | INFO | Thread-2 | WatchDog | Process Engine Configuration to be used:
    {
    "nodes": [
    ...
    05/27 22:07:26.594 | INFO | Thread-2 | WatchDog | WatchDog will start in 30000 ms. ...

  • catalog Sessions of Process Engine: there should not be a session created for user PEWATCHDOG after web-app starts

Help Image

Session for user PEWATCHDOG indicates a running WatchDog. On default installation WatchDog should not be started until user opens the Process Engine info object.

Activate user TASKEXECUTOR02

Activate user TASKEXECUTOR02 in the User Manager (rich client).

Setup Mail

Setup Valuemation to send e-mails in the Global Settings.

E.g. for SMTP define IP address and port of the SMTP server.

Define process configuration file

Create a file, e.g. C:/configs/ProcessEngineConfiguration.json, from the text below.

Fix nodes "url" and "mailProblemTo" according to your situation.

Define to use the same configuration on both tomcats either by

  • adding a row to vmconfig.properties:
    processEngineConfigurationLocation="c:/configs/ProcessEngineConfiguration.json", or
  • java system property -DprocessEngineConfigurationLocation="c:/configs/ProcessEngineConfiguration.json"

Note that sessionTimeoutInMinutes is set 10 min below.

{
  "nodes": [
    {
      "name": "8080",
      "url": "http://localhost:8080/vm/services/",
      "processInterpreterEndpoint": {
        "relativeEndpointAddress": "ProcessInterpreterControllerPort"
      },
      "taskExecutorEnpoints": [
        {
          "name": "A", "relativeEndpointAddress": "TaskExecutorControllerPort/A"
        },
        {
          "name": "B", "relativeEndpointAddress": "TaskExecutorControllerPort/B"
       }
     ]
     },
     {
      "name": "8081",
      "url": "http://localhost:8081/vm/services/",
      "processInterpreterEndpoint": {
        "relativeEndpointAddress": "ProcessInterpreterControllerPort"
      },
      "taskExecutorEnpoints": [
       {
         "name": "A", "relativeEndpointAddress": "TaskExecutorControllerPort/A"
        },
        {
          "name": "B", "relativeEndpointAddress": "TaskExecutorControllerPort/B"
        }
      ]
    }
  ],
  "processInterpreter": {
    "userName": "PROCESSINTERPRETER",
    "cryptedPassword": "9A1E8801BD3B8B1AFF764F3709D0DF19",
    "startOnLoad": true,
    "sessionTimeoutInMinutes": 10,
    "canRunAt": [
      {
        "nodeName": "8080"
      },
      {
        "nodeName": "8081"
     }

    ]
  },
  "taskExecutors": [
    {
      "userName": "TASKEXECUTOR01",
      "cryptedPassword": "9A1E8801BD3B8B1AFF764F3709D0DF19",
      "startOnLoad": true,
      "sessionTimeoutInMinutes": 10,
      "canRunAt": [
        {
          "nodeName": "8081",
          "endpointName": "A"
        },
        {
          "nodeName": "8080",
          "endpointName": "A"
        }
     ]
    },
    {
      "userName": "TASKEXECUTOR02",
      "cryptedPassword": "9A1E8801BD3B8B1AFF764F3709D0DF19",
      "startOnLoad": true,
      "sessionTimeoutInMinutes": 10,
      "canRunAt": [
        {
          "nodeName": "8080",
          "endpointName": "B"
        }
      ]
    }
  ],
  "mailProblemTo": "<add your.mail@company.de>",
  "mailProblemCc": ""
}

Start node 8081

Start tomcat "8081".

Login to GUI, add the Process Engine info object on GUI using browser e.g. Firefox.

Verify that:

  • node 8080 has red background, indicating a node is NOT responding
  • node 8081 has green background, indicating a node is responding

Help Image

  • PROCESSINTERPRETER is running on 8081
  • TASKEXECUTOR01 is running on 8081
  • TASKEXECUTOR02 indicates that it is not allowed to run on 8081
  • ConnectExceptions are displayed for node 8080

Open catalog Sessions of Process Engine
Find session of TASKEXECUTOR01 and mark its Session ID for a future reference.

Verify that 2 email notifications about problem were received having subjects:

  • SKM: start(PROCESSINTERPRETER) at 8080 FAILED with exception ConnectException
  • SKM: start(TASKEXECUTOR02) at 8080 FAILED with exception ConnectException

Help Image
Notification mail about problem to start PROCESSINTERPRETER at 8080, which is the 1st node to be used

Start node 8080

Start tomcat "8080".
Use different browser e.g. IE (but not Firefox used in the previous step).
Login to GUI, add the Process Engine info object on GUI. Verify that:

  • both nodes have green background

Help Image

  • TASKEXECUTOR02 is running on 8080
  • PROCESSINTERPRETER is running on 8081 and it is failed on 8080;
    it indicates a situation when engine is running on the node which is not the 1st node in allowed nodes
  • TASKEXECUTOR01 is running on 8081

Stop and start PROCESSINTERPRETER

Use the process engine console to

  • Stop PROCESSINTERPRETER
  • Start PROCESSINTERPRETER

Verify that PROCESSINTERPRETER now runs on 8080, which is the 1st allowed node for the engine.

Help Image
Console look after user pressed Stop PROCESSINTERPRETER

Help Image
Console look after user pressed Start PROCESSINTERPRETER

Kill node 8081

Kill the tomcat "8081" java process
Switch to browser displaying GUI provided by tomcat "8080"
Verify that:

  • node 8080 has green background
  • node 8081 has red background
  • PROCESSINTERPRETER is running on 8080
  • TASKEXECUTOR02 is running on 8080

Wait for 11 minutes, refresh the console.
Verify that:

  • TASKEXECUTOR01 is running on 8080

Help Image
Console after timeout allowing TASKEXECUTOR01 to start

Open catalog Sessions of Process Engine

Find session of TASKEXECUTOR01 with Session ID remebered in the step Start node 8081.

Verify that the session is Closed and it contains text like:

Closed due to timeout: session owner node 8081 is not responding and the session was not updated for more than 11 min, which is 1 min after 10 min timeout.

Verify that 1 email notification about problem was received with subject:

SKM: start(TASKEXECUTOR01) at 8081 FAILED with exception ConnectException

Help Image
Notification about problem to start TASKEXECUTOR01 on the 1st allowed node "8081"

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

WatchDog

Closing session in the catalog Sessions of Process Engine

Example

Parameters for Process Engine Caching

Multilingual Support

Process Engine and Security Certificates