AnsweredAssumed Answered

Solution: improve performace in Alfresco

Question asked by vinaxwater on Apr 5, 2010
Latest reply on Jun 17, 2010 by vinaxwater
when you use Alfresco common problem is the performance! Here I did not mention the issue because the hardware configuration server can normally meet for 100-1000 users that are written pretty much on the forum so I just put out a solution but it is very useful to the development and location management system my Alfresco!

Common problem is when you completed the task pane open  :mrgreen:  then all tasks will be completed with status paging load on your screen at this time is completed, the panel TASKs any action on your next (e.g: you click on page 2 or click menu on the left navigator) then load operation completed all tasks are done again this makes the performance is limited!

The solution here is to put more load conditions for the tasks can be completed by the date created (can only load the tasks completed in two months), provided that you can put in xml file (which can be done by the code read to get info from param xml file) for editing upon request from the end users :mrgreen:

View file JBPMEngine.java (press Ctr+R in Eclipse):
this is string for QUERY get tasks Completed in 2 month:

private final static String COMPLETED_TASKS_QUERY =     
   "select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti " +
   "where ti.actorId = :actorId " +
   "and ti.isOpen = false " +
   "and to_char(sysdate,'yyddd')-to_char(ti.end,'yyddd')<=60 "; // vinaxwater added

this is string for QUERY get 60 rows tasks completed to the query:

private final static String COMPLETED_TASKS_QUERY =     
   "select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti " +
   "where ti.actorId = :actorId " +
   "and ti.isOpen = false " +
   "and rownum <= :rw "; // vinaxwater added

find method findCompletedTaskInstances:

After row: query.setString("actorId", actorId);
Add:    query.setString("rw", "60"); // vinaxwater added

The conditions you can start with the fields in tables JBPM_TASKINSTANCE!

You can change the hard conditions by reading from the xml file for conditions when requested changes are not necessarily re-build source that just change the xml file for effect :mrgreen: and you can also apply in process or task to load the content in Alfresco :mrgreen:
This is useful for improving performance using Alfresco very much!
Note: I am using Alfresco 2.9B build version. No way affect the search content in Alfresco system because otherwise use search module :mrgreen:

Hope this helps you!

Regards
vinaxwater

Outcomes