IBM Support

webMethods Knowlegebase : REST POST searchTasksFields returning HTTP error 500 when assignedToList field is requested (1798820)

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

[{"Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSAWP1J","label":"IBM webMethods BPM"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods Task Engine (WTN)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"SUSE Linux Enterprise Server"}],"Version":"9.7"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 March 2025

UID

ibm17197685