Package com.appiancorp.suiteapi.process
Class Assignment
java.lang.Object
com.appiancorp.suiteapi.process.Assignment
- All Implemented Interfaces:
JSONable
,JSONCacheable
,XMLable
,AppianTypeHolder
,Serializable
Holds the configuration for the assignment of an attended node. An
assignment can be to users, groups, roles, or rules. A role is someone
associated with the process, such as the initiator. A rule is a function
that runs to determine assignment, such as one that picks the person who
costs the least or is least burdened from a database. Once the assignee pool
has been configured (the assignees field in this object), the
assignment function must run to choose a number of users from the pool. The
task is ultimately assigned to the users chosen by the assignment function.
Multiple instances of a node can run in a process because of Spawning, Recurrence or Loops in the process model. In these cases, the process engine provides separate assignment functions which can be used to either distribute the tasks across the users in the assignment pool or assign the next instance of the tasks to the user who completed previous instances of the task. It should be noted that assignment can be distributed only when the node is set to spawn and task can be assigned to previous assignee only when node is not set to spawn.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A user, group, role, or function that is assigned to a task. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant indicating that acceptance always happens automatically.static final int
Constant indicating that acceptance happens automatically only if the size of the assignment pool is 1.static final int
Constant indicating that acceptance must be performed manually by the runtime user.static final int
Constant indicating that an assignment is to an actorstatic final int
Constant indicating that an assignment is to an expressionstatic final int
Deprecated.This assignment type is not used.static final int
Constant indicating that an assignment is to a group.static final int
Constant indicating that an assignment is to a role.static final int
Constant indicating that an assignment is to a user.static final int
Constant indicating that the spawned instances of the tasks should be distributed across the users in the assignment pool.static final int
Constant indicating that the new instance of the task should be assigned to the previous assignee of this task.static final Long
Allowed to reject the task and to reassign the task to anyone.static final Long
Allowed to reject the task and to reassign the task within the assignment pool.static final Long
Allowed only to reject the task.Fields inherited from interface com.appiancorp.suiteapi.common.JSONable
hiddenAttributes$TRANSIENT
Fields inherited from interface com.appiancorp.suiteapi.common.XMLable
DEFAULT_BUFFER_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fillInAppianTypes
(AppianTypeCache cache_) Adds the primary keys of each assignees that is a user or group to the appian type cache.Returns the assignees for this AssignmentDeprecated.UsegetAssignees
instead; seesetAssignmentFunction(com.appiancorp.suiteapi.process.ActivityClass)
for an alternative method of setting the assignment.Deprecated.The value retrieved by this method is not used.Returns the set of attributes (properties) that should not be included in the JSON representation of the object.Returns the type of the Assignee function to use when multiple instances of are nodes executed in a process.void
setAcceptMode
(Long acceptMode_) sets the acceptmodevoid
setAssignees
(Assignment.Assignee[] assignees_) sets the assignees for this Assignmentvoid
setAssignmentFunction
(ActivityClass assignmentFunction_) Deprecated.Instead, set the assignment by callingsetAssignees(com.appiancorp.suiteapi.process.Assignment.Assignee[])
with anAssignee
of typeASSIGNEE_TYPE_EXPRESSIONS
with thevalue
set to an expression.void
setAssignmentPosition
(Long assignmentPosition_) Deprecated.The value set by this method is not used.void
setMultipleInstanceAssigneeType
(Integer multipleInstanceAssigneeType_) Sets the type of the Assignee function when multiple instances of the nodes are executed in a processtoXML()
Generates an XML representation of this object (including all child objects).void
toXML
(StringBuilder buffer_) Appends an XML representation of this object to the given buffer.
-
Field Details
-
ASSIGNEE_TYPE_EXPRESSIONS
public static final int ASSIGNEE_TYPE_EXPRESSIONSConstant indicating that an assignment is to an expression- See Also:
-
ASSIGNEE_TYPE_USERS
public static final int ASSIGNEE_TYPE_USERSConstant indicating that an assignment is to a user.- See Also:
-
ASSIGNEE_TYPE_GROUPS
public static final int ASSIGNEE_TYPE_GROUPSConstant indicating that an assignment is to a group.- See Also:
-
ASSIGNEE_TYPE_ROLE
public static final int ASSIGNEE_TYPE_ROLEConstant indicating that an assignment is to a role.- See Also:
-
ASSIGNEE_TYPE_FUNCTION
Deprecated.This assignment type is not used.Constant indicating that an assignment is chosen by a function. -
ASSIGNEE_TYPE_ACTOR
public static final int ASSIGNEE_TYPE_ACTORConstant indicating that an assignment is to an actor- See Also:
-
PRIVILEGE_REJECT_ONLY
Allowed only to reject the task. -
PRIVILEGE_REASSIGN_WITHIN_POOL
Allowed to reject the task and to reassign the task within the assignment pool. -
PRIVILEGE_REASSIGN_TO_ANY
Allowed to reject the task and to reassign the task to anyone. -
ACCEPT_AUTO_ALWAYS
public static final int ACCEPT_AUTO_ALWAYSConstant indicating that acceptance always happens automatically.- See Also:
-
ACCEPT_AUTO_IF_ONLY_ASSIGNEE
public static final int ACCEPT_AUTO_IF_ONLY_ASSIGNEEConstant indicating that acceptance happens automatically only if the size of the assignment pool is 1.- See Also:
-
ACCEPT_MANUAL
public static final int ACCEPT_MANUALConstant indicating that acceptance must be performed manually by the runtime user.- See Also:
-
MULTIPLE_INSTANCE_PREVIOUS_ASSIGNEE
public static final int MULTIPLE_INSTANCE_PREVIOUS_ASSIGNEEConstant indicating that the new instance of the task should be assigned to the previous assignee of this task. This option will be ignored when the node is set to spawn multiple instances.- See Also:
-
MULTIPLE_INSTANCE_DISTRIBUTE_ASSIGNEE
public static final int MULTIPLE_INSTANCE_DISTRIBUTE_ASSIGNEEConstant indicating that the spawned instances of the tasks should be distributed across the users in the assignment pool. When the node is not set to spawn multiple instances, then this assignment option is ignored.- See Also:
-
-
Constructor Details
-
Assignment
public Assignment()
-
-
Method Details
-
getHiddenAttributes
Description copied from interface:JSONable
Returns the set of attributes (properties) that should not be included in the JSON representation of the object.- Specified by:
getHiddenAttributes
in interfaceJSONable
- Returns:
- the set of hidden attributes
-
getAssignees
Returns the assignees for this Assignment- Returns:
- assignees for the Assignment
-
setAssignees
sets the assignees for this Assignment- Parameters:
assignees_
- the assignees to set for this Assignment
-
getAssignmentFunction
Deprecated.UsegetAssignees
instead; seesetAssignmentFunction(com.appiancorp.suiteapi.process.ActivityClass)
for an alternative method of setting the assignment.- Returns:
- the
ActivityClass
which is the AssignmentFunction for this assignment
-
setAssignmentFunction
Deprecated.Instead, set the assignment by callingsetAssignees(com.appiancorp.suiteapi.process.Assignment.Assignee[])
with anAssignee
of typeASSIGNEE_TYPE_EXPRESSIONS
with thevalue
set to an expression.sets the AcitvityClass which is the assignment function for this assignment- Parameters:
assignmentFunction_
- the assignment activity class for this assignment
-
toXML
Description copied from interface:XMLable
Generates an XML representation of this object (including all child objects). A typical implementation is to create a newStringBuilder
and calltoXML( StringBuilder )
on it. -
toXML
Appends an XML representation of this object to the given buffer. -
getAssignmentPosition
Deprecated.The value retrieved by this method is not used.- Returns:
- the index into the list of preactivites at which assignment is performed.
-
setAssignmentPosition
Deprecated.The value set by this method is not used.Determines when assignment should run in the list of preactivities.- Parameters:
assignmentPosition_
- zero-based index into the list of preactivities, determining when assignement should be performed.
-
getAcceptMode
- Returns:
- accept mode, as one of the ACCEPT_XXX constants.
-
setAcceptMode
sets the acceptmode- Parameters:
acceptMode_
- the acceptMode to set, which should be one of the ACCEPT_XXX constants.
-
getMultipleInstanceAssigneeType
Returns the type of the Assignee function to use when multiple instances of are nodes executed in a process. -
setMultipleInstanceAssigneeType
Sets the type of the Assignee function when multiple instances of the nodes are executed in a process- Parameters:
multipleInstanceAssigneeType_
- Assignment.MULTIPLE_INSTANCE_PREVIOUS_ASSIGNEE or Assignment.MULTIPLE_INSTANCE_DISTRIBUTE_ASSIGNEE
-
fillInAppianTypes
Adds the primary keys of each assignees that is a user or group to the appian type cache.- Specified by:
fillInAppianTypes
in interfaceAppianTypeHolder
- Parameters:
cache_
- cache of Appian-typed objects.
-