public class SchedulerServices
extends java.lang.Object
implements java.io.Serializable
SchedulerServices
provides static methods that enable Scheduled Tasks to be started from a form, workflow job or Integration Service.Constructor and Description |
---|
SchedulerServices() |
Modifier and Type | Method and Description |
---|---|
static void |
runBackgroundForm(java.lang.String formId,
java.util.Map<java.lang.String,java.lang.String> formParameters,
java.lang.String scheduledTaskId)
Runs the specified form immediately in background executing the before form and after form events.
|
static void |
runForm(java.lang.String formId,
java.util.Map<java.lang.String,java.lang.String> formParameters,
java.lang.String scheduledTaskId,
boolean inBackground) |
static void |
runFormInExecutor(java.lang.String formId,
java.util.Map<java.lang.String,java.lang.String> formParameters,
java.lang.String scheduledTaskId,
java.util.concurrent.Executor executor)
Run form using threads from the Executors.
|
public static void runBackgroundForm(java.lang.String formId, java.util.Map<java.lang.String,java.lang.String> formParameters, java.lang.String scheduledTaskId)
The scheduledTaskId parameter is used to control logging. If this specifies a non-null value, a scheduled task log is created for each background form execution and can be viewed using the server admin app. If a null value is specified, a scheduled task log is not created. Note that regardless of the value of this parameter, scheduled task logs can be written to the console log by enabling the EbaseScheduledTaskLogger in log4j.xml.
Javascript example:
var parms = {}; parms.p1 = fields.p1.value; parms.p2 = fields.p2.value; parms.date1 = fields.dateField1.value; //fields of type DATE, pass the millisecond date value SchedulerServices.runBackgroundForm("st1", parms, "Test Scheduler");
formId
- the unique name of the formformParameters
- a map of field names and values, fields must be declared as URL ParametersscheduledTaskId
- this is used as the header in the Server Administration Application when viewing logs, if null is specified, logs are not saved.public static void runFormInExecutor(java.lang.String formId, java.util.Map<java.lang.String,java.lang.String> formParameters, java.lang.String scheduledTaskId, java.util.concurrent.Executor executor)
public static void runForm(java.lang.String formId, java.util.Map<java.lang.String,java.lang.String> formParameters, java.lang.String scheduledTaskId, boolean inBackground)