Hi,
In our application, we need to fetch all the comments related to a process/processes. These need to be further filtered by date range and user. In TaskService, we have found following methods for it -
@Override
public List getProcessInstanceComments(String processInstanceId) {
return commandExecutor.execute(new GetProcessInstanceCommentsCmd(processInstanceId));
}
@Override
public List<Comment> getProcessInstanceComments(String processInstanceId, String type) {
return commandExecutor.execute(new GetProcessInstanceCommentsCmd(processInstanceId, type));
}
None of these serve our purpose. Digging deeper we found following method in MyBatisCommentDataManager -
@Override
@SuppressWarnings("unchecked")
public List<Comment> findCommentsByProcessInstanceId(String processInstanceId, String type) {
Map<String, Object> params = new HashMap<>();
params.put("processInstanceId", processInstanceId);
params.put("type", type);
return getDbSqlSession().selectListWithRawParameter("selectCommentsByProcessInstanceIdAndType", params);
}
Where is this list maintained and can we add our custom statements to it?
Something on the line of-
selectCommentsByProcessInstanceIdAndTypeAndtimeAndUserId where timestamp is greater/lesser than certain value and userId is equal to some username string.
Regards,