Merged HEAD-BUG-FIX to HEAD (4.2)

55501: Merged V4.1-BUG-FIX (4.1.7) to HEAD-BUG-FIX (4.2)
      << Had a conflict on merge - think it is okay >>
      55463: Merged V4.1.6 (4.1.6) to V4.1-BUG-FIX (4.1.7)
         55227: MNT-9074: Merged V4.1.6-PATCHES-2013_09_03 to PATCHES/V4.1.6
          55046: MNT-9074 : My Tasks fails to render if tasks quantity is excessive
          Were implemented code for getting definite count of workflow instances and applying them to page. It makes the opening page more quickly.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55782 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2013-09-20 20:49:30 +00:00
parent e5e97719b3
commit 43b8974563
5 changed files with 140 additions and 9 deletions

View File

@@ -876,8 +876,16 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
}
@Override
public List<WorkflowInstance> getWorkflows(final WorkflowInstanceQuery query)
public List<WorkflowInstance> getWorkflows(WorkflowInstanceQuery workflowInstanceQuery)
{
return getWorkflows(workflowInstanceQuery, 0, 0);
}
@Override
public List<WorkflowInstance> getWorkflows(final WorkflowInstanceQuery query, int maxItems, int skipCount)
{
// MNT-9074 My Tasks fails to render if tasks quantity is excessive
// here don't use maxItems and skipCount
try
{
List<ProcessInstance> instances = getProcessInstances(query);
@@ -891,6 +899,13 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
}
}
@Override
public long countWorkflows(WorkflowInstanceQuery workflowInstanceQuery)
{
// MNT-9074 My Tasks fails to render if tasks quantity is excessive
return getWorkflows(workflowInstanceQuery).size();
}
@SuppressWarnings("unchecked")
private List<ProcessInstance> getProcessInstances(final WorkflowInstanceQuery query)
{