Class BTWorkOrderNoteInsert
java.lang.Object
overit.geocall.bl.BusinessTask<WorkOrderNoteInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkOrderNoteInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WorkOrderNoteInsertEvent>
overit.geocallapp.wfm.workorders.bl.note.task.BTWorkOrderNoteInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkOrderNoteInsertEvent.class)
public class BTWorkOrderNoteInsert
extends ValidPermissionBusinessTask<WorkOrderNoteInsertEvent>
Business task for inserting a new work order note.
When the
When the
WorkOrderNoteInsertEvent is launched
the BT notices the call and inserts the BOWorkOrderNote basing on the event's input. Required fields header:
- note
- workOrder
Permission:
Error Code:
- Since:
- 22.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(WorkOrderNoteInsertEvent event, PoolKit poolKit) Inserts a new work order note and writes the inserted ID to the event journal.booleanDetermines whether the current state is valid for execution.protected voidsetAuditData(BOWorkOrderNote workOrderNote) Sets audit data for the work order note before insertion.protected voidvalidate(BOWorkOrderNote workOrderNote, PoolKit poolKit) Validates the work order note data before insertion.Methods 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
-
BTWorkOrderNoteInsert
public BTWorkOrderNoteInsert()
-
-
Method Details
-
execute
protected void execute(WorkOrderNoteInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts a new work order note and writes the inserted ID to the event journal.- Specified by:
executein classValidExecutionBusinessTask<WorkOrderNoteInsertEvent>- Parameters:
event- theWorkOrderNoteInsertEventpoolKit- thePoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
setAuditData
Sets audit data for the work order note before insertion.- Parameters:
workOrderNote- the work order note to be updated with audit data
-
validate
protected void validate(BOWorkOrderNote workOrderNote, PoolKit poolKit) throws DAException, DAValidateException Validates the work order note data before insertion.- Parameters:
workOrderNote- the work order note to validatepoolKit- thePoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-