Class BTDataCollectionSheetInstanceOnWOOperationStateChange
java.lang.Object
overit.geocall.bl.BusinessTask<WorkOrderOperationStateChangeEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkOrderOperationStateChangeEvent>
overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection<WorkOrderOperationStateChangeEvent>
overit.geocallapp.wfm.core.bl.datacollection.instance.task.BTDataCollectionSheetInstanceOnWOOperationStateChange
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkOrderOperationStateChangeEvent.class)
public class BTDataCollectionSheetInstanceOnWOOperationStateChange
extends BTDataCollection<WorkOrderOperationStateChangeEvent>
Business task in order to change the workorder operation state of a
When the
DataCollectionSheetInstance. When the
WorkOrderOperationStateChangeEvent is launched
the BT notices the call and changes the workorder operation state of the DataCollectionSheetInstance basing on the event's input. - Since:
- 12.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(WorkOrderOperationStateChangeEvent event, PoolKit poolKit) Changes the workorder operation state.protected List<BODataCollectionSheet> searchDataCollectionSheets(Long woOperationId, PoolKit poolKit) Searches the data collection sheets.booleanThrow exception if invalid.protected voidupdateState(Long state, List<BODataCollectionSheet> sheets, PoolKit poolKit) Updates the state.Methods inherited from class overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection
getException, isValidExecutionMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, checkValidExecution, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTDataCollectionSheetInstanceOnWOOperationStateChange
public BTDataCollectionSheetInstanceOnWOOperationStateChange()
-
-
Method Details
-
execute
protected void execute(WorkOrderOperationStateChangeEvent event, PoolKit poolKit) throws DAException, DAValidateException Changes the workorder operation state.- Specified by:
executein classValidExecutionBusinessTask<WorkOrderOperationStateChangeEvent>- Parameters:
event- theWorkOrderOperationStateChangeEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
searchDataCollectionSheets
protected List<BODataCollectionSheet> searchDataCollectionSheets(Long woOperationId, PoolKit poolKit) throws DAException, DAValidateException Searches the data collection sheets.- Parameters:
woOperationId- the wo operation idpoolKit- thePoolKit- Returns:
- a list of BO data collection sheet elements of type BODataCollectionSheet
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception- See Also:
-
updateState
protected void updateState(Long state, List<BODataCollectionSheet> sheets, PoolKit poolKit) throws DAException, DAValidateException Updates the state.- Parameters:
state- the statesheets- list ofBODataCollectionSheetelementspoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
throwExceptionIfInvalid
public boolean throwExceptionIfInvalid()Throw exception if invalid.- Specified by:
throwExceptionIfInvalidin interfaceValidExecution- Overrides:
throwExceptionIfInvalidin classBTDataCollection<WorkOrderOperationStateChangeEvent>- Returns:
- true, if successful
-