Class SchedulerServices

java.lang.Object
com.ebasetech.xi.services.SchedulerServices
All Implemented Interfaces:
java.io.Serializable

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.
Since:
V5.0
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    SchedulerServices()  
  • Method Summary

    Modifier and Type Method 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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SchedulerServices

      public SchedulerServices()
  • Method Details

    • runBackgroundForm

      public 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. Parameters can be passed into the form and these must be form fields declared as URL Parameters.

      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");
       
      Parameters:
      formId - the unique name of the form
      formParameters - a map of field names and values, fields must be declared as URL Parameters
      scheduledTaskId - this is used as the header in the Server Administration Application when viewing logs, if null is specified, logs are not saved.
      Since:
      V5.0
    • runFormInExecutor

      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)
      Run form using threads from the Executors. I made it to work with a ThreadPoolExecutor, but I guess any Executor can be used. //everything else is same a runBackgroundForm.
    • runForm

      public static void runForm​(java.lang.String formId, java.util.Map<java.lang.String,​java.lang.String> formParameters, java.lang.String scheduledTaskId, boolean inBackground)