public class Task extends TaskOrUser
In this particular problem we want to do the assignments in a way that the list of tasks for a given user is ordered. (see e.g. that Higher priority tasks must be resolved first is a soft constraint)
User1: A <- B <- C <- D
User2: E <- F
The initial task of each sequence points to the user that will own all the tasks in the list, so when a solution is created we'll have something like this.
User1 <- A <- B <- C <- D (In this example, User1 is the anchor)
This explains why property "previousTaskOrUser" can be assigned with User or a Task.
BUT the solver builds the solutions in a way that only the first item of the "chain" points to a user. This is how a CHAINED configuration works. And the way the solver knows which must be the fact class that must be used for setting the previousTaskOrUser property is by considering the order in the PlanningVariable configuration.
Modifier and Type | Field and Description |
---|---|
static String |
END_TIME_IN_MINUTES |
static String |
PREVIOUS_TASK_OR_USER |
static String |
START_TIME_IN_MINUTES |
static String |
TASK_RANGE |
static String |
USER_RANGE |
nextTask
id
Constructor and Description |
---|
Task() |
Task(long id,
long processInstanceId,
String processId,
String containerId,
String name,
int priority,
Map<String,Object> inputData) |
Task(long id,
String name,
int priority) |
getNextTask, setNextTask
getId, setId
public static final String PREVIOUS_TASK_OR_USER
public static final String USER_RANGE
public static final String TASK_RANGE
public static final String START_TIME_IN_MINUTES
public static final String END_TIME_IN_MINUTES
public Task()
public Task(long id, String name, int priority)
public long getProcessInstanceId()
public void setProcessInstanceId(long processInstanceId)
public String getProcessId()
public void setProcessId(String processId)
public String getContainerId()
public void setContainerId(String containerId)
public String getName()
public void setName(String name)
public int getPriority()
public void setPriority(int priority)
public boolean isPinned()
public void setPinned(boolean pinned)
public boolean isPublished()
public void setPublished(boolean published)
public Set<OrganizationalEntity> getPotentialOwners()
public void setPotentialOwners(Set<OrganizationalEntity> potentialOwners)
public Set<TypedLabel> getTypedLabels()
public void setTypedLabels(Set<TypedLabel> typedLabels)
public TaskOrUser getPreviousTaskOrUser()
public void setPreviousTaskOrUser(TaskOrUser previousTaskOrUser)
public User getUser()
getUser
in class TaskOrUser
public void setUser(User user)
public Integer getStartTimeInMinutes()
public void setStartTimeInMinutes(Integer startTimeInMinutes)
public Integer getEndTimeInMinutes()
getEndTimeInMinutes
in class TaskOrUser
public void setEndTime(Integer endTimeInMinutes)
public int getDurationInMinutes()
public void setDurationInMinutes(int durationInMinutes)
public String toString()
toString
in class AbstractPersistable
public boolean acceptsAssignedUser()
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.