com.bea.wli.worklist.api
Class TaskSelector

java.lang.Object
  extended bycom.bea.wli.worklist.api.TaskSelector
All Implemented Interfaces:
Serializable

public final class TaskSelector
extends Object
implements Serializable

TaskSelector is used to select tasks based on specific properties.

A value for querying can be set against interested properties. If the value is not null, it will be used to filter tasks. Null values and empty arrays (applicable in case of String and String[]) will not be used for filtering.

If multiple querying conditions are specified, only the tasks fulfilling all the conditions will be selected. This selector also allows the results to be sorted in ascending or descending order.

To search for tasks without assignees, use an Assignee object without user or group. Note that if Assignee is part of sorting criteria, only tasks with assignees will be returned.

For sorting the results, use the setSortByXXX(short order) methods. The order parameter indicates the precedence of the sort criteria as well as sorting in descending order or ascending order.

A negative order parameter will result in descending sort order, while a positive parameter will result in ascending sort order.

The absolute value of the order parameter denotes the relative precedence of the sort criteria. A smaller absolute value indicates that the criteria be sorted first.

The following example illustrates the usage:

setSortByPriority((short)1);
setSortByTaskName((short)-2);

This means that the tasks will be sorted first by priority in ascending order, followed by sorting on task names in descending order. If the same order parameter is given to multiple criteria, the relative sort order among the criteria is not guaranteed. If the order parameter given is Short.MAX_VALUE, then the criteria will not take effect at all.

Some special criteria accept wildcard characters: % stands for any sequence of characters, _ stands for any single character.
You can escape these characters using \. i.e. %a_b\%%

See Also:
Serialized Form

Constructor Summary
TaskSelector()
          Construct a new empty task selector.
TaskSelector(String[] taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String[] owners, String[] claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType[] stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String[] parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String[] listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String[] propertyNames, String[] propertyValues, boolean[] isPropertyValuePattern)
          Construct a new task selector.
TaskSelector(String[] taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String[] owners, String[] claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType[] stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String[] parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String[] listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String[] propertyNames, String[] propertyValues, boolean[] isPropertyValuePattern, boolean includeTaskRequest, boolean includeTaskResponse)
          Construct a new task selector.
TaskSelector(String[] taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String[] owners, String[] claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType[] stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String[] parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String[] listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String[] propertyNames, String[] propertyValues, boolean[] isPropertyValuePattern, boolean includeTaskRequest, boolean includeTaskResponse, boolean includeTaskProperties)
          Construct a new task selector.
TaskSelector(String[] taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String[] owners, String[] claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType[] stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String[] parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String[] listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String propertyName, String propertyValue, boolean isPropertyValuePattern)
          Construct a new task selector.
TaskSelector(String[] taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String[] owners, String[] claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType[] stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String[] parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String[] listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String propertyName, String propertyValue, boolean isPropertyValuePattern, boolean includeTaskRequest, boolean includeTaskResponse)
          Construct a new task selector.
TaskSelector(String[] taskIds, String taskName, boolean isNamePattern, String description, boolean isDescriptionPattern, String comment, boolean isCommentPattern, String[] owners, String[] claimants, Assignee assignee, Integer minPriority, Integer maxPriority, StateType[] stateTypes, String parentProcessUri, boolean isParentProcessUriPattern, String[] parentProcessIds, String listeningProcessUri, boolean isListeningProcessUriPattern, String[] listeningProcessIds, Date completionDueDateBefore, Date completionDueDateAfter, Date claimDueDateBefore, Date claimDueDateAfter, Date creationDateBefore, Date creationDateAfter, Boolean canBeReassigned, Boolean canBeReturned, Boolean canBeAborted, String propertyName, String propertyValue, boolean isPropertyValuePattern, boolean includeTaskRequest, boolean includeTaskResponse, boolean includeTaskProperties)
          Construct a new task selector.
 
Method Summary
 void addProperties(String[] propertyNames, String[] propertyValues, boolean[] isPatternFlags)
           
 void addProperty(String propertyName, String propertyValue, boolean isPattern)
           
 Assignee getAssignee()
           
 Boolean getCanBeAborted()
           
 Boolean getCanBeReassigned()
           
 Boolean getCanBeReturned()
           
 String[] getClaimants()
           
 Date getClaimDueDateAfter()
           
 Date getClaimDueDateBefore()
           
 String getComment()
           
 Date getCompletedDateAfter()
           
 Date getCompletedDateBefore()
           
 Date getCompletionDueDateAfter()
           
 Date getCompletionDueDateBefore()
           
 Date getCreationDateAfter()
           
 Date getCreationDateBefore()
           
 String getDescription()
           
 boolean getIncludeTaskProperties()
           
 boolean getIncludeTaskRequestMessage()
           
 boolean getIncludeTaskResponseMessage()
           
 String[] getListeningProcessIds()
           
 String getListeningProcessUri()
           
 Integer getMaxPriority()
           
 int getMaxTasksReturned()
           
 Integer getMinPriority()
           
 String[] getOwners()
           
 String[] getParentProcessIds()
           
 String getParentProcessUri()
           
 String getPropertyName()
          Deprecated. Use getPropertyNames() instead.
 String[] getPropertyNames()
           
 String getPropertyValue()
          Deprecated. Use getPropertyValue(String propertyName)
 String getPropertyValue(String propertyName)
          Get the property value for the given property.
 short getSortByAssignee()
           
 short getSortByCanBeAborted()
           
 short getSortByCanBeReassigned()
           
 short getSortByCanBeReturned()
           
 short getSortByClaimant()
           
 short getSortByClaimDueDate()
           
 short getSortByComment()
           
 short getSortByCompletedDate()
           
 short getSortByCompletionDueDate()
           
 short getSortByCreationDate()
           
 short getSortByDescription()
           
 short getSortByListeningProcessId()
           
 short getSortByListeningProcessUri()
           
 short getSortByOwner()
           
 short getSortByParentProcessId()
           
 short getSortByParentProcessUri()
           
 short getSortByPriority()
           
 short getSortByPropertyValue()
           
 short getSortByStateType()
           
 short getSortByTaskId()
           
 short getSortByTaskName()
           
 StateType[] getStateTypes()
           
 String[] getTaskIds()
           
 String getTaskName()
           
 boolean isCommentPattern()
           
 boolean isDescriptionPattern()
           
 boolean isListeningProcessUriPattern()
           
 boolean isParentProcessUriPattern()
           
 boolean isPropertyValuePattern()
          Deprecated. Use isPropertyValuePattern(String propertyName)
 boolean isPropertyValuePattern(String propertyName)
          To check if the property value is a pattern.
 boolean isSingleton()
           
 boolean isTaskNamePattern()
           
 void setAssignee(Assignee assignee)
          To search for tasks without assignees, use an Assignee object without user or group.
 void setCanBeAborted(Boolean canBeAborted)
           
 void setCanBeReassigned(Boolean canBeReassigned)
           
 void setCanBeReturned(Boolean canBeReturned)
           
 void setClaimants(String[] claimants)
           
 void setClaimDueDateAfter(Date claimDueDateAfter)
           
 void setClaimDueDateBefore(Date claimDueDateBefore)
           
 void setComment(String comment, boolean isPattern)
           
 void setCompletedDateAfter(Date completedDateAfter)
           
 void setCompletedDateBefore(Date completedDateBefore)
           
 void setCompletionDueDateAfter(Date completionDueDateAfter)
           
 void setCompletionDueDateBefore(Date completionDueDateBefore)
           
 void setCreationDateAfter(Date creationDateAfter)
           
 void setCreationDateBefore(Date creationDateBefore)
           
 void setDescription(String description, boolean isPattern)
           
 void setIncludeTaskProperties(boolean include)
           
 void setIncludeTaskRequestMessage(boolean include)
           
 void setIncludeTaskResponseMessage(boolean include)
           
 void setListeningProcessIds(String[] listeningProcessIds)
           
 void setListeningProcessUri(String listeningProcessUri, boolean isPattern)
           
 void setMaxPriority(Integer maxPriority)
           
 void setMaxTasksReturned(int count)
           
 void setMinPriority(Integer minPriority)
           
 void setOwners(String[] owners)
           
 void setParentProcessIds(String[] parentProcessIds)
           
 void setParentProcessUri(String parentProcessUri, boolean isPattern)
           
 void setPropertyName(String propertyName)
           
 void setPropertyNames(String[] propertyNames)
           
 void setPropertyValue(String propertyValue, boolean isPattern)
          Deprecated. Use setPropertyValue(String propertyName, String propertyValue, boolean isPattern)
 void setPropertyValue(String propertyName, String propertyValue, boolean isPattern)
          Set the property to the new value.
 void setSortByAssignee(short order)
          If Assignee is part of sorting criteria, only tasks with assignees will be returned.
 void setSortByCanBeAborted(short order)
           
 void setSortByCanBeReassigned(short order)
           
 void setSortByCanBeReturned(short order)
           
 void setSortByClaimant(short order)
           
 void setSortByClaimDueDate(short order)
           
 void setSortByComment(short order)
           
 void setSortByCompletedDate(short order)
           
 void setSortByCompletionDueDate(short order)
           
 void setSortByCreationDate(short order)
           
 void setSortByDescription(short order)
           
 void setSortByListeningProcessId(short order)
           
 void setSortByListeningProcessUri(short order)
           
 void setSortByOwner(short order)
           
 void setSortByParentProcessId(short order)
           
 void setSortByParentProcessUri(short order)
           
 void setSortByPriority(short order)
           
 void setSortByPropertyValue(short order)
           
 void setSortByStateType(short order)
           
 void setSortByTaskId(short order)
           
 void setSortByTaskName(short order)
           
 void setStateTypes(StateType[] stateTypes)
          For querying tasks at different states, use the static constants in the StateType class instead of using the constructor.
 void setTaskIds(String[] taskIds)
           
 void setTaskName(String taskName, boolean isPattern)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskSelector

public TaskSelector()
Construct a new empty task selector. If an empty task selector is passed to the worklist manager, it will return all the tasks in the database with no sorting applied.


TaskSelector

public TaskSelector(String[] taskIds,
                    String taskName,
                    boolean isNamePattern,
                    String description,
                    boolean isDescriptionPattern,
                    String comment,
                    boolean isCommentPattern,
                    String[] owners,
                    String[] claimants,
                    Assignee assignee,
                    Integer minPriority,
                    Integer maxPriority,
                    StateType[] stateTypes,
                    String parentProcessUri,
                    boolean isParentProcessUriPattern,
                    String[] parentProcessIds,
                    String listeningProcessUri,
                    boolean isListeningProcessUriPattern,
                    String[] listeningProcessIds,
                    Date completionDueDateBefore,
                    Date completionDueDateAfter,
                    Date claimDueDateBefore,
                    Date claimDueDateAfter,
                    Date creationDateBefore,
                    Date creationDateAfter,
                    Boolean canBeReassigned,
                    Boolean canBeReturned,
                    Boolean canBeAborted,
                    String propertyName,
                    String propertyValue,
                    boolean isPropertyValuePattern)
Construct a new task selector. It allows only one property value to be set.

Parameters:
taskIds - The unique Task identifiers
taskName - The task name
isNamePattern - true if name is a pattern, else false
description - the task description
isDescriptionPattern - true if description is a pattern, else false
comment - the task comment
isCommentPattern - true if comment is a pattern, else false
owners - The task owner
claimants - the task claimant
assignee - the task assignee
minPriority - the minimum priority
maxPriority - the max priority
stateTypes - the states
parentProcessUri - The parent process.
isParentProcessUriPattern - true if parent process uri is a pattern, else false
parentProcessIds - The parent process id
listeningProcessUri - The listening process
isListeningProcessUriPattern - true if listening process uri is a pattern, else false
listeningProcessIds - the listening process ids
completionDueDateBefore - Completion due date before
completionDueDateAfter - Completion due date after
claimDueDateBefore - Claim due date before
claimDueDateAfter - Claim due date after
canBeReassigned - true if task can be re-assigned, else false
canBeReturned - true if task can be returned, else false
canBeAborted - true if task can be aborted, else false
propertyName - a task property name
propertyValue - a task property value
isPropertyValuePattern - true if property value is a pattern, else false

TaskSelector

public TaskSelector(String[] taskIds,
                    String taskName,
                    boolean isNamePattern,
                    String description,
                    boolean isDescriptionPattern,
                    String comment,
                    boolean isCommentPattern,
                    String[] owners,
                    String[] claimants,
                    Assignee assignee,
                    Integer minPriority,
                    Integer maxPriority,
                    StateType[] stateTypes,
                    String parentProcessUri,
                    boolean isParentProcessUriPattern,
                    String[] parentProcessIds,
                    String listeningProcessUri,
                    boolean isListeningProcessUriPattern,
                    String[] listeningProcessIds,
                    Date completionDueDateBefore,
                    Date completionDueDateAfter,
                    Date claimDueDateBefore,
                    Date claimDueDateAfter,
                    Date creationDateBefore,
                    Date creationDateAfter,
                    Boolean canBeReassigned,
                    Boolean canBeReturned,
                    Boolean canBeAborted,
                    String[] propertyNames,
                    String[] propertyValues,
                    boolean[] isPropertyValuePattern)
