Accounting API Developer's Reference
|
c2g.BackgroundPostingSchedulerServiceglobal class BackgroundPostingSchedulerService The service class relating to Background Posting Scheduler. Properties
Methods
runNowglobal static void runNow() Runs any background posting jobs with a status of “waiting”. See "About the Background Posting Scheduler" in the FinancialForce Help for more details. runNowglobal static void runNow(String documentType) Runs the background posting scheduler for the specified document type. Input Parameters
scheduleBySettingsObjectglobal static c2g.BackgroundPostingSchedulerService.ScheduleResult scheduleBySettingsObject(c2g.BackgroundPostingSchedulerService.ScheduleSettings settings) Creates a schedule to control the frequency of the batch processing. Input Parameters
Return ValueThis service returns a c2g.BackgroundPostingSchedulerService.ScheduleResult object. Sample Code//Note: This sample code is for demonstration purposes only, it is not intended for //use in a production environment, is not guaranteed against defects or errors and //is in no way optimized or streamlined. BackgroundPostingSchedulerService.PostingSchedulerConstants constants = new BackgroundPostingSchedulerService.PostingSchedulerConstants(); BackgroundPostingSchedulerServiceImpl impl = new BackgroundPostingSchedulerServiceImpl(); // Options for schedule. String selectedInterval = '1'; String selectedOffset = '0'; Integer selectedMonthItem = constants.MONTH_ITEM_DOM; String selectedDayOccurance = '1'; String[] selectedWeekDays = new String[]{'1', '3'}; String selectedWeekDay = '1'; String selectedMonthDay = 12; String selectedTime = '0'; String selectedFrequencyType = 'HOURLY'; // Put the options in a settings object. BackgroundPostingSchedulerService.ScheduleSettings settings = new BackgroundPostingSchedulerService.ScheduleSettings( selectedTime, selectedFrequencyType, selectedMonthItem, selectedMonthDay, selectedWeekDay, selectedDayOccurance, selectedWeekDays, selectedOffset, selectedInterval); BackgroundPostingSchedulerService.scheduleBySettingsObject(settings); c2g.BackgroundPostingSchedulerService.ScheduleResultglobal class ScheduleResult Holds information about the status of an attempt to schedule. Sample Code//Note: This sample code is for demonstration purposes only, it is not intended for //use in a production environment, is not guaranteed against defects or errors and //is in no way optimized or streamlined. // This code is for demonstration purposes only // Simple check for success. BackgroundPostingSchedulerService.ScheduleResult result; result = serviceImpl.scheduleBySettingsObject(completeSettings); if (result.isScheduled) { //… } Properties
c2g.BackgroundPostingSchedulerService.ScheduleSettingsglobal class ScheduleSettings This data type allows you to specify the settings of a Background Posting Scheduler schedule. Sample Code//Note: This sample code is for demonstration purposes only, it is not intended for //use in a production environment, is not guaranteed against defects or errors and //is in no way optimized or streamlined. BackgroundPostingSchedulerService.PostingSchedulerConstants constants = new BackgroundPostingSchedulerService.PostingSchedulerConstants(); BackgroundPostingSchedulerServiceImpl impl = new BackgroundPostingSchedulerServiceImpl(); // Options for schedule. String selectedInterval = '1'; String selectedOffset = '0'; Integer selectedMonthItem = constants.MONTH_ITEM_DOM; String selectedDayOccurance = '1'; String[] selectedWeekDays = new String[]{'1', '3'}; String selectedWeekDay = '1'; String selectedMonthDay = 12; String selectedTime = '0'; String selectedFrequencyType = 'HOURLY'; // Put the options in a settings object. BackgroundPostingSchedulerService.ScheduleSettings settings = new BackgroundPostingSchedulerService.ScheduleSettings( selectedTime, selectedFrequencyType, selectedMonthItem, selectedMonthDay, selectedWeekDay, selectedDayOccurance, selectedWeekDays, selectedOffset, selectedInterval); BackgroundPostingSchedulerService.scheduleBySettingsObject(settings); Properties
MethodsScheduleSettingsglobal ScheduleSettings() |