Class UserWithLowestLoadSelectionStrategy
java.lang.Object
de.hybris.platform.warehousing.taskassignment.strategy.impl.UserWithLowestLoadSelectionStrategy
- All Implemented Interfaces:
UserSelectionStrategy
Default implementation of
UserSelectionStrategy
UserWithLowestLoadSelectionStrategy selects a user UserModel which have lowest number of tasks assigned to it-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<PrincipalModel>getPosEmployees(WorkflowModel workflow, PrincipalGroupModel principalGroup) Finds the employees linked to the warehouse which the workflow attached consignment is allocated to.getUserForConsignmentAssignment(WorkflowModel workflow) Gets theUserModelto which a consignment should be assignedprotected WorkflowServicevoidsetWorkflowService(WorkflowService workflowService) protected UserModeluserWithLowestLoad(WorkflowModel workflow, WorkflowActionModel workflowAction) Finds theUserModelwith the lowest load
-
Constructor Details
-
UserWithLowestLoadSelectionStrategy
public UserWithLowestLoadSelectionStrategy()
-
-
Method Details
-
getUserForConsignmentAssignment
Description copied from interface:UserSelectionStrategyGets theUserModelto which a consignment should be assigned- Specified by:
getUserForConsignmentAssignmentin interfaceUserSelectionStrategy- Parameters:
workflow- theWorkflowModelto which theConsignmentModelis attached- Returns:
- the
UserModelto which the workflow should be assigned
-
userWithLowestLoad
Finds theUserModelwith the lowest load- Parameters:
workflow- theWorkflowModelworkflowAction- theWorkflowActionModel- Returns:
- the warehouse agent with lowest load
-
getPosEmployees
protected Set<PrincipalModel> getPosEmployees(WorkflowModel workflow, PrincipalGroupModel principalGroup) Finds the employees linked to the warehouse which the workflow attached consignment is allocated to.- Parameters:
workflow- the given consignment workflowprincipalGroup- the principle group which assigned to the workflow action- Returns:
- all employees that belong to the warehouse which the consignment of the workflow is allocated
-
getWorkflowService
-
setWorkflowService
-