Class BTInterventionOutcomeCompleteNotification
java.lang.Object
overit.geocall.bl.BusinessTask<InterventionOutcomeCompleteNotificationEvent>
overit.geocallapp.wfm.orchestrator.workorders.bl.outcome.intervention.task.BTInterventionOutcomeCompleteNotification
- All Implemented Interfaces:
Serializable,Tool
@Event(InterventionOutcomeCompleteNotificationEvent.class)
public class BTInterventionOutcomeCompleteNotification
extends BusinessTask<InterventionOutcomeCompleteNotificationEvent>
Business task to handle intervention outcome complete notification with reason and agenda information.
When the InterventionOutcomeCompleteNotificationEvent is launched,
the BT notices the call and processes the intervention outcome complete notification based on the event's input.
The process validates the input data and performs the necessary actions for the intervention outcome complete notification.
- Since:
- 22.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(InterventionOutcomeCompleteNotificationEvent event, PoolKit poolKit) Executes the business task to handle the intervention outcome complete notification.protected WorkOrdersIntegrationServicegetIntegrationService(PoolKit poolKit) Returns the integration service.getWorkOrderOperationResourceRequirementsUpdateInput(InterventionOutcomeCompleteNotificationInput input, BOOperationRequirementType requirementType, BOResource resource) Builds the input for theWorkOrderOperationResourceRequirementsUpdateEventbased on the requirement type and resource.protected voidUpdates resource requirements for a work order operation based on the outcome cause configuration.protected voidValidates the input data.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
integrationService
-
-
Constructor Details
-
BTInterventionOutcomeCompleteNotification
public BTInterventionOutcomeCompleteNotification()
-
-
Method Details
-
body
protected void body(InterventionOutcomeCompleteNotificationEvent event, PoolKit poolKit) throws DAException, DAValidateException Executes the business task to handle the intervention outcome complete notification.- Specified by:
bodyin classBusinessTask<InterventionOutcomeCompleteNotificationEvent>- Parameters:
event- theInterventionOutcomeCompleteNotificationEventpoolKit- thePoolKit- Throws:
DAException- if an error occurs during the processDAValidateException- if any validation error occurs
-
validateInput
protected void validateInput(InterventionOutcomeCompleteNotificationInput input) throws DAValidateException Validates the input data.- Parameters:
input- theInterventionOutcomeCompleteNotificationInput- Throws:
DAValidateException- if the input is invalid
-
updateWorkOrderRequirement
protected void updateWorkOrderRequirement(InterventionOutcomeCompleteNotificationInput input, PoolKit poolKit) throws DAException, DAValidateException Updates resource requirements for a work order operation based on the outcome cause configuration. This method usesWorkOrderOperationResourceRequirementsUpdateEventto perform a single database operation for better performance, without individual validations or history records.The update will affect these fields based on the outcome cause requirement type:
- Mandatory resources that must be assigned to the operation
- Preferred resources that should be assigned to the operation when possible
- Excluded resources that should not be assigned to the operation
- Parameters:
input- theInterventionOutcomeCompleteNotificationInputcontaining the outcome datapoolKit- the database connection- Throws:
DAException- if database access failsDAValidateException- if validation fails
-
getWorkOrderOperationResourceRequirementsUpdateInput
protected WorkOrderOperationResourceRequirementsUpdateInput getWorkOrderOperationResourceRequirementsUpdateInput(InterventionOutcomeCompleteNotificationInput input, BOOperationRequirementType requirementType, BOResource resource) Builds the input for theWorkOrderOperationResourceRequirementsUpdateEventbased on the requirement type and resource.- Parameters:
input- theInterventionOutcomeCompleteNotificationInputcontaining the outcome datarequirementType- theBOOperationRequirementTypedefining the type of resource requirementresource- theBOResourceto be added to the requirements- Returns:
- the
WorkOrderOperationResourceRequirementsUpdateInputconfigured with the appropriate resource list
-
getIntegrationService
protected WorkOrdersIntegrationService getIntegrationService(PoolKit poolKit) throws DAValidateException Returns the integration service.- Parameters:
poolKit- thePoolKit- Returns:
- the integration service
- Throws:
DAValidateException- the DA validate exception
-