Class BTActivityManualTeamAssignment<T extends ActivityManualTeamAssignmentInput>
java.lang.Object
overit.geocall.bl.BusinessTask<SimpleBusinessEvent<T,ActivityManualAssignmentOutput>>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<SimpleBusinessEvent<T,ActivityManualAssignmentOutput>>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<SimpleBusinessEvent<T,ActivityManualAssignmentOutput>>
overit.geocallapp.wfm.orchestrator.scheduling.bl.activityassignment.task.BTBaseActivityManualAssignment<T>
overit.geocallapp.wfm.orchestrator.scheduling.bl.activityassignment.task.BTActivityManualTeamAssignment<T>
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(ActivityManualTeamAssignmentEvent.class)
public class BTActivityManualTeamAssignment<T extends ActivityManualTeamAssignmentInput>
extends BTBaseActivityManualAssignment<T>
Business task in order to schedule an activity to a resource.
Error Code:
Error Code:
Codes.ManualScheduling.STATUS_NOT_ALLOWEDCodes.ManualScheduling.ACTIVITY_DATE_BLOCKEDCodes.ManualScheduling.WRONG_APPOINTMENT_DATECodes.ManualScheduling.APPOINTMENT_ALREADY_DEFINEDCodes.ManualScheduling.INVALID_ACTIVITY_COORDINATESCodes.ManualScheduling.CANNOT_DEDUCE_DEPARTURE_ADDRESSCodes.ManualScheduling.CANNOT_DEDUCE_ARRIVAL_ADDRESSCodes.ManualScheduling.INVALID_ARRIVAL_ADDRESS_COORDINATESCodes.ManualScheduling.INVALID_DEPARTURE_ADDRESS_COORDINATESCodes.ManualScheduling.WORKSHIFT_TIME_EXCEEDEDCodes.ManualScheduling.ACTION_NOT_ALLOWED_ON_PASSED_DAYSCodes.ManualScheduling.ACTION_NOT_POSSIBLE_ON_LOCKED_DAYSCodes.ManualScheduling.OPERATION_IS_BOOKINGCodes.ManualScheduling.RESOURCE_UNAVAILABLECodes.ManualScheduling.ACTIVITY_SCHEDULING_MODE_NOT_VALIDCodes.ManualScheduling.OPERATION_NOT_ALLOWED_FROM_PROJECTCodes.ManualScheduling.WORKSHIFT_END_TIME_EXCEEDEDCodes.ManualScheduling.WORKSHIFT_OVERTIME_TIME_EXCEEDEDCodes.ManualScheduling.WRONG_WORKSHIFTS_DAYSCodes.ManualScheduling.WRONG_WORKSHIFTS_OC
- Since:
- 18.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.wfm.orchestrator.scheduling.bl.activityassignment.task.BTBaseActivityManualAssignment
eventInput, outputFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassignActivity(PoolKit poolKit) Schedule the current activity in the work shift of the resource, aligning previous and next activities.protected voidbuildTravelData(PoolKit poolKit) Calculated the travel data needed to assign the activity to the teamprotected voidcheckCrewShell(PoolKit poolKit) Evaluate if the assignation of the activity can be done checking the resource configuration.protected voidChecks if the input work shifts can be used for the assignmentprotected voidDefine the start coordinate of each team resources using the previous scheduling coordinates.protected org.locationtech.jts.geom.CoordinatedefineCoordinatesFromWorkShift(PoolKit poolKit) Define the start coordinate of each team resources using the work shift or the team configuration.protected voiddefineResourceCoordianteFromWorkShift(SchedulingTeamResource resource, PoolKit poolKit) Define the start and end coordinates of the resourceprotected voiddefineTeamDislocation(Long idTeamDislocation) protected voiddefineTransferTime(org.locationtech.jts.geom.Coordinate defaultTeamCoordinate, PoolKit poolKit) protected LongThis method doesn't refer to the constants of core module of planning action.protected LongReturn the start address of the resourceprotected LonggetTeamDislocation(SchedulingTeamResource resource) Returns the team dislocation of the working teamprotected LonggetTeamLocation(SchedulingTeamResource resource) Returns the team location of the working teamprotected DoublegetTimeBetweenCoordiates(Long ossSpace, Long operationCenter, org.locationtech.jts.geom.Coordinate startCoordinate, org.locationtech.jts.geom.Coordinate endCoordinate, PoolKit poolKit) Calls the VRP for calculate the movement time between the two input coordinatesprotected voidinitialChecks(PoolKit poolKit) Initial checks that evaluate if the operations is assignable to a resource.protected SchedulingTeamLoads the team on which the activity will be assignedprotected voidUpdates the list of assistants schedulings id in the foreman schedulingprotected voidSets the list of workshift id of the team membersprotected voidMethods inherited from class overit.geocallapp.wfm.orchestrator.scheduling.bl.activityassignment.task.BTBaseActivityManualAssignment
alignAgenda, buildOutput, calculateMissingSkills, calculateTimeAndDistanceInformation, checkActivity, checkActivityBlockDate, checkBookingDate, checkFreezingDay, checkScheduledTimeOnWorkshift, checkSchedulingsOfAgendas, createNewAgenda, execute, getAllResourcesSchedulings, getContext, getIntegrationService, getInterventionDuration, getLock, initializeContext, insertBasicScheduling, isValidExecution, launchCompleteManualActionEvent, launchSchedulingCheckEvent, loadWorkShiftDays, notifyActivityScheduled, notifyInsert, prepareTeam, reloadSchedulings, retrieveAgenda, retrieveAppointment, saveInitialSchedulings, savePlanningHistory, setContext, updateNextsSchedulingsOrder, updateParentScheduling, updatePreviousNextSchedulingCoordinatesPath, updateSchedulings, updateStatus, updateWorkshiftTourDataMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTActivityManualTeamAssignment
public BTActivityManualTeamAssignment()
-
-
Method Details
-
loadTeam
Description copied from class:BTBaseActivityManualAssignmentLoads the team on which the activity will be assigned- Specified by:
loadTeamin classBTBaseActivityManualAssignment<T extends ActivityManualTeamAssignmentInput>- Parameters:
poolKit- thePoolKit- Returns:
- Throws:
DAValidateExceptionDAException
-
validateEventInput
protected void validateEventInput()- Overrides:
validateEventInputin classBTBaseActivityManualAssignment<T extends ActivityManualTeamAssignmentInput>
-
checkCrewShell
Evaluate if the assignation of the activity can be done checking the resource configuration.
Is not possible to assign activities to crew shells or members of a crew shell.- Specified by:
checkCrewShellin classBTBaseActivityManualAssignment<T extends ActivityManualTeamAssignmentInput>- Throws:
DAValidateExceptionDAException
-
initialChecks
Initial checks that evaluate if the operations is assignable to a resource.- Overrides:
initialChecksin classBTBaseActivityManualAssignment<T extends ActivityManualTeamAssignmentInput>- Parameters:
poolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkTeamWorkShifts
Checks if the input work shifts can be used for the assignment- Throws:
DAValidateException
-
assignActivity
Schedule the current activity in the work shift of the resource, aligning previous and next activities.- Specified by:
assignActivityin classBTBaseActivityManualAssignment<T extends ActivityManualTeamAssignmentInput>- Parameters:
poolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
updateAssistantsSchedulingsId
protected void updateAssistantsSchedulingsId()Updates the list of assistants schedulings id in the foreman scheduling -
updateRelatedWorkshifts
protected void updateRelatedWorkshifts()Sets the list of workshift id of the team members -
buildTravelData
Calculated the travel data needed to assign the activity to the team- Throws:
DAValidateExceptionDAException
-
defineCoordinatesFromWorkShift
protected org.locationtech.jts.geom.Coordinate defineCoordinatesFromWorkShift(PoolKit poolKit) throws DAValidateException, DAException Define the start coordinate of each team resources using the work shift or the team configuration.- Throws:
DAExceptionDAValidateException
-
defineCoordinatesFromScheduling
protected void defineCoordinatesFromScheduling()Define the start coordinate of each team resources using the previous scheduling coordinates. -
getTeamLocation
Returns the team location of the working team- Parameters:
resource- theSchedulingTeamResource- Returns:
- the team location id
-
getTeamDislocation
Returns the team dislocation of the working team- Parameters:
resource- theSchedulingTeamResource- Returns:
- the team dislocation id
-
getResourceStartAddress
Return the start address of the resource- Parameters:
resource- theSchedulingTeamResource- Returns:
- the start address of the resource
-
defineResourceCoordianteFromWorkShift
protected void defineResourceCoordianteFromWorkShift(SchedulingTeamResource resource, PoolKit poolKit) throws DAValidateException, DAException Define the start and end coordinates of the resource- Parameters:
resource- theSchedulingTeamResourcepoolKit- thePoolKit- Throws:
DAValidateExceptionDAException
-
defineTeamDislocation
-
defineTransferTime
protected void defineTransferTime(org.locationtech.jts.geom.Coordinate defaultTeamCoordinate, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
getTimeBetweenCoordiates
protected Double getTimeBetweenCoordiates(Long ossSpace, Long operationCenter, org.locationtech.jts.geom.Coordinate startCoordinate, org.locationtech.jts.geom.Coordinate endCoordinate, PoolKit poolKit) throws DAValidateException, DAException Calls the VRP for calculate the movement time between the two input coordinates- Parameters:
ossSpace- the OSSSpace idoperationCenter- theBOOperationCenteridstartCoordinate- the start coordinateendCoordinate- the end coordinate- Returns:
- the movement time between the two input coordinates
- Throws:
DAValidateExceptionDAException
-
getPlanningAction
This method doesn't refer to the constants of core module of planning action. We don't want to manage planning action outside core module, for now we fix the basic value- Specified by:
getPlanningActionin classBTBaseActivityManualAssignment<T extends ActivityManualTeamAssignmentInput>
-