Interface InternalWorklistItem

    • 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 equal getWorklistIDs() 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 return null.
        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 be null.
      • setDescription

        void setDescription​(String description)
        Sets the description of the item.
        Parameters:
        description - The description of this worklist item. This must not be null.
      • 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 be null.
      • 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 be null.
      • 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 be null.
      • 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 be null.
      • 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 be suppressed 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 in WorklistConstants.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 the escalation 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 or null 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 the escalation level by 1.
      • 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 corresponding reply.
        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.
        If null 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. If null 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 this InternalWorklistItem.
      • 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 this InternalWorklistItem, so do not close it; clone it if required longer than this InternalWorklistItem.
      • 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 from AVAILABLE) 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 from AVAILABLE 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 calling storeCurrentState(boolean). This allows to restore the worklists to the state, when the state changed away from AVAILABLE.
        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 and NULL 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 calling storeCurrentState(boolean). This allows to restore the delegation history to the state, when the state changed away from AVAILABLE.
        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 and Integer.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.