Simply, I want to have a sorting by the latest workflow on the top of the workflow list.
(for now, i've no idea that seems just sort by due date?)
For example, the latest created or reviewed timestamp of the workflow will be displayed on the most top of "Workflow I've started" and "My task" dashlet. It's inconvenience that if there are lot of tasks was assigned in every day will get confusing to define which tasks are the most recently.
May I know how can I proceed with this? I just saw filtering function but no sorting function.
Below webscript gives the details of my task in json format.By default this is sorted by due date.If you see on below link in your alfresco instance , there is one property inside
workflowInstance
calledstartDate
.You can use that for sorting purpose.http://localhost:8080/proxy/alfresco/api/task-instances?authority=admin&properties=bpm_priority,bpm_status,bpm_dueDate,bpm_description&exclude=wcmwf:*&skipCount=0&maxItems=50
You wont be able to sort that using existing webscript, you need to define your own.For that you can take reference of existing webscript.Below is java file which collects data and sort them.
https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2d/root/projects/remote-api/source/java/org/alfresco/repo/web/scripts/workflow/TaskInstancesGet.java.
I have checked in alfresco version 3.4 ,In that version below is the webscript which is getting called on my task view.
http://localhost:8080/alfresco/service/script/org/alfresco/repository/workflow/task-instance.get.
If you have not any idea of alfresco backend webscript,In that case you must know how that is working.Below is link which you can refer.
http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples