Class BTImmediateSchedulingWorkOrderSelect
java.lang.Object
overit.geocall.bl.BusinessTask<ImmediateSchedulingWorkOrderSelectEvent>
overit.geocallapp.wfm.scheduling.bl.immediatescheduling.processing.workorder.task.BTImmediateSchedulingWorkOrderSelect
- All Implemented Interfaces:
Serializable,Tool
@Event(ImmediateSchedulingWorkOrderSelectEvent.class)
public class BTImmediateSchedulingWorkOrderSelect
extends BusinessTask<ImmediateSchedulingWorkOrderSelectEvent>
Business task for selecting immediate scheduling work orders for processing.
This task uses a single atomic UPDATE to select and update work orders in one operation. The UPDATE filters work orders by:
- Operation center
- State = TO_BE_PROCESSED
- Processing counter < max attempts (or NULL)
The UPDATE sets:
- Processing ID
- Scheduling model ID
- State = IN_PROGRESS
- Increments processing counter (using NVL to handle NULL)
This approach prevents race conditions when multiple tasks try to process the same work orders, and is more efficient than searching first and then updating.
Returns the number of work orders selected and updated.
- Since:
- 22.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(ImmediateSchedulingWorkOrderSelectEvent event, PoolKit poolKit) Implements this method to write the specific task logic to handle the input parameter.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTImmediateSchedulingWorkOrderSelect
public BTImmediateSchedulingWorkOrderSelect()
-
-
Method Details
-
body
protected void body(ImmediateSchedulingWorkOrderSelectEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:BusinessTaskImplements this method to write the specific task logic to handle the input parameter.- Specified by:
bodyin classBusinessTask<ImmediateSchedulingWorkOrderSelectEvent>- Parameters:
event- 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
-