Construct a new task selector. It allows multiple property values to be set.

Parameters:
taskIds - The unique Task identifiers
taskName - The task name
isNamePattern - true if name is a pattern, else false
description - the task description
isDescriptionPattern - true if description is a pattern, else false
comment - the task comment
isCommentPattern - true if comment is a pattern, else false
owners - The task owner
claimants - the task claimant
assignee - the task assignee
minPriority - the minimum priority
maxPriority - the max priority
stateTypes - the states
parentProcessUri - The parent process.
isParentProcessUriPattern - true if parent process uri is a pattern, else false
parentProcessIds - The parent process id
listeningProcessUri - The listening process
isListeningProcessUriPattern - true if listening process uri is a pattern, else false
listeningProcessIds - the listening process ids
completionDueDateBefore - Completion due date before
completionDueDateAfter - Completion due date after
claimDueDateBefore - Claim due date before
claimDueDateAfter - Claim due date after
canBeReassigned - true if task can be re-assigned, else false
canBeReturned - true if task can be returned, else false
canBeAborted - true if task can be aborted, else false
propertyNames - an array of task property names
propertyValues - an array of task property values
isPropertyValuePattern - an array of booleans declaring whether propertyValue is a pattern

TaskSelector

public TaskSelector(String[] taskIds,
                    String taskName,
                    boolean isNamePattern,
                    String description,
                    boolean isDescriptionPattern,
                    String comment,
                    boolean isCommentPattern,
                    String[] owners,
                    String[] claimants,
                    Assignee assignee,
                    Integer minPriority,
                    Integer maxPriority,
                    StateType[] stateTypes,
                    String parentProcessUri,
                    boolean isParentProcessUriPattern,
                    String[] parentProcessIds,
                    String listeningProcessUri,
                    boolean isListeningProcessUriPattern,
                    String[] listeningProcessIds,
                    Date completionDueDateBefore,
                    Date completionDueDateAfter,
                    Date claimDueDateBefore,
                    Date claimDueDateAfter,
                    Date creationDateBefore,
                    Date creationDateAfter,
                    Boolean canBeReassigned,
                    Boolean canBeReturned,
                    Boolean canBeAborted,
                    String propertyName,
                    String propertyValue,
                    boolean isPropertyValuePattern,
                    boolean includeTaskRequest,
                    boolean includeTaskResponse)
Construct a new task selector. It allows multiple property values to be set.

Parameters:
taskIds - The unique Task identifiers
taskName - The task name
isNamePattern - true if name is a pattern, else false
description - the task description
isDescriptionPattern - true if description is a pattern, else false
comment - the task comment
isCommentPattern - true if comment is a pattern, else false
owners - The task owner
claimants - the task claimant
assignee - the task assignee
minPriority - the minimum priority
maxPriority - the max priority
stateTypes - the states
parentProcessUri - The parent process.
isParentProcessUriPattern - true if parent process uri is a pattern, else false
parentProcessIds - The parent process id
listeningProcessUri - The listening process
isListeningProcessUriPattern - true if listening process uri is a pattern, else false
listeningProcessIds - the listening process ids
completionDueDateBefore - Completion due date before
completionDueDateAfter - Completion due date after
claimDueDateBefore - Claim due date before
claimDueDateAfter - Claim due date after
canBeReassigned - true if task can be re-assigned, else false
canBeReturned - true if task can be returned, else false
canBeAborted - true if task can be aborted, else false
propertyName - a property name
propertyValue - a property value
isPropertyValuePattern - an array of booleans declaring whether propertyValue is a pattern
includeTaskRequest - include the Task Request data in the query response
includeTaskResponse - include the Task Response data in the query response
Since:
8.1.5

TaskSelector

