Class BTImmediateSchedulingLaunch
java.lang.Object
overit.geocall.bl.BusinessTask<Void>
overit.geocallapp.wfm.scheduling.bl.immediatescheduling.processing.task.BTImmediateSchedulingLaunch
- All Implemented Interfaces:
Serializable,Tool
Business task to launch immediate scheduling processes.
This task searches for processing records in TO_BE_PROCESSED state and launches the
This task searches for processing records in TO_BE_PROCESSED state and launches the
ImmediateSchedulingProcessEvent for each one. The task runs periodically and:
- Searches for all records in AIMMEDIATESCHEDULINGLASTPROC with state TO_BE_PROCESSED
- For each record found, launches
ImmediateSchedulingProcessEventasynchronously
The actual processing is handled by BTImmediateSchedulingProcess in the core module,
which uses an atomic UPDATE to acquire the record and prevent race conditions.
This task should be scheduled to run periodically (e.g., every 1-2 minutes).
- Since:
- 22.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplements this method to write the specific task logic to handle the input parameter.protected voidlaunchProcessingEvent(Long immediateSchedulingId, PoolKit poolKit) Launches the ImmediateSchedulingProcessEvent asynchronously for the given processing ID.protected List<BOImmediateSchedulingLastProcessing> searchPendingProcessings(PoolKit poolKit) Searches for all processing records in TO_BE_PROCESSED state.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTImmediateSchedulingLaunch
public BTImmediateSchedulingLaunch()
-
-
Method Details
-
body
Description copied from class:BusinessTaskImplements this method to write the specific task logic to handle the input parameter.- Specified by:
bodyin classBusinessTask<Void>- Parameters:
input- the object upon which the task will works onpoolKit- the poolkit containing the reference to the database connection that can be used- Throws:
DAException- in case of database errorDAValidateException- in case of database validation error
-
searchPendingProcessings
protected List<BOImmediateSchedulingLastProcessing> searchPendingProcessings(PoolKit poolKit) throws DAException, DAValidateException Searches for all processing records in TO_BE_PROCESSED state.- Parameters:
poolKit- the pool kit- Returns:
- the list of pending processing records
- Throws:
DAException- if a database error occursDAValidateException- if a validation error occurs
-
launchProcessingEvent
protected void launchProcessingEvent(Long immediateSchedulingId, PoolKit poolKit) throws DAException, DAValidateException Launches the ImmediateSchedulingProcessEvent asynchronously for the given processing ID.- Parameters:
immediateSchedulingId- the immediate scheduling last processing IDpoolKit- the pool kit- Throws:
DAException- if a database error occursDAValidateException- if a validation error occurs
-