Shutdown Process

When a shutdown of the server is initiated, the following happens:

Workflow Thread

After each activity, a check is done for any shutdown signals.

Any running workflows are stopped.

Processes are queued up (and restarted when the application comes up).

Note: Workflows queued up are taken up by any other server in the cluster. Such servers only take up queued processes when a workflow completes. If no workflows are running in cluster, queued workflows are also not picked up.

Some of the workflow activities process a large amount of data. Such activities will also obey the shut down command. This is possible as such activities do not process all the data in sequence. Instead, record list is divided into smaller batches and submitted for processing in parallel. As soon all batches are submitted, the activity is able to obey the shut down command. The "batches" themselves are submitted for asynchronous processing and remain in queues.

For example, when the ImportCatalog activity runs, import of all the records may take a long time but submission of "batches" of records does not take time. As soon as all records are submitted, a shutdown is possible even if the submitted batches are not yet processed.

JMS Listeners

Various JMS listeners are used to perform long running tasks in parallel and interface with other applications. When a shutdown request is issued, any listener currently not processing a task will be stopped immediately. If a listener is processing a message, it will be stopped after message processing is completed.