Class UserWithLowestLoadSelectionStrategy
- java.lang.Object
-
- de.hybris.platform.warehousing.taskassignment.strategy.impl.UserWithLowestLoadSelectionStrategy
-
- All Implemented Interfaces:
UserSelectionStrategy
public class UserWithLowestLoadSelectionStrategy extends java.lang.Object implements UserSelectionStrategy
Default implementation ofUserSelectionStrategyUserWithLowestLoadSelectionStrategy selects a userUserModelwhich have lowest number of tasks assigned to it
-
-
Constructor Summary
Constructors Constructor Description UserWithLowestLoadSelectionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Set<PrincipalModel>getPosEmployees(WorkflowModel workflow, PrincipalGroupModel principalGroup)Finds the employees linked to the warehouse which the workflow attached consignment is allocated to.UserModelgetUserForConsignmentAssignment(WorkflowModel workflow)Gets theUserModelto which a consignment should be assignedprotected WorkflowServicegetWorkflowService()voidsetWorkflowService(WorkflowService workflowService)protected UserModeluserWithLowestLoad(WorkflowModel workflow, WorkflowActionModel workflowAction)Finds theUserModelwith the lowest load
-
-
-
Method Detail
-
getUserForConsignmentAssignment
public UserModel getUserForConsignmentAssignment(WorkflowModel workflow)
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
protected UserModel userWithLowestLoad(WorkflowModel workflow, WorkflowActionModel workflowAction)
Finds theUserModelwith the lowest load- Parameters:
workflow- theWorkflowModelworkflowAction- theWorkflowActionModel- Returns:
- the warehouse agent with lowest load
-
getPosEmployees
protected java.util.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
protected WorkflowService getWorkflowService()
-
setWorkflowService
public void setWorkflowService(WorkflowService workflowService)
-
-