Designing and Implementing Business Process Models 10.4 | Designing and Implementing Business Process Models | Task Engine API and Service Reference | Using the Task Engine Web Service API | Summary of Data Structures | TaskSearchQueryTerm
 
TaskSearchQueryTerm
Contains search criteria for the searchTasks and searchTasksIndexed operations.
You use this data structure to specify 1) the field or fields that you want the service to search, 2) the value to which you want the field's contents to be compared, and 3) the type of comparison that you want the service to make.
If you include multiple TaskSearchQueryTerms in the terms array in TaskSearchQuery, all terms in the array are combined using the logical "AND" operator. Only tasks that satisfy all TaskSearchQueryTerm objects in the terms array are returned in the result set.
Element
Description
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 the following 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 standard fields in TaskData (the task business data), specify the field using a binding expression in this format:
#{currentTask.taskData.pathToDataElement}
For example, this binding expression:
#{currentTask.taskData.travelReservation.reservationNo}
searches the "reservationNo" field within the "travelReservation" document in TaskData.
If you specify multiple fields in this parameter, the comparison evaluates to true if any of the specified fields match the query defined by operator and value (that is, the service performs a logical "OR" when asked to evaluate multiple fields).
This API returns the values for the specified data fields only.
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 API 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 makes 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. Valid only for numbers or date fields.
*contains Compares Value to the individual elements in a String array. The comparison evaluates to true if any element in the list matches Value. Valid only with string array fields.
For example, if you have a string array 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.
value
anyType The value to which the contents of the field specified in Field is 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: Value is case-sensitive. That is, abc will not match ABC or Abc.

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release