You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Introduction

The Case Engine Scheduler Component is introduced to be able to schedule without having a dependency on the runtime. It supports all scheduling options that the case engine needs. The  Case Engine Scheduler is implemented using Quartz Enterprise Job Scheduler.


Table of Contents

Installation

Steps:

  1. Add case-engine-scheduler-quartz to the list of spring active profiles in the bootstrap.properties. The case-engine profile should also be enabled. More information on how to configure the application using Spring Profiles can be found here: External application configuration with Spring Profiles.
  2. Add the application-case-engine-scheduler-quartz.properties file in the configuration location. This properties file is added in the 
    spring.config.additional-location
    when using the installer. Otherwise, please create this according to the documentation below.
  3. 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-case-engine-scheduler-quartz
  4. Define quartz database connection in the application-externaldatasources.properties file.


Steps 3 and 4 are applicable only if a job store database connection is chosen instead of in memory job store.


Configuration

Every Quartz configuration property has to be specified in application-case-engine-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 (default)

Info

This is the default configuration for java environments.
For more details about in memory job store configuration please visit Config RAM Job Store.

By default memory mode is enabled 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 application-case-engine-scheduler-quartz.properties.

application-scheduler-quartz.properties
spring.quartz.job-store-type=memory


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:

Generate the Quartz Database

Generate the Quartz database with respect to the database used (either Oracle or MSSQL).

In the Blueriq release zip there is a case-engine-scheduler-quartz folder that contains SQL scripts. Use the favorite database viewer to run those scripts against the database server.

  1. Connect to the database server with the favorite viewer.
  2. Create a new database dedicated to quartz - pick a meaningful name for this, e.g. 'CaseEngineQuartzScheduler'.
  3. Depending on the database viewer used, one must make sure that the new database created is selected and set by default in the editor.
  4. Import the mssql.sql (for MSSQL) or oracle.sql (for Oracle server) and run it in the editor. If the run was successful new tables should be present under the newly created database.

JDBC Connection

To enable the JDBC Connection the externaldatasources profile must enabled and the following properties have to be used:

application-scheduler-quartz.properties
spring.quartz.job-store-type=jdbc
spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_
application-externaldatasources.properties - mssql
blueriq.datasource.case-engine-scheduler-quartz.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
blueriq.dataSource.case-engine-scheduler-quartz.url=jdbc:sqlserver://<server_url>:<port>;databaseName=<database_name>;instance=<instance_name>
blueriq.datasource.case-engine-scheduler-quartz.username=<user>
blueriq.datasource.case-engine-scheduler-quartz.password=<password>
application-externaldatasources.properties - oracle
blueriq.datasource.case-engine-scheduler-quartz.driverClassName=oracle.jdbc.driver.OracleDriver
blueriq.dataSource.case-engine-scheduler-quartz.url=jdbc:oracle:thin:@<server_url>:<port>:xe
blueriq.datasource.case-engine-scheduler-quartz.username=<user>
blueriq.datasource.case-engine-scheduler-quartz.password=<password>


If necessary, create a new datasource. See Configuring JDBC database drivers for information on how to do this.

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.


When changing the org.quartz.jobStore.tablePrefix, please change the create scripts accordingly.


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:

 

application-scheduler-quartz.properties
spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT
spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_

 

application-jndidatasources.properties - jndi
// JBoss Example provided that the jndi name is set to java:jboss/jdbc/quartzdb
blueriq.datasource.case-engine-scheduler-quartz.jndiName=java:jboss/jdbc/quartzdb

// Tomcat Example provided that the jndi name is set to jdbc/quartzdb
blueriq.datasource.case-engine-scheduler-quartz.jndiName=java:/comp/env/jdbc/quartzdb

 JobStoreCMT relies upon transactions being managed by the application which is using Quartz. 

 

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.

Each DCM project gets it's own trigger. It is recommended to have a thread per DCM project. For example if you have 3 DCM projects you should set the threadCount to 3. Please check that the threadCount does not exceed the number of available database connections (or connections in the database connection pool). 

Thread Pool properties are the following:


application-scheduler-quartz.properties
spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
spring.quartz.properties.org.quartz.threadPool.threadCount=2

For more information and properties related to Quartz ThreadPool, please visit ThreadPool Configuration


Setup Quartz

Various spring configurations

Using spring cloud config

Configure the runtime in cloud. For more details about how to do this visit The runtime in the cloud.

Actions

  1. Place your scheduler properties in application-case-engine-scheduler-quartz.properties (Check here for example) in the searchLocations you specified for spring cloud.
  2. Place application-externaldatasources.properties or application-jndidasarouces.properties files in the searchLocations you specified for spring cloud.

Using spring config additional location

Configure a spring.config.additional-location for your application. For more details about how to do this visit Installing Runtime.

  1. In spring.config.additional-location folder place the application-case-engine-scheduler-quartz.properties (Check here for example) file.
  2. In spring.config.additional-location folder place the application-externaldatasources.properties or application-jndidasarouces.properties files

Troubleshooting


For more information on quartz configurations, please visit: Quartz-Scheduler.org.

  • No labels