Timer Control

Unofficial Content

The purpose of the Timer Control is to trigger Timer Events (see Timer Intermediate Event and Timer Start Event in BPD). If we don`t execute it the Timer Events won't be triggered.
The Timer Scheduler is also used for this purpose but it executes once every certain amount of time as explained below.

So in order to reflect the changes made with the Timer Events, the Timer Control must run to check when the timer events must take place. To execute it you must do the following:

  • NET

Execute the file apwftimerscheduler.exe from a command line (Start - Run - cmd), specifing the time (time unit: seconds) between runs, for example:

C:\Models\<KB>\CSharpModel\Web\bin> apwftimerscheduler.exe 60

Or you can execute from the directory (<KB>\CSharpModel\Web\bin) the apwftimercontrol.exe that executes once.

C:\Models\<KB>\CSharpModel\Web\bin> apwftimercontrol.exe
  • Java

Execute the following command from a command line (Start - Run - cmd), specifing the time (time unit: seconds) between runs:

java -cp "classpath" com.gxflow.apwftimerscheduler 60

Or as follows to execute it just once:

java -cp "classpath" com.gxflow.apwftimercontrol


..\<application>\WEB-INF\classes>java -cp "..\com\gxflow";.;"..\lib\*"; com.gxflow.apwftimerscheduler 60
<application>/WEB-INF/classes$ java -classpath ./com/gxflow:"../lib/GXClassR.jar":"../lib/jtds-1.2.jar":"../lib/com.gxflow.rules.jar":"../lib/wapi.jar": com.gxflow.apwftimerscheduler 60


In case that GAM is enabled in the KB, consider the following:

  1. Include the GAM libraries in the classpath:
    ..\<application>\WEB-INF\classes>java -cp "..\com\gxflow";.;"..\lib\gxclassr.jar";"..\lib\<driver>.jar";"..\lib\GAMCryptography.jar";"..\lib\GAMCache.jar";"..\lib\GAMDynamicCall.jar";"..\artech.security-<dbms>.jar" com.gxflow.apwftimercheduler 60
  2. The location.gam and the application.gam files have to be located in the directory where the command is executed - in this example, in the "classes" directory.

Scheduling on production environments

Note that apwftimerscheduler calls once every certain amount of time the apwftimercontrol which actually checks for the deadlines and executes the corresponding events.
The apwftimerscheduler is especially useful when prototyping, but in production environments the apwftimercontrol one recommended to be used. It's highly recommended to run the apwftimercontrol using a task scheduler and not the apwftimerscheduler.

For more information about how to schedule a task please see: