Class BTAutomaticBundling
java.lang.Object
overit.geocall.bl.BusinessTask<AutomaticBundlingEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<AutomaticBundlingEvent>
overit.geocallapp.wfm.bundler.bl.task.BTBundler<AutomaticBundlingEvent>
overit.geocallapp.wfm.orchestrator.workorders.bl.bundler.bundling.task.BTAutomaticBundling
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(AutomaticBundlingEvent.class)
public class BTAutomaticBundling
extends BTBundler<AutomaticBundlingEvent>
Business task in order to automatically create a collection of
When the
Bundle. When the
AutomaticBundlingEvent is launched the BT notices the call,
unbundles all the existing schedulable Bundles and creates new
Bundles based on the event's input. Visibility:
- work order operations that belong to the same current user's operation center
- active and automatic bundling rules that belong to the same current user's operation center
- Since:
- 11.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbundle(List<BundlingRule> rules, BundleEntitiesCache cache, PoolKit poolKit) Creates newBundles starting from the given rules.protected voidexecute(AutomaticBundlingEvent event, PoolKit poolKit) Unbundles all the existing schedulable and not lockedBundles and creates newBundles starting from the active and automaticBundlingRules.protected List<BundlingRule> getActiveAndAutomaticRules(PoolKit poolKit) Retrieves all the active and automatic rules.protected List<BOBundleHeader> getSchedulableBundles(PoolKit poolKit) Retrieves the existing schedulable and not lockedBundles.protected voidinitializeLog(BundleEntitiesCache cache) Initializes the log for the process.protected voidUnbundles theBundles having the given ids.protected voidunbundleSchedulableBundles(PoolKit poolKit) Unbundles the existing schedulableBundles.Methods inherited from class overit.geocallapp.wfm.bundler.bl.task.BTBundler
getException, isValidExecution, throwExceptionIfInvalidMethods 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
-
Field Details
-
logHelper
The log helper.
-
-
Constructor Details
-
BTAutomaticBundling
public BTAutomaticBundling()
-
-
Method Details
-
execute
protected void execute(AutomaticBundlingEvent event, PoolKit poolKit) throws DAException, DAValidateException Unbundles all the existing schedulable and not lockedBundles and creates newBundles starting from the active and automaticBundlingRules. Finally, the ids of the newly createdBundles are written into the event journal.- Specified by:
executein classValidExecutionBusinessTask<AutomaticBundlingEvent>- Parameters:
event- theAutomaticBundlingEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
initializeLog
Initializes the log for the process.- Parameters:
cache- theBundleEntitiesCache- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getActiveAndAutomaticRules
protected List<BundlingRule> getActiveAndAutomaticRules(PoolKit poolKit) throws DAValidateException, DAException Retrieves all the active and automatic rules.- Parameters:
poolKit- thePoolKit- Returns:
- a list of
BundlingRule - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
unbundleSchedulableBundles
Unbundles the existing schedulableBundles.- Parameters:
poolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getSchedulableBundles
protected List<BOBundleHeader> getSchedulableBundles(PoolKit poolKit) throws DAValidateException, DAException Retrieves the existing schedulable and not lockedBundles.- Parameters:
poolKit- thePoolKit- Returns:
- a list of
BOBundleHeader - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
unbundle
protected void unbundle(List<Long> bundles, PoolKit poolKit) throws DAValidateException, DAException Unbundles theBundles having the given ids.- Parameters:
bundles- the list ofBOBundleHeaderidspoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
bundle
protected List<Long> bundle(List<BundlingRule> rules, BundleEntitiesCache cache, PoolKit poolKit) throws DAValidateException, DAException Creates newBundles starting from the given rules.- Parameters:
rules- the list ofBundlingRulecache- bundle entities cachepoolKit- thePoolKit- Returns:
- a list containing the
BOBundleHeaderids of the newly created bundles - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-