This article summarizes key insights and solutions for common issues encountered when using the Task Execution Web Service (TEWS) API to work with Workpoint objects as discussed in the documentation item Advanced Options for TEWS Search Requests
Receiving error "tews code 700 error exception: NoSuchObjectException."
1. Documentation Missing wfuser Header
A critical header, wfuser, is missing from the current TEWS documentation. This header is essential for filtering results in TEWS requests, particularly when trying to retrieve approval items for specific workflow users. Without it, requests may result in a "tews code 700 error exception: NoSuchObjectException."
2. Searching by InitiatorId or Participants: The CountOfTotalSearchElements Header
Current documentation examples for searching by InitiatorId or Participants may not yield expected results. This is often due to the absence of the CountOfTotalSearchElements header. Without this parameter set to true, the search might not return any relevant information, even if the request includes wsdl:Participants or InitiatorId criteria.
3. Searching by Workitem Title
To effectively search by Workitem title (which corresponds to the "Worklist Name" column), the exact string from the title must be used. The documentation currently provides a general description of "Title – A brief summary of what this work item does" but lacks clear guidance on its precise usage for searching. For instance, if a work item title is "Modify user 'acme4 user4 (acme4)'," the searchable title is "acme4 user4 (acme4)" or only "acme4" is also enough
4. Searching by Participant ID
When searching by the ParticipantId field, it's crucial to use the precise string from your Workpoint job, such as "Approval." This is not immediately intuitive but is a valid and necessary parameter for successful searches. The ParticipantID corresponds to the "Approval" string displayed in the Workpoint designer.
5. The new_task.zip file, which contains new_task.xml for creating an "Approve Work Items" task, is missing critical instructions. Specifically, the new task is not assigned to any Admin Role, a necessary step for its functionality that is not mentioned in the documentation.
6. Submitting a Reserve Action via TEWS
It is possible to successfully submit a "Reserve" action for multiple work items using a TEWS request. This process involves logging in as an imadmin user and utilizing the wsdl:Reserve element for specific work items. This action effectively removes the reserved work items from the original user's worklist.
1. Include the wfuser header in your TEWS request, specifying the workflow user (e.g., username) to correctly filter results.
2. Add the CountOfTotalSearchElements header as parameter and set it to true in your TEWS request header when searching by InitiatorId or Participants to ensure accurate search results
3. Use the exact string found after the dash in the "Worklist Name" column as the wsdl:Title in your TEWS request for accurate work item title searches.
4. Use the exact "Approval" string from your Workpoint job as the ParticipantId in your TEWS request.5. Documentation Link Fixed
5. After importing new_task.xml, manually assign the new "Approve Work Items" task to the appropriate Admin Role for it to function correctly.
6. Log in as an imadmin user and use the wsdl:Reserve element within your TEWS request, specifying the work item IDs to reserve them