Class BTWorkOrderOperationsLinksUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<WorkOrderOperationsLinksUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkOrderOperationsLinksUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WorkOrderOperationsLinksUpdateEvent>
overit.geocallapp.wfm.workorders.bl.task.BTWorkOrderOperationsLinksUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkOrderOperationsLinksUpdateEvent.class)
public class BTWorkOrderOperationsLinksUpdate
extends ValidPermissionBusinessTask<WorkOrderOperationsLinksUpdateEvent>
Business task in to update the links between operations in a work order with operation assignment of type aggregate
(ex work order by order).
When the
The first open operation of the work order will be the parent of the others operations.
When the
WorkOrderOperationsLinksUpdateEvent is launched the BT notices the call and updates the links
between the operations, if the work order is a work order with operation assignment of type aggregate. The first open operation of the work order will be the parent of the others operations.
Required fields:
- work order id
Permission:
- Since:
- 18.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(WorkOrderOperationsLinksUpdateEvent event, PoolKit poolKit) Updates the links between the work order operationsprotected List<BOWorkOrderOperation> getWorkOrderOperations(PoolKit poolKit) Gets all the work order operations.booleanDetermines whether the current state is valid for execution.protected voidupdateOperationsLinks(List<BOWorkOrderOperation> workOrderOperations) Updates the references between the operations, using the first open operation as parent.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
-
Field Details
-
workOrderHeader
-
saveOperations
protected boolean saveOperations
-
-
Constructor Details
-
BTWorkOrderOperationsLinksUpdate
public BTWorkOrderOperationsLinksUpdate()
-
-
Method Details
-
execute
protected void execute(WorkOrderOperationsLinksUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates the links between the work order operations- Specified by:
executein classValidExecutionBusinessTask<WorkOrderOperationsLinksUpdateEvent>- Parameters:
event- theWorkOrderOperationsLinksUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getWorkOrderOperations
protected List<BOWorkOrderOperation> getWorkOrderOperations(PoolKit poolKit) throws DAValidateException, DAException Gets all the work order operations.- Parameters:
poolKit- thePoolKit- Throws:
DAValidateExceptionDAException
-
updateOperationsLinks
Updates the references between the operations, using the first open operation as parent.- Parameters:
workOrderOperations- the list ofBOWorkOrderOperationto update.
-
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
-