Affects Version/s: 7.0.0 M3
Fix Version/s: 7.0.0 M7
com.liferay.portal.workflow.kaleo.service.impl.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 is the below:
So use keyword "like '"userId":10196'" as sql query, we can't get any result.
The test method:
I didn't find the api was invoked by liferay action(UI). I think the api only was provided for customer to custom workflow. So I invoked the api in workflow_search_results.jspf and added the below code.
int countHai = WorkflowTaskManagerUtil.getWorkflowTaskCountBySubmittingUser(company.getCompanyId(), user.getUserId(), false);
System.out.println("countHai:" + countHai);
And then do the below steps:
1. Use Admin login.
2. Enable Blogs Entry workflow.
3. Create one blog to "submit for publication".
Actual behavior: we can see the info "countHai:0" printed in log.
Expected behavior: we should see the info "countHai:1" printed in log.