Class BTBundleAppointmentsUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<BundleNotificationEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<BundleNotificationEvent>
overit.geocallapp.wfm.bundler.bl.task.BTBundler<BundleNotificationEvent>
overit.geocallapp.wfm.orchestrator.scheduling.bl.appointment.task.BTBundleAppointmentsUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(BundleNotificationEvent.class)
public class BTBundleAppointmentsUpdate
extends BTBundler<BundleNotificationEvent>
Business task in order to update the
When the
BOAppointments related to a Bundle. When the
BundleNotificationEvent is launched
the BT notices the call and updates the BOAppointments basing on the event's input. - Since:
- 20.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidalignAppointments(Bundle bundle, List<BOAppointment> appointments, PoolKit poolKit) Aligns the appointments related to the bundle with the ID of the related bundle operation.protected voidexecute(BundleNotificationEvent event, PoolKit poolKit) Retrieves theBOAppointments related to theBundleand updates them with the newBOBundleOperationid.protected SchedulingIntegrationServicegetIntegrationService(PoolKit poolKit) Retrieves theSchedulingIntegrationServiceinstance.protected List<BOAppointment> loadAppointments(List<Long> workOrderOperations, PoolKit poolKit) Loads theBOAppointments related to the given list ofBOWorkOrderOperationids.protected voidunlinkAppointments(Bundle bundle, List<BOAppointment> appointments, PoolKit poolKit) Removes the link between aBOBundleOperationand each relatedBOAppointment.Methods inherited from class overit.geocallapp.wfm.bundler.bl.task.BTBundler
getException, isValidExecution, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, checkValidExecution, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTBundleAppointmentsUpdate
public BTBundleAppointmentsUpdate()
-
-
Method Details
-
execute
protected void execute(BundleNotificationEvent event, PoolKit poolKit) throws DAException, DAValidateException Retrieves theBOAppointments related to theBundleand updates them with the newBOBundleOperationid.- Specified by:
executein classValidExecutionBusinessTask<BundleNotificationEvent>- Parameters:
event- theBundleNotificationEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
alignAppointments
protected void alignAppointments(Bundle bundle, List<BOAppointment> appointments, PoolKit poolKit) throws DAException, DAValidateException Aligns the appointments related to the bundle with the ID of the related bundle operation.- Parameters:
bundle- theBundleappointments- the list ofBOAppointmentspoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadAppointments
protected List<BOAppointment> loadAppointments(List<Long> workOrderOperations, PoolKit poolKit) throws DAValidateException, DAException Loads theBOAppointments related to the given list ofBOWorkOrderOperationids.- Parameters:
workOrderOperations- list ofBOWorkOrderOperationidspoolKit- thePoolKit- Returns:
- the list of loaded
BOAppointments - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
unlinkAppointments
protected void unlinkAppointments(Bundle bundle, List<BOAppointment> appointments, PoolKit poolKit) throws DAValidateException, DAException Removes the link between aBOBundleOperationand each relatedBOAppointment.- Parameters:
appointments- the list ofBOAppointmentspoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getIntegrationService
protected SchedulingIntegrationService getIntegrationService(PoolKit poolKit) throws DAValidateException Retrieves theSchedulingIntegrationServiceinstance. If the instance hasn't been created yet, it will be created and stored for future use.- Parameters:
poolKit- ThePoolKit.- Returns:
- The
SchedulingIntegrationServiceinstance. - Throws:
DAValidateException- If any validation error occurs.
-