hhuijser/liferay-plugins — pull request #171 by yuhai (2014-03-12 06:03:06+00:00)
Title: LPS-45034  API:WorkflowTaskManagerUtil.getWorkflowTasksBySubmittingUser() returns no rows

WorkflowTaskManagerUtil.getWorkflowTasksBySubmittingUser() and getWorkflowTaskCountBySubmittingUser() doesn't never return any rows and total.

in KaleoTaskInstanceTokenLocalServiceImpl.getWorkflowTaskCountBySubmittingUser(), we use the below code "dynamicQuery.add(workflowContextProperty.like("\"userId\":" + userId));" and the code was matched with the sql grammar
##
select count(*) from kaleotaskinstancetoken where workflowContext like '"userId":10196'
##

in kaleotaskinstancetoken table, the field workflowContext vaule likes the below value:
##
{"map":..."workflowAction":1,"userId":10205,"...,"entryClassName":"com.liferay.portlet.blogs.model.BlogsEntry","groupId":"10186","entryType":"Blogs Entry","userId":"10205","taskComments":"","companyId":"10156","entryClassPK":"11486"},"javaClass":"java.util.HashMap"}
##

So use keyword "like '"userId":10196'" as sql query, we can't get any result.

Please help check it.