Map<String,Object> resultMap = new HashMap<String,Object>();
String userId = StringUtil.getString(filter.get("userId"));
ProcessEngine engine = getProcessEngine(userId);
RuntimeService runtimeService = engine.getRuntimeService();
IdentityService identityService = engine.getIdentityService();
FlowUtilServiceImpl flowUtil = new FlowUtilServiceImpl();
String processDefinitionKey = StringUtil.getString(filter.get("processDefinitionKey"));
String processInstanceId = StringUtil.getString(filter.get("processInstanceId"));
String title = StringUtil.getString(filter.get("title"));
// String subject = StringUtil.getString(filter.get("subject"));
String bizKey = StringUtil.getString(filter.get("bizKey"));
String initor = StringUtil.getString(filter.get("initor"));
String status = StringUtil.getString(filter.get("status"));
String processType = StringUtil.getString(filter.get("processType"));
ProcessInstanceType processInstanceStatus = FlowUtilServiceImpl.getInstanceStaus(status);
try{
String pageI = StringUtil.getString(filter.get("pageIndex"));
String rowI = StringUtil.getString(filter.get("pageSize"));
int pageIndex=1;
int rowNum =15;
if(StringUtil.isNotEmpty(pageI)){
pageIndex = Integer.valueOf(pageI);
}
if(StringUtil.isNotEmpty(rowI)){
rowNum = Integer.valueOf(rowI);
}
ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery();
if(StringUtil.isNotEmpty(processDefinitionKey))
processInstanceQuery.processDefinitionKey(processDefinitionKey);
if(StringUtil.isNotEmpty(processInstanceId))
processInstanceQuery.processInstanceId(processInstanceId);
if(StringUtil.isNotEmpty(title))