Troubleshooting
Problem
Using the Task Engine REST API served by MWS (with MWS 9.7 fix1/5/11/13) the following problem can be observed:
When doing a searchTasksFields POST request, it works, unless requesting the assignedToList field. Then, a 500 HTTP response is got, even though logs show how the search is successfully performed.
To reproduce the issue:
1 Set up a Task Engine so that it has at least 1 task in it
2 Using any REST console or client of your choice, issue the following request:
2.1 URI: http://<MWS host>:8585/rest/pub/opentasksearch/fields
2.2 HTTP Method: POST
2.3 Headers:
2.3.1 Accept: application/json
2.3.2 Content-Type: application/json
3 Payload / body:
{
"fields":["#{currentTask.taskInfo.taskID}"
,"#{currentTask.taskInfo.assignedToList}"
],
"includeTaskData":"true",
"taskSearchQuery":{"maxResults":"1"}
}
Result:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>Internal Server Error (500)</h1>
<p>
The requested URL /rest/pub/opentasksearch/fields resulted in an error.
</p>
</body>
</html>
Findings:
Removing the assignedToList by deleting the following line, does! bring results, leading to the conclusion there is an issue with assignedToList
,"#{currentTask.taskInfo.assignedToList}"
Results:
{
"taskFields": {
"fields": {
"name": "#{currentTask.taskInfo.taskID}",
"value": {
"@type": "xs:string",
"$": "20183"
}
}
}
}
*Also, if you configure in MWS the logging level of the "task" category to TRACE, in both cases you should see lines such as the following ones:
(task:DEBUG) - Query All Tasks Task Search Query [max:1] searchTerms: {}
(task:DEBUG) - TaskSearchAll: sql = [SELECT T.TASK_ID FROM T_TASK T WHERE ((1 = 1)) ORDER BY T.TASK_ID DESC]; parameters = [[]];
(task:DEBUG) - Task Query returning: 1 records completed in: 11
*This behavior does not seem to depend on whether the task returned has actually somebody assigned to it, or not.
Document Location
Worldwide
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
20 March 2025
UID
ibm17197685