Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
workflow:quartz [2020/03/04 09:16]
admin
workflow:quartz [2020/06/15 10:24] (current)
cduncan
Line 1: Line 1:
 ~~NOTRANS~~ ~~NOTRANS~~
  
-~~Title: Quartz Scheduler ​integration~~+~~Title: Quartz Scheduler ​Integration~~
 Version: 1.0 / 2020-03-04 Version: 1.0 / 2020-03-04
  
 ====== Introduction ====== ====== Introduction ======
  
-This document describes the integration of Quartz Job Scheduler with VisionX workflow module. Basically explains how a workflow can be started by Quartz Job Scheduler.+This document describes the integration of Quartz Job Scheduler with VisionX workflow module. Basically, it  ​explains how a workflow can be started by Quartz Job Scheduler.
  
 ====== Requirements ====== ====== Requirements ======
  
-We need following ​libraries and tools:+We need following tools and libraries:
  
   * Eclipse IDE (EE variant)   * Eclipse IDE (EE variant)
Line 24: Line 24:
 ====== Example ====== ====== Example ======
  
-First, create a new Dynamic Web Project ​in Eclipse IDE. After that, add all Quartz libraries from the **quartz_install/​lib** folder to your web library folder **WebContent/​WEB-INF/​lib**. ​Also add Javax transaction API, Java Mail API, JDBC drivers, wfengineserver.jar,​ jvx.jar and appsclient.jar to your web library folder.+First, create a new dynamic web project ​in Eclipse IDE. After that, add all Quartz libraries from the **quartz_install/​lib** folder to your web library folder **WebContent/​WEB-INF/​lib**. ​You will also need to add Javax transaction API, Java Mail API, JDBC drivers, wfengineserver.jar,​ jvx.jar and appsclient.jar to your web library folder.
  
 After your dependencies are configured, create a new Java package in the src folder of the project. Set **com.sibvisions.quartz** as name. Create a new Java class in this package. The name of the class should be **WorkflowJob**. After your dependencies are configured, create a new Java package in the src folder of the project. Set **com.sibvisions.quartz** as name. Create a new Java class in this package. The name of the class should be **WorkflowJob**.
Line 62: Line 62:
 ====== Configuration ====== ====== Configuration ======
  
-===== Job configuration ​=====+===== Job Configuration ​=====
  
-Now it's time to configure the Quartz ​Job. To do this, create the folder //classes// in **WebContent/​WEB-INF** if missing. In **WebContent/​WEB-INF/​classes** create //​quartz.properties//​ file with following content:+Now it's time to configure the Quartz ​job. To do this, create the folder //classes// in **WebContent/​WEB-INF** if missing. In **WebContent/​WEB-INF/​classes** create //​quartz.properties//​ file with following content:
  
 <​code>​ <​code>​
Line 110: Line 110:
 </​job-scheduling-data>​ </​job-scheduling-data>​
 </​code>​ </​code>​
-As you can see, we pass two parameters (//​mailTo//,​ //​workflowId//​) to the Job class. Quartz will use configured trigger and starts our job every 10 seconds.+As you can see, we pass two parameters (//​mailTo//,​ //​workflowId//​) to the job class. Quartz will use configured trigger and starts our job every ten seconds.
  
-Now, the Job configuration is done and Quartz ​would start our Job. The last step is datasource configuration for your workflow engine.+Now, the job configuration is doneand Quartz ​will start our job. The last step is datasource configuration for your workflow engine.
  
-===== Datasource ​configuration ​=====+===== Datasource ​Configuration ​=====
  
 The datasource is needed to run a workflow. It will be configured via //​config.xml//​. To get everything in place, create the folder structure: The datasource is needed to run a workflow. It will be configured via //​config.xml//​. To get everything in place, create the folder structure:
Line 125: Line 125:
               |- QuartzIntegration ​             ​               |- QuartzIntegration ​             ​
 </​code>​ </​code>​
-This is a standard [[:​jvx:​common:​setup:​zones|JVx application structure]]. ​Very important ​is that the folder //​QuartzIntegration//​ existsbecause this is the application nameused in our //​WorkflowJob//​ class:+This is a standard [[:​jvx:​common:​setup:​zones|JVx application structure]]. ​It is very important ​that the folder //​QuartzIntegration//​ exists because this is the application name used in our //​WorkflowJob//​ class:
  
 <code java> <code java>
Line 168: Line 168:
 ===== Logging ===== ===== Logging =====
  
-If you want to see some details about Job execution, you should configure logging. Simply create a file with the name **log4j.xml** in the //src// folder of your Eclipse project. Put following content into it:+If you want to see some details about job execution, you should configure logging. Simply create a file with the name **log4j.xml** in the //src// folder of your Eclipse project. Put following content into it:
  
 <code xml> <code xml>
Line 199: Line 199:
 ====== Testing ====== ====== Testing ======
  
-You have two options to test the Quartz ​Job. First, use Eclipse ​and Export ​the project as **war** file. This file can be deployed manually to any Java application server.+You have two options to test the Quartz ​job. First, use Eclipse ​to export ​the project as **war** file. This file can be deployed manually to any Java application server.
  
-The second option is that you run an embedded ​Application ​server directly in Eclipse. To do this, configure an application server and add your project to this server. This makes it possible to Debug your code and test if everything works as expected.+The second option is to run an embedded ​application ​server directly in Eclipse. To do this, configure an application server and add your project to this server. This makes it possible to debug your code and test if everything works as expected.
  
  
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information