public TaskSelector(String[] taskIds,
                    String taskName,
                    boolean isNamePattern,
                    String description,
                    boolean isDescriptionPattern,
                    String comment,
                    boolean isCommentPattern,
                    String[] owners,
                    String[] claimants,
                    Assignee assignee,
                    Integer minPriority,
                    Integer maxPriority,
                    StateType[] stateTypes,
                    String parentProcessUri,
                    boolean isParentProcessUriPattern,
                    String[] parentProcessIds,
                    String listeningProcessUri,
                    boolean isListeningProcessUriPattern,
                    String[] listeningProcessIds,
                    Date completionDueDateBefore,
                    Date completionDueDateAfter,
                    Date claimDueDateBefore,
                    Date claimDueDateAfter,
                    Date creationDateBefore,
                    Date creationDateAfter,
                    Boolean canBeReassigned,
                    Boolean canBeReturned,
                    Boolean canBeAborted,
                    String[] propertyNames,
                    String[] propertyValues,
                    boolean[] isPropertyValuePattern,
                    boolean includeTaskRequest,
                    boolean includeTaskResponse)
Construct a new task selector. It allows multiple property values to be set.

Parameters:
taskIds - The unique Task identifiers
taskName - The task name
isNamePattern - true if name is a pattern, else false
description - the task description
isDescriptionPattern - true if description is a pattern, else false
comment - the task comment
isCommentPattern - true if comment is a pattern, else false
owners - The task owner
claimants - the task claimant
assignee - the task assignee
minPriority - the minimum priority
maxPriority - the max priority
stateTypes - the states
parentProcessUri - The parent process.
isParentProcessUriPattern - true if parent process uri is a pattern, else false
parentProcessIds - The parent process id
listeningProcessUri - The listening process
isListeningProcessUriPattern - true if listening process uri is a pattern, else false
listeningProcessIds - the listening process ids
completionDueDateBefore - Completion due date before
completionDueDateAfter - Completion due date after
claimDueDateBefore - Claim due date before
claimDueDateAfter - Claim due date after
canBeReassigned - true if task can be re-assigned, else false
canBeReturned - true if task can be returned, else false
canBeAborted - true if task can be aborted, else false
propertyNames - an array of task property names
propertyValues - an array of task property values
isPropertyValuePattern - an array of booleans declaring whether propertyValue is a pattern
includeTaskRequest - include the Task Request data in the query response
includeTaskResponse - include the Task Response data in the query response
Since:
8.1.5

TaskSelector

public TaskSelector(String[] taskIds,
                    String taskName,
                    boolean isNamePattern,
                    String description,
                    boolean isDescriptionPattern,
                    String comment,
                    boolean isCommentPattern,
                    String[] owners,
                    String[] claimants,
                    Assignee assignee,
                    Integer minPriority,
                    Integer maxPriority,
                    StateType[] stateTypes,
                    String parentProcessUri,
                    boolean isParentProcessUriPattern,
                    String[] parentProcessIds,
                    String listeningProcessUri,
                    boolean isListeningProcessUriPattern,
                    String[] listeningProcessIds,
                    Date completionDueDateBefore,
                    Date completionDueDateAfter,
                    Date claimDueDateBefore,
                    Date claimDueDateAfter,
                    Date creationDateBefore,
                    Date creationDateAfter,
                    Boolean canBeReassigned,
                    Boolean canBeReturned,
                    Boolean canBeAborted,
                    String propertyName,
                    String propertyValue,
                    boolean isPropertyValuePattern,
                    boolean includeTaskRequest,
                    boolean includeTaskResponse,
                    boolean includeTaskProperties)
Construct a new task selector. It allows multiple property values to be set.

Parameters:
taskIds - The unique Task identifiers
taskName - The task name
isNamePattern - true if name is a pattern, else false
description - the task description
isDescriptionPattern - true if description is a pattern, else false
comment - the task comment
isCommentPattern - true if comment is a pattern, else false
owners - The task owner
claimants - the task claimant
assignee - the task assignee
minPriority - the minimum priority
maxPriority - the max priority
stateTypes - the states
parentProcessUri - The parent process.
isParentProcessUriPattern - true if parent process uri is a pattern, else false
parentProcessIds - The parent process id
listeningProcessUri - The listening process
isListeningProcessUriPattern - true if listening process uri is a pattern, else false
listeningProcessIds - the listening process ids
completionDueDateBefore - Completion due date before
completionDueDateAfter - Completion due date after
claimDueDateBefore - Claim due date before
claimDueDateAfter - Claim due date after
canBeReassigned - true if task can be re-assigned, else false
canBeReturned - true if task can be returned, else false
canBeAborted - true if task can be aborted, else false
propertyName - a task property name
propertyValue - a task property value
isPropertyValuePattern - Do we u