Page History
Table of contents
Table of Contents
Description
The Scheduler (Quartz) Component is introduced to be able to facilitate multi-node environments. This is used for evaluating evaluation cases and task in a DCM project (or a project that uses the process engine). Please consider if the advanced scheduler is more suitable for your situation. In the Basic scheduler the evaluation of task is done by a polling mechanism. Every time the interval expires the process engine starts evaluation for a project. As a first step of the evaluation of
More information about the basic scheduler queries are executed to determine if any action regarding cases and their tasks need to be executed. The advanced scheduler is created to only execute when actions on the cases and their tasks need to be executed.
This page described the installation of the Basic Scheduler which is used when running the Blueriq Runtime in a single node environment. When running Blueriq in a cluster, please refer to the Advanced Scheduler documentation.can be found at the Process Engine page.
Requirements
This component is configured to persist data in memory by default for demo purposesand standalone development purpose, but we strongly advice to persist data in a database . See platform support for the supported databases.
Installation
Steps:
- Add scheduler-quartz to the list of spring active profiles in the bootstrap.properties (this profile is active when using the installer). More information on how to configure the application using Spring Profiles can be found here: External application configuration with Spring Profiles.
- Add the application-scheduler-quartz.properties file in the configuration location. This properties file is added in the
when using the installer. Otherwise, please create this according to the documentation below.Include Page _ConfigLocation _ConfigLocation - Run the provided scripts for creating the quartz tables in the database: msssql.sql or oracle.sql. The scripts are located in the release zip in \Runtime\Java\Webapp\DBScripts\blueriq-component-scheduler-quartz
- Define quartz database connection in the application-externaldatasources.properties file.
Info |
---|
Steps 3 and 4 are applicable only if a job store database connection is chosen instead of in memory job store. |
Configuration
Anchor | ||||
---|---|---|---|---|
|
Info |
---|
Every Quartz configuration property has to be specified in application-scheduler-quartz.properties for Runtime. |
In order to tune resources for job execution we provided a few details about the Thread Pool.
Quartz is configured using a set of properties. Quartz uses a job store in order to persist jobs details, triggers and other job related information. We support two types of job stores:
- Memory
- Database
- (default) for demo's and standalone development
- [Editor]Basic Scheduler recommended
Memory (default)
By default memory mode is enabled . The which should not be used unless for demo's and standalone development. For recommended settings please check the database settings. For memory the following setting should appear in the quartz.properties.
Code Block | ||
---|---|---|
| ||
spring.quartz.job-store-type=memory |
Info |
---|
For more details about in memory job store configuration please visit Config RAM Job Store. |
Database
Scripts to create the required database content are provided for the following databases:
- SQL Server
- Oracle
There are two types of connection that are supported:
- JDBC Connection
- JNDI Connection
JDBC Connection
To enable the JDBC Connection the externaldatasources profile must enabled and the following properties have to be used:
Code Block | ||
---|---|---|
| ||
spring.quartz.job-store-type=jdbc spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_ |
Code Block | ||
---|---|---|
| ||
blueriq.datasource.scheduler-quartz.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver blueriq.dataSource.scheduler-quartz.url=jdbc:sqlserver://<server_url>:<port>;databaseName=<database_name>;instance=SQL_EXPRESS blueriq.datasource.scheduler-quartz.username=<user> blueriq.datasource.scheduler-quartz.password=<password> |
Code Block | ||
---|---|---|
| ||
blueriq.datasource.scheduler-quartz.driverClassName=oracle.jdbc.driver.OracleDriver blueriq.dataSource.scheduler-quartz.url=jdbc:oracle:thin:@<server_url>:<port>:xe blueriq.datasource.scheduler-quartz.username=<user> blueriq.datasource.scheduler-quartz.password=<password> |
JobStoreTX allows Quartz managing quartz related transactions.
JDBCJobStore’s “table prefix” property is a string equal to the prefix given to Quartz’s tables that were created in your database. You can have multiple sets of Quartz’s tables within the same database if they use different table prefixes.
Info |
---|
When changing the org.quartz.jobStore.tablePrefix, please change the create scripts accordingly. |
Info |
---|
For more information and properties related to the connection JobStoreTX please visit JDBC-JobStoreTX. |
JNDI Connection
To enable JNDI Connection jndidatasources profile must be activated and the following properties have to be used:
Code Block | ||
---|---|---|
| ||
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT org.quartz.jobStore.tablePrefix=QRTZ_ |
Code Block | ||
---|---|---|
| ||
// JBoss Example provided that the jndi name is set to java:jboss/jdbc/quartzdb blueriq.datasource.scheduler-quartz.jndiName=java:jboss/jdbc/quartzdb // Tomcat Example provided that the jndi name is set to jdbc/quartzdb blueriq.datasource.scheduler-quartz.jndiName=java:/comp/env/jdbc/quartzdb |
JobStoreCMT relies upon transactions being managed by the application which is using Quartz.
Info |
---|
For more information and properties related to the connection JobStoreCMT please visit JDBC-JobStoreCMT. |
Thread Pool
If the Database configuration is chosen we recommend to also add the thread pool with the following default values:
The quartz documentation suggests the following configuration: provided that the database allows X connections, then the threadCount must be set to X - 3.
If a JNDI connection is used, then the connection that is behind the JNDI name defines a max number of connections in the pool - say Y. In this case the thread count must be Y - 3.
Thread Pool properties are the following:
Code Block | ||||
---|---|---|---|---|
| ||||
spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool spring.quartz.properties.org.quartz.threadPool.threadCount=2 |
Info |
---|
For more information and properties related to Quartz ThreadPool, please visit ThreadPool Configuration |
Info |
---|
For more information on quartz configurations, please visit: Quartz-Scheduler.org. |