Interface InternalWorklistItem
-
- All Superinterfaces:
PluginDataContainer
,Serializable
,UserAttributeContainer
,WorklistItem
public interface InternalWorklistItem extends WorklistItem
This class represents worklist items internal to the worklist manager server and allows to set various attributes. This includes assignment of agents, delegation of the item as well as adapting the state, dates and the priority. It is intended only for use on the server since a client should not be able to set these attributes.See
WorklistItem
for more information about the relationship betweenInternalWorklistItem
,AdministrativeWorklistItem
andClientWorklistItem
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.aristaflow.adept2.model.worklistmodel.WorklistItem
WorklistItem.Delegation
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
Generated ID for serialisation.static String
WORKLIST_ITEM_CHANGED
A user attribute to indicate the internal logic of an internal worklist that a worklist item has changed even if the property tracker indicates no changes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addedToWorklist(UUID worklistID)
Notifies this item that it has been added to the designated worklist.void
addedToWorklist(UUID worklistID, QualifiedAgent originator)
Notifies this item that it has been added to the designated worklist.void
delegateTo(Set<QualifiedAgent> delegationRecipients, QualifiedAgent delegator, String comment)
Notifies this item that it has been delegated to the designated agents.void
enquireItem(Enquiry enquiry)
Sets this item in enquiry mode which logs the designated enquiry internally for information purpose.void
escalated()
Notifies this item that it has been escalated once more.
This will increase theescalation level
by1
.ParameterDataContext
getAttachedDataContext()
Gets the data context which provides the values of attached data elements.int
getAvailableStateDelegationIndex()
Gets the last position in the delegation history that has been set when callingstoreCurrentState(boolean)
.UUID[]
getAvailableStateWorklistIDs()
Gets the IDs of the worklists this item has been when callingstoreCurrentState(boolean)
.String
getDelegationHandlingProcedureID()
The ID of the delegation handling procedure.List<WorklistItem.Delegation>
getDelegationHistory()
Gets the delegation history of this item, that is, the agents who have delegated this item and the corresponding delegation comments.String
getDistributionHandlingProcedureID()
The ID of the distribution handling procedure.List<Enquiry>
getEnquiryStack()
Gets the enquiry stack of this item, that is, the agent who has started the enquiry, the recipients and the question asked.String
getEscalationHandlingProcedureID()
The ID of the escalation handling procedure for the due date.Set<IndividualWorklistItemSettings>
getIndividualWorklistItemSettings()
Returns a set of all individual worklist item settings which have been set for this worklist item.IndividualWorklistItemSettings
getIndividualWorklistItemSettings(UUID worklistID)
Returns the individual item settings which are stored for the given worklist identified by its unique id.String
getStaffAssignmentRule()
Returns the staff assignment rule, with which this item has been distributed before any delegation has taken place (if at all).Set<QualifiedAgent>
getSubstitutionFrom(UUID worklistID)
Returns the agents being the cause for having this item in the designated worklist.Map<UUID,Set<QualifiedAgent>>
getSubstitutionOriginators()
Gets the substitution originators for all worklists that this item was substituted to.UUID[]
getWorklistIds(boolean inclSuppr)
Gets the UUIDs of all worklists, optionally including suppressed worklist items.UUID[]
getWorklistIDs()
Returns the UUIDs of all worklists, this item belongs to unless it is suppressed.boolean
hasIndividualWorklistItemSettings(UUID worklistId)
Gets whether the worklist with the designated ID has individual worklist item settings.boolean
isAboutToBeSuppressed()
Gets whether this worklist item is about to be suppressed.boolean
isSuppressed()
Gets whether this worklist item and the corresponding activity is temporarily suppressed.void
removeAvailableState()
Removes the available state, that is the worklist IDs this item has been after it got available.void
removeDelegations()
Removes all delegations, that is all data related to a delegation.void
removedFromWorklist(UUID worklistID)
Notifies this item that it has been removed from the designated worklist.Set<QualifiedAgent>
removeSubstitution(UUID worklistId)
Removes the substitution of this worklist item for the designated worklist.void
replyEnquiry(Enquiry reply)
Replies to the current enquiry, that is, the current enquiry is removed and the designated reply is provided to the corresponding originator.void
restoreAvailableState()
Restores the worklists this item belongs to the state right before the state changed away fromAVAILABLE
or right after the item has been delegated.void
setAboutToBeSuppressed()
Sets this worklist item is about to be suppressed.void
setActivityReference(ActivityReference actRef)
Sets the activity reference of the item to the designated one.void
setAssignedAgent(QualifiedAgent agent)
Sets the agent to the designated agent when this item is assigned.void
setAssignmentDate(long timestamp)
Sets the timestamp when this item has been assigned to the current user and therefore the current worklist.void
setAttachedDataContext(ParameterDataContext dataContext)
Sets the data context which provides the values of attached data elements.void
setComplexity(long complexity)
Sets the (estimated) complexity of the item to the designated one.void
setDescription(String description)
Sets the description of the item.void
setDueDate(long timestamp)
Sets the timestamp as absolute date when this item has to be finished.void
setEscalation(long timestamp, String escalationHandlingProcedureID)
Sets the escalation which includes the timestamp as absolute date and the escalation handling procedure.void
setGroupId(UUID groupId)
Sets the group ID of the item to the designated one.void
setIconId(UUID iconId)
Sets the icon ID of the item to the designated one.void
setPluginData(PluginData pluginData)
Sets the data of the designated plugin using an internal extension point.void
setPluginData(String extPointId, PluginData pluginData)
Sets the data of the designated plugin for the designated extension point.void
setPriority(int priority)
Sets the priority of the item as a simple integer.void
setProcessInstanceName(String instName)
Sets the process instance name of the item.void
setState(WorklistConstants.WorklistItemState state)
Sets the state of this worklist item (e.g. if it is started or available).void
setSuppressed(boolean suppressed)
Sets this worklist item to (not) suppressed indicating that the corresponding activity cannot be started, (un-)selected or resumed.void
setTitle(String title)
Sets the title of the item.void
storeCurrentState(boolean delegated)
Stores the current state of the worklists this item currently belongs to (including delegation target worklists).boolean
updateIndividualWorklistItemSettings(IndividualWorklistItemSettings itemSettings)
Updates the individual item settings by taking them from the given settings.-
Methods inherited from interface de.aristaflow.adept2.model.common.PluginDataContainer
getPluginData, getPluginDatas, getSupportedPlugins
-
Methods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValue
-
Methods inherited from interface de.aristaflow.adept2.model.worklistmodel.WorklistItem
equals, getActivationDate, getActivityReference, getAssignedAgent, getAssignmentDate, getComplexity, getCurrentDelegation, getCurrentDelegationLevel, getCurrentEnquiry, getCurrentEscalationLevel, getDescription, getDueDate, getEscalationDate, getGroupId, getIconID, getID, getPriority, getProcessInstanceName, getProcessTemplateName, getProcessTemplateVersion, getProcessType, getRepliedEnquiry, getState, getTitle
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
Generated ID for serialisation.- See Also:
- Constant Field Values
-
WORKLIST_ITEM_CHANGED
static final String WORKLIST_ITEM_CHANGED
A user attribute to indicate the internal logic of an internal worklist that a worklist item has changed even if the property tracker indicates no changes.- See Also:
- Constant Field Values
-
-
Method Detail
-
getWorklistIDs
UUID[] getWorklistIDs()
Returns the UUIDs of all worklists, this item belongs to unless it is suppressed.- Returns:
- The UUIDs of the worklists, this item belongs to. An empty array if this item does not belong to any worklist, e. g. it is currently suppressed.
-
getWorklistIds
UUID[] getWorklistIds(boolean inclSuppr)
Gets the UUIDs of all worklists, optionally including suppressed worklist items. Since suppression applies to all worklists, these IDs equalgetWorklistIDs()
when excluding suppression.- Parameters:
inclSuppr
- Whether to also get the worklist IDs this item belongs to when promoted. This flag is irrelevant if this item is not suppressed.- Returns:
- The UUIDs of all worklists, this suppressed item belongs to, optionally including the worklists it is currently suppressed for.
-
addedToWorklist
void addedToWorklist(UUID worklistID)
Notifies this item that it has been added to the designated worklist. The worklist update does not take place inside of this method. It is merely for tracking purpose (c.f.getWorklistIDs()
).- Parameters:
worklistID
- The worklist this item has been added to.
-
addedToWorklist
void addedToWorklist(UUID worklistID, QualifiedAgent originator)
Notifies this item that it has been added to the designated worklist. The worklist update does not take place inside of this method. It is merely for tracking purpose (c.f.getWorklistIDs()
).- Parameters:
worklistID
- The worklist this item has been added to.originator
- The originator (absentee) of the substitution to this worklist.
-
removedFromWorklist
void removedFromWorklist(UUID worklistID)
Notifies this item that it has been removed from the designated worklist. The worklist update does not take place inside of this method. It is merely for tracking purpose (c.f.getWorklistIDs()
).- Parameters:
worklistID
- The worklist this item has been removed from.
-
removeSubstitution
Set<QualifiedAgent> removeSubstitution(UUID worklistId)
Removes the substitution of this worklist item for the designated worklist. This returns all agents of whose absence caused the substitution. If this item is not on the designated worklist, this will do nothing and returnnull
.
This does not remove this worklist item from the designated worklist! This has to be done right afterwards.- Parameters:
worklistId
- The worklist this item is on as substitution.- Returns:
- All absent agents that caused the substitutuion to the designated worklist.
null
in case this worklist item is not on the the designated worklist or it is on the worklist but not from a substitution.
-
getSubstitutionFrom
Set<QualifiedAgent> getSubstitutionFrom(UUID worklistID)
Returns the agents being the cause for having this item in the designated worklist. This is similar to individual worklist item settings which are all managed for different worklists by the very same internal worklist item. Just like the individual worklist item settings the substitution information will never be deleted. This tracks the substitution information the complete lifetime of the internal worklist item.- Parameters:
worklistID
-- Returns:
- set of agents whose absence caused the substitution or null if none present
-
setTitle
void setTitle(String title)
Sets the title of the item.- Parameters:
title
- The title of this worklist item. This must not benull
.
-
setDescription
void setDescription(String description)
Sets the description of the item.- Parameters:
description
- The description of this worklist item. This must not benull
.
-
setActivityReference
void setActivityReference(ActivityReference actRef)
Sets the activity reference of the item to the designated one.- Parameters:
actRef
- The activity reference to set in the item. This must not benull
.
-
setIconId
void setIconId(UUID iconId)
Sets the icon ID of the item to the designated one.- Parameters:
iconId
- The icon ID to set in the item. This may benull
.
-
setGroupId
void setGroupId(UUID groupId)
Sets the group ID of the item to the designated one.- Parameters:
groupId
- The group ID to set in the item. This may benull
.
-
setComplexity
void setComplexity(long complexity)
Sets the (estimated) complexity of the item to the designated one.- Parameters:
complexity
- The (estimated) complexity to set in the item.
-
setProcessInstanceName
void setProcessInstanceName(String instName)
Sets the process instance name of the item.- Parameters:
instName
- The process instance name of this worklist item. This must not benull
.
-
getStaffAssignmentRule
String getStaffAssignmentRule()
Returns the staff assignment rule, with which this item has been distributed before any delegation has taken place (if at all).- Returns:
- The staff assignment rule which has been used for the initial distribution of this item.
-
isSuppressed
boolean isSuppressed()
Gets whether this worklist item and the corresponding activity is temporarily suppressed. Such an activity cannot be started, (un-)selected or resumed.- Returns:
- Whether this worklist item and the corresponding activity is temporarily suppressed.
-
isAboutToBeSuppressed
boolean isAboutToBeSuppressed()
Gets whether this worklist item is about to be suppressed. In this case adding the item to worklists is only simulated. This state is only transient, the item will besuppressed
shortly.- Returns:
- Whether this worklist item is about to be suppressed.
-
setState
void setState(WorklistConstants.WorklistItemState state)
Sets the state of this worklist item (e.g. if it is started or available).- Parameters:
state
- The new state of this worklist item.
-
setAboutToBeSuppressed
void setAboutToBeSuppressed()
Sets this worklist item is about to be suppressed.
-
setSuppressed
void setSuppressed(boolean suppressed)
Sets this worklist item to (not) suppressed indicating that the corresponding activity cannot be started, (un-)selected or resumed.- Parameters:
suppressed
- Whether to (un-)suppress this worklist item.
-
setPriority
void setPriority(int priority)
Sets the priority of the item as a simple integer. Corresponding named constants are declared inWorklistConstants.Priority
- Parameters:
priority
- The priority of the item.
-
setAssignmentDate
void setAssignmentDate(long timestamp)
Sets the timestamp when this item has been assigned to the current user and therefore the current worklist. If this item is reassigned due to delegation, the timestamp needs to be set again.- Parameters:
timestamp
- The time when this item has been (re-)assigned to the corresponding user.
-
setEscalation
void setEscalation(long timestamp, String escalationHandlingProcedureID)
Sets the escalation which includes the timestamp as absolute date and the escalation handling procedure. Normally escalation takes place some time before the due date, for instance, after 80% of the time span between activation date and due date have passed.
Use a negative value and null as ID if this item has no escalation date.- Parameters:
timestamp
- The due date (absolute) when this item is escalated.escalationHandlingProcedureID
- The ID of the escalation handling procedure
-
setDueDate
void setDueDate(long timestamp)
Sets the timestamp as absolute date when this item has to be finished. This is just for information purpose for the user. Escalation is based on theescalation time
. Use a negative if this item has no due date.- Parameters:
timestamp
- The due date (absolute) when this item has to be finished for displaying to the user.
-
setAssignedAgent
void setAssignedAgent(QualifiedAgent agent)
Sets the agent to the designated agent when this item is assigned. If the assignment is removed (for instance, when deselecting), use null.- Parameters:
agent
- The agent to whom this item has been assigned ornull
in case this item is unassigned again.
-
getEscalationHandlingProcedureID
String getEscalationHandlingProcedureID()
The ID of the escalation handling procedure for the due date. The method returns null, if the item does not support escalation handling for the due date.- Returns:
- The ID of the escalation handling procedure.
- See Also:
EscalationHandling.getID()
-
getDistributionHandlingProcedureID
String getDistributionHandlingProcedureID()
The ID of the distribution handling procedure. The method returns null, if the item does not support distribution handling.- Returns:
- The ID of the distribution handling procedure.
- See Also:
DistributionHandling.getID()
-
getDelegationHandlingProcedureID
String getDelegationHandlingProcedureID()
The ID of the delegation handling procedure. The method returns null, if the item does not support delegation handling.- Returns:
- The ID of the delegation handling procedure.
- See Also:
DelegationHandling.getID()
-
escalated
void escalated()
Notifies this item that it has been escalated once more.
This will increase theescalation level
by1
.
-
delegateTo
void delegateTo(Set<QualifiedAgent> delegationRecipients, QualifiedAgent delegator, String comment)
Notifies this item that it has been delegated to the designated agents. The corresponding worklist update(s) does not take place inside of this method. It is merely for tracking purpose (c.f.getStaffAssignmentRule()
,WorklistItem.getCurrentDelegationLevel()
,WorklistItem.getCurrentDelegation()
).
This will increase thedelegation level
by1
.- Parameters:
delegationRecipients
- The agents to whom this item is delegated.delegator
- The agent who delegates this worklist item.comment
- A comment for the delegator why this item has been delegated. This is optional and may therefore be null.
-
getDelegationHistory
List<WorklistItem.Delegation> getDelegationHistory()
Gets the delegation history of this item, that is, the agents who have delegated this item and the corresponding delegation comments. The index in the list corresponds to the particular delegation level starting with 0 for the initial delegation.- Returns:
- A list containing the delegation history of this item. The index in the list corresponds to the particular delegation level starting with 0 for the initial delegation.
-
removeDelegations
void removeDelegations()
Removes all delegations, that is all data related to a delegation. This is required for redistributing an item which ignores and removes all delegations. However, strong restrictions apply to when this is allowed! Only call this method if you are absolutely sure what you are doing!
-
getEnquiryStack
List<Enquiry> getEnquiryStack()
Gets the enquiry stack of this item, that is, the agent who has started the enquiry, the recipients and the question asked. The stack starts at's index 0 and the most recent enquiry is at index size -1.- Returns:
- A List containing the enquiry stack of this item. The first item of the stack lies at index 0 and the most recent one at index size -1.
-
enquireItem
void enquireItem(Enquiry enquiry)
Sets this item in enquiry mode which logs the designated enquiry internally for information purpose. Enquiries are stacked so this method can be called consecutively. Every enquiry has to have a correspondingreply
.- Parameters:
enquiry
- The enquiry which has been made for this item for information purpose.- See Also:
WorklistItem.getCurrentEnquiry()
-
replyEnquiry
void replyEnquiry(Enquiry reply)
Replies to the current enquiry, that is, the current enquiry is removed and the designated reply is provided to the corresponding originator.
Ifnull
is provided, the current reply and the topmost enquiry will be dropped.- Parameters:
reply
- The enquiry-object containing the corresponding originator who will receive the reply as well as the reply. Ifnull
is provided, the current reply and the topmost enquiry will be dropped.
-
getAttachedDataContext
ParameterDataContext getAttachedDataContext()
Gets the data context which provides the values of attached data elements. This allows display these values in worklists and use them for filtering and ordering.- Returns:
- The data context containing data values attached to this EBP which allow for filtering
and ordering worklists. The ParameterDataContext will be
coupled to this
InternalWorklistItem
, so do not close it; clone it if required longer than thisInternalWorklistItem
.
-
setAttachedDataContext
void setAttachedDataContext(ParameterDataContext dataContext)
Sets the data context which provides the values of attached data elements. This is required for updating the parameter data context from the execution manager. This in turn removes the need to store the data context in the worklist manager.- Parameters:
dataContext
- The data context containing data values attached to this EBP which allow for filtering and ordering worklists.
The ParameterDataContext will be coupled to thisInternalWorklistItem
, so do not close it; clone it if required longer than thisInternalWorklistItem
.
-
storeCurrentState
void storeCurrentState(boolean delegated)
Stores the current state of the worklists this item currently belongs to (including delegation target worklists). This needs to be called before changing the worklists (changing the state away fromAVAILABLE
) or after changing the worklists when delegating. If an item is reset, this state needs to be restored.- Parameters:
delegated
- Whether the storing is done due to a delegation (or due to a state change otherwise).
-
restoreAvailableState
void restoreAvailableState()
Restores the worklists this item belongs to the state right before the state changed away fromAVAILABLE
or right after the item has been delegated. The state has to be stored before appropriately and it will be removed after it has been restored. If the state has not been stored, this operation does nothing.- See Also:
storeCurrentState(boolean)
-
removeAvailableState
void removeAvailableState()
Removes the available state, that is the worklist IDs this item has been after it got available. If the item gets available again afterwards, a distribution will take place.
-
getAvailableStateWorklistIDs
UUID[] getAvailableStateWorklistIDs()
Gets the IDs of the worklists this item has been when callingstoreCurrentState(boolean)
. This allows to restore the worklists to the state, when the state changed away fromAVAILABLE
.- Returns:
- The IDs of the worklists that item belonged to when storing the
current state (before changing the state away from
AVAILABLE
. The array will be empty if it has not been in a worklist andNULL
if no state has been stored yet or since the last restoring.
-
getAvailableStateDelegationIndex
int getAvailableStateDelegationIndex()
Gets the last position in the delegation history that has been set when callingstoreCurrentState(boolean)
. This allows to restore the delegation history to the state, when the state changed away fromAVAILABLE
.- Returns:
- The index of last delegation history entry that was set when
storing the current state (before changing the state away from
AVAILABLE
. The index will be -1 if there has not been a delegation history andInteger.MIN_VALUE
if no state has been stored yet or since the last restoring.
-
hasIndividualWorklistItemSettings
boolean hasIndividualWorklistItemSettings(UUID worklistId)
Gets whether the worklist with the designated ID has individual worklist item settings.- Parameters:
worklistId
- The ID of the worklist to check for having individual worklist item settings.- Returns:
- Whether the worklist with the designated ID has individual worklist item settings.
-
getIndividualWorklistItemSettings
IndividualWorklistItemSettings getIndividualWorklistItemSettings(UUID worklistID)
Returns the individual item settings which are stored for the given worklist identified by its unique id.
If there are currently no settings store for the specified worklist an object with the default settings will be returned.- Parameters:
worklistID
- The (unique) ID of the worklist to get the individual item settings.- Returns:
- The individual worklist item settings belonging to this item and the given worklist.
-
updateIndividualWorklistItemSettings
boolean updateIndividualWorklistItemSettings(IndividualWorklistItemSettings itemSettings)
Updates the individual item settings by taking them from the given settings.- Parameters:
itemSettings
- The settings to read the individual settings from.- Returns:
- Whether this method call actually caused any changes. This information can be used to determine if changes need to be propagated to the client worklists.
-
getIndividualWorklistItemSettings
Set<IndividualWorklistItemSettings> getIndividualWorklistItemSettings()
Returns a set of all individual worklist item settings which have been set for this worklist item.- Returns:
- A set of all individual worklist item settings which have been set for this worklist item.
-
setPluginData
void setPluginData(PluginData pluginData)
Sets the data of the designated plugin using an internal extension point.- Parameters:
pluginData
- The plugin data (including the name of the plugin) to set the data of.
-
setPluginData
void setPluginData(String extPointId, PluginData pluginData)
Sets the data of the designated plugin for the designated extension point.- Parameters:
extPointId
- The ID of the extension point of the plugin.pluginData
- The plugin data (including the name of the plugin) to set the data of.
-
getSubstitutionOriginators
Map<UUID,Set<QualifiedAgent>> getSubstitutionOriginators()
Gets the substitution originators for all worklists that this item was substituted to.- Returns:
- mapping between worklistIDs and the substitution originators.
-
-