Class BTOperationActivityInsert
java.lang.Object
overit.geocall.bl.BusinessTask<OperationActivityInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<OperationActivityInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<OperationActivityInsertEvent>
overit.geocallapp.wfm.core.bl.workorder.operationactivity.task.BTOperationActivityInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(OperationActivityInsertEvent.class)
public class BTOperationActivityInsert
extends ValidPermissionBusinessTask<OperationActivityInsertEvent>
Business task in order to insert a
When the
BOOperationActivity.When the
OperationActivityInsertEvent is launched the BT notices the
call and inserts the BOOperationActivity basing on the event's
input.Required fields:
- code
- description
- intervention group
- scheduling type
Permission:
Error Code:
Codes.C270_0697: Code not definedCodes.C270_0673: Intervention group not definedCodes.C270_1011: Impossible to decode scheduling typeCodes.C270_0962: Scheduling type not definedCodes.MISSING_REQUIRED_MULTILANGUAGE_VALUES: Missing required multilanguage values for the propertyCodes.C270_1334: Cannot insert activity. There is another activity with the same code description
Autocomplete: Multilanguage
Associates visible outcome causals to the operation activity.
- Since:
- 9.2
- 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 voidafterInsert(BOOperationActivity bo, PoolKit pk) Actions to perform after the insertionprotected voidassociateVisibleOutcomeCausals(BOOperationActivity boActivity, PoolKit pk) Associates visible outcome causals to the operation activity.protected voidexecute(OperationActivityInsertEvent event, PoolKit pk) Writes the inserted operation activity id into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOOperationActivity boActivity, PoolKit pk) Checks if the insertion is possible by performing some validations on the givenBOOperationActivityMethods 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
-
BTOperationActivityInsert
public BTOperationActivityInsert()
-
-
Method Details
-
execute
protected void execute(OperationActivityInsertEvent event, PoolKit pk) throws DAException, DAValidateException Writes the inserted operation activity id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<OperationActivityInsertEvent>- Parameters:
event- the eventpk- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
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
-
validate
protected void validate(BOOperationActivity boActivity, PoolKit pk) throws DAValidateException, DAException Checks if the insertion is possible by performing some validations on the givenBOOperationActivity- Parameters:
boActivity- the operation activitypk- the pool kit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
associateVisibleOutcomeCausals
protected void associateVisibleOutcomeCausals(BOOperationActivity boActivity, PoolKit pk) throws DAValidateException, DAException Associates visible outcome causals to the operation activity.- Parameters:
boActivity- the operation activitypk- the pool kit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
afterInsert
Actions to perform after the insertion- Parameters:
bo- the operation activitypk- the pool kit
-