Class BTInterventionOutcomeValidate
java.lang.Object
overit.geocall.bl.BusinessTask<InterventionOutcomeValidateEvent>
overit.geocallapp.wfm.orchestrator.workorders.bl.outcome.intervention.task.BTInterventionOutcomeValidate
- All Implemented Interfaces:
Serializable,Tool
@Event(InterventionOutcomeValidateEvent.class)
public class BTInterventionOutcomeValidate
extends BusinessTask<InterventionOutcomeValidateEvent>
Business task in order to validate a
When the
BOInterventionOutcome. When the
InterventionOutcomeValidateEvent is launched
the BT notices the call and validates the BOInterventionOutcome basing on the event's input. Error code:
- Since:
- 18.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(InterventionOutcomeValidateEvent event, PoolKit poolKit) Checks that all the data of theBOInterventionOutcomeare coherent and valid.getIntegrationService(PoolKit poolKit) Return theWorkOrdersIntegrationServiceused to access other domainsprotected voidValidates the arrival on site.protected voidvalidateDates(BOInterventionOutcome outcome) Validates theBOInterventionOutcomedates.protected voidvalidateDuration(BOInterventionOutcome outcome) Checks the difference between take in charge and on site arrival dates.protected voidvalidateEncodedNotes(BOInterventionOutcome outcome, PoolKit poolKit) Checks that the encoded notes are correct based on the current outcome reason.protected voidvalidateRelatedEntities(BOInterventionOutcome outcome, PoolKit poolKit) Validates the entities related to theBOInterventionOutcome.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTInterventionOutcomeValidate
public BTInterventionOutcomeValidate()
-
-
Method Details
-
body
protected void body(InterventionOutcomeValidateEvent event, PoolKit poolKit) throws DAException, DAValidateException Checks that all the data of theBOInterventionOutcomeare coherent and valid.- Specified by:
bodyin classBusinessTask<InterventionOutcomeValidateEvent>- Parameters:
event- theInterventionOutcomeValidateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateRelatedEntities
protected void validateRelatedEntities(BOInterventionOutcome outcome, PoolKit poolKit) throws DAValidateException, DAException Validates the entities related to theBOInterventionOutcome.- Parameters:
outcome- the current outcomepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
validateDates
Validates theBOInterventionOutcomedates.- Parameters:
outcome- the current outcome- Throws:
DAValidateException- the DA validate exception
-
validateDuration
Checks the difference between take in charge and on site arrival dates. This difference cannot be grater than the tour arrival date limit.- Parameters:
outcome- the outcome- Throws:
DAValidateException- the DA validate exception
-
validateArrivalOnSite
Validates the arrival on site.- Parameters:
outcome- the current outcome- Throws:
DAValidateException- the DA validate exception
-
validateEncodedNotes
protected void validateEncodedNotes(BOInterventionOutcome outcome, PoolKit poolKit) throws DAValidateException, DAException Checks that the encoded notes are correct based on the current outcome reason.- Parameters:
outcome- the current outcomepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getIntegrationService
public WorkOrdersIntegrationService getIntegrationService(PoolKit poolKit) throws DAValidateException Return theWorkOrdersIntegrationServiceused to access other domains- Parameters:
poolKit- thePoolKit- Returns:
- the
WorkOrdersIntegrationServiceused to access services and events in other domains - Throws:
DAValidateException- thrown if there are data related loading errors
-