Task Engine 10.11 | Task Engine Webhelp | webMethods Task Engine API and Service Reference | Using the Task Engine Built-in Services | pub.task:TaskSearchQueryTerm
 
pub.task:TaskSearchQueryTerm
WmTaskClient. Document type that you use to specify search criteria for the pub.task:TaskSearchQuery document type.
You use this document to specify:
1. The Fields that you want the service to search.
2. The Operator that defines the type of comparison that you want the service to make.
3. The Value that you want the field's contents to be compared to.
A task is included in the result set if the comparison evaluates to true in any of the fields you have specified (that is, the service performs a logical OR when asked to evaluate multiple fields).
Parameters
Fields
String[ ] A list of fields that are to be searched. There are two different methods for specifying the field name, depending on whether you are working with standard task fields or indexed task fields. For more information about indexed fields, see the webMethods BPM Task Development Help.
Working with Standard Task Fields
You can search standard task fields in TaskInfo using these names:
*acceptedByList
*assignedToList
*auditContext
*collaborationProcessID
*collaborationStepID
*createdBy
*createdDate
*customTaskID
*description
*expireDate
*lastModifiedDate
*lastModifiedBy
*lastAcceptedBy
*name
*priority
*taskID
*taskTypeID
*parentTaskID
*processInstanceID
*processModelID
*processModelVersion
*status
*stepID
*stepIteration
To search fields in TaskData (the business data associated with the task), you must specify the field using a binding expression in the following format:
#{currentTask.taskData.pathToDataElement}
For example, the following binding expression:
#{currentTask.taskData.travelReservation.reservationNo}
would search the "reservationNo" field within the "travelReservation" document in TaskData.
Working with Indexed Fields
To search tasks with indexed fields, you must pass in the database name of the indexed field along with the desired operator and value. The indexed field name is set in the Designer task editor. To determine the database index field name:
1. Open the task that contains the indexed data field.
2. On the Business Data tab, select the field you want to work with.
3. Click Edit.
4. In the Edit Business Data dialog box, obtain the indexed field name from the Name field in the Database field settings area.
For example, to search the database field “ZipCode” for matches to the value “90210”:
SearchTerm.fields="ZipCode"
SearchTerm.operator="="
SearchTerm.value="90210"
This service returns the values for the specified indexed fields only. For more information about indexed fields, see the webMethods BPM Task Development Help.
Operator
String The comparison that the service will make when evaluating the contents of Value against the contents of the specified field(s).
Operator must be one of the following:
*= Is equal to.
*<> Is not equal to.
*< Is less than. Valid only for numbers or date fields.
*> Is greater than. Valid only for numbers or date fields.
*<= Is less than or equal to. Valid only for numbers or date fields.
*>= Is greater than or equal to. For numbers or date fields only.
*contains Compares Value to the individual elements in a String List. The comparison evaluates to true if any element in the list matches Value. Valid only with string list fields.
For example, if you have a string list field with three elements, this operator evaluates to true if any one of the three elements contains a string that exactly matches the value in Value.
*in Matches if the single string value of the task field can be found inside a string list of values passed in the term. Such as: TaskFieldValue in (value1, value2, value3). Valid for all types.
*is empty Matches if the value of the field is either null or an empty string ("").
*is not empty Matches if the value of the field is not null and not an empty string ("").
*is null Matches if the current term field is null.
*is not null Matches if current term field is not null.
*like Matches the pattern string specified in Value. See Value for pattern string information. Valid only with string fields.
*not in Matches if the single string value of the task field cannot be found in a string list of values passed in the term. Such as: TaskFieldValue not in (value1, value2, value3). Valid for all types.
*not like Matches for all instances where the pattern string does not match the text specified in Value. See Value for information about pattern strings; valid only with string fields.
*is not empty Matches if the value of the field is not null and not an empty string ("").
*is null Matches if the current term field is null.
*is not null Matches if current term field is not null.
*like Matches the pattern string specified in Value. See Value for pattern string information. Valid only with string fields.
*not in Matches if the single string value of the task field cannot be found in a string list of values passed in the term. Such as: TaskFieldValue not in (value1, value2, value3). Valid for all types.
*not like Matches for all instances where the pattern string does not match the text specified in Value. See Value for information about pattern strings; valid only with string fields.
Value
Object The value to which the contents of the field specified in Field will be compared.
Value can also specify a pattern string that can include the * wildcard character. For example:
*A Value of abc would return tasks whose field contents contain only the character sequence abc.
*A Value of abc* would return tasks whose field contents start with the character sequence abc.
*A Value of *abc would return tasks whose field contents end with the character sequence abc.
*A Value of *abc* would return tasks whose field contents include the character sequence abc anywhere within the field.
Note:
To treat the * wildcard character as a literal, type \ before the * wildcard character. A Value of abc\* would return tasks whose field contents contain only the character sequence *abc.
Value is case-insensitive by default. That is, abc will match ABC or Abc. However, for databases such as Oracle that are case-sensitive by default, you can specify the Case insensitive parameter to perform a case-insensitive search.
Case insensitive
Boolean Disregards case for the Value to which the contents of the field specified in Field will be compared. You specify the parameter to perform index searches on databases that are not case-insensitive by default. Values are:
*true - Case is disregarded.
*false - Case is not disregarded. This is the default value.
Usage Notes
When specifying date-based Standard Text Fields (for example, expireDate), supply the date information as a date object.