4.3.7. Timers
| 4.3. Services |

### 4.3.7. Timers

To handle activities deadlines, a timer service is required that can schedule timers to be executed in the future. Timers must have the ability to contain some contextual information and reference the program logic that needs to be executed when the timer expires.

This service, as well as any other asynchrous service in Orchestra is based on the Process Virtual Machine Job executor framework. Job executor framework is responsible for handling jobs. A job could be a timer scheduling or an asynchronous message for instance. When a job is created and stored in the database, the job executor starts a new transaction, fetch the job from the database and perform the instructions contained in the message.

The timer service is used for the BPEL statements "wait" and "onAlarm".

The Database implementation uses the Job Executor module of the Process Virtual Machine for the management of the timers. Its definition in the environment is the following : <timer-session />

For the Job Executor, the administrator can set the number of thread that will manage the jobs. This information is also defined in the environment file with the following line :

    <job-executor threads='1' auto-start='false' />

The default number of thread for the job executoris 1. It is advised to leave this value to avoid concurrency problems.

4.3.6. Querier |  | 4.3.8. Finished instance handler (FIH)