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 ofUserSelectionStrategy
UserWithLowestLoadSelectionStrategy selects a userUserModel
which 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.UserModel
getUserForConsignmentAssignment(WorkflowModel workflow)
Gets theUserModel
to which a consignment should be assignedprotected WorkflowService
getWorkflowService()
void
setWorkflowService(WorkflowService workflowService)
protected UserModel
userWithLowestLoad(WorkflowModel workflow, WorkflowActionModel workflowAction)
Finds theUserModel
with the lowest load
-
-
-
Method Detail
-
getUserForConsignmentAssignment
public UserModel getUserForConsignmentAssignment(WorkflowModel workflow)
Description copied from interface:UserSelectionStrategy
Gets theUserModel
to which a consignment should be assigned- Specified by:
getUserForConsignmentAssignment
in interfaceUserSelectionStrategy
- Parameters:
workflow
- theWorkflowModel
to which theConsignmentModel
is attached- Returns:
- the
UserModel
to which the workflow should be assigned
-
userWithLowestLoad
protected UserModel userWithLowestLoad(WorkflowModel workflow, WorkflowActionModel workflowAction)
Finds theUserModel
with the lowest load- Parameters:
workflow
- theWorkflowModel
workflowAction
- 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)
-
-