<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Latest task instances in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34137#M14410</link>
    <description>&lt;P&gt;If this is related alfresco then it's wrong place.&lt;/P&gt;&lt;P&gt;Which webscript you want to override?&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 13:05:49 GMT</pubDate>
    <dc:creator>sp2</dc:creator>
    <dc:date>2020-12-15T13:05:49Z</dc:date>
    <item>
      <title>Latest task instances</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34134#M14407</link>
      <description>I'm in ,I want to know if there is a webscript that return task instances sorted by date or the x latest instances&amp;nbsp;</description>
      <pubDate>Tue, 17 Oct 2017 09:30:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34134#M14407</guid>
      <dc:creator>owerfelli</dc:creator>
      <dc:date>2017-10-17T09:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Latest task instances</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34135#M14408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;Oussama Werfelli&lt;/B&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The existing webscript provided by alfresco which gives the list of tasks, sorts tasks by due date&amp;nbsp; in ascending order. In order to get latest task first you can override webscript and sort the task list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kalpesh&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;ContCentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 12:00:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34135#M14408</guid>
      <dc:creator>kalpesh_c2</dc:creator>
      <dc:date>2017-10-17T12:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Latest task instances</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34136#M14409</link>
      <description>&lt;P&gt;HI i am not getting the default webscript to override what is the location of the webscript ..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 04:44:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34136#M14409</guid>
      <dc:creator>akash251998</dc:creator>
      <dc:date>2020-12-15T04:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Latest task instances</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34137#M14410</link>
      <description>&lt;P&gt;If this is related alfresco then it's wrong place.&lt;/P&gt;&lt;P&gt;Which webscript you want to override?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:05:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34137#M14410</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2020-12-15T13:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Latest task instances</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34138#M14411</link>
      <description>&lt;P&gt;I am overriding TaskInstancesGet.java .&lt;/P&gt;&lt;P&gt;1--&amp;gt; I have pasted TaskInstancesGet.java file at the location tomcat\webapps\alfresco\WEB-INF\classes\org\alfresco\repo\web.&lt;/P&gt;&lt;P&gt;And changed&amp;nbsp; WorkflowModel.PROP_DUE_DATE to ContentModel.PROP_CREATED in TaskInstancesGet.java.&lt;/P&gt;&lt;P&gt;2--&amp;gt; And have registered bean in the file custom-webscripts -context.xml at location tomcat\shared\classes\alfresco\extension:-&lt;/P&gt;&lt;P&gt;&amp;lt;bean id="webscript.org.alfresco.repository.workflow.task-instances.get"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class="org.alfresco.repo.web.scripts.workflow.TaskInstancesGet"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parent="abstractWorkflowWebScript"&lt;/P&gt;&lt;P&gt;&amp;lt;/bean&amp;gt;&lt;/P&gt;&lt;P&gt;3--&amp;gt; And pasted a file named task-instances.get.desc.xml at location&amp;nbsp; tomcat\shared\classes\alfresco\extension\templates\webscripts\org\alfresco\repository\workflow&lt;/P&gt;&lt;P&gt;with content:-&lt;/P&gt;&lt;P&gt;&amp;lt;webscript&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;List workflow tasks&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;&lt;BR /&gt;Lists all Workflow Task Instances associated with an authority and of a given State.&lt;BR /&gt;The list of returned tasks also includes pooled tasks which the specified authority is eligible to claim.&lt;BR /&gt;&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;url&amp;gt;/api/task-instances?authority={authority?}&amp;amp;amp;state={state?}&amp;amp;amp;priority={priority?}&amp;amp;amp;pooledTasks={pooledTasks?}&amp;amp;amp;dueBefore={dueBefore?}&amp;amp;amp;dueAfter={dueAfter?}&amp;amp;amp;properties={properties?}&amp;amp;amp;maxItems={maxItems?}&amp;amp;amp;skipCount={skipCount?}&amp;amp;amp;exclude={exclude?}&amp;amp;amp;property={propQName/propValue?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;url&amp;gt;/api/workflow-instances/{workflow_instance_id}/task-instances?authority={authority?}&amp;amp;amp;state={state?}&amp;amp;amp;priority={priority?}&amp;amp;amp;dueBefore={isoDate?}&amp;amp;amp;dueAfter={isoDate?}&amp;amp;amp;properties={prop1, prop2, prop3...?}&amp;amp;amp;maxItems={maxItems?}&amp;amp;amp;skipCount={skipCount?}&amp;amp;amp;exclude={exclude?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;format default="json"/&amp;gt;&lt;BR /&gt;&amp;lt;authentication&amp;gt;user&amp;lt;/authentication&amp;gt;&lt;BR /&gt;&amp;lt;transaction allow="readonly"&amp;gt;required&amp;lt;/transaction&amp;gt;&lt;BR /&gt;&amp;lt;lifecycle&amp;gt;limited_support&amp;lt;/lifecycle&amp;gt;&lt;BR /&gt;&amp;lt;args&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;authority&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;The username of the authority to retrieve the tasks for. If this argument is omitted the tasks for the current user are returned.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;state&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Filters the returned tasks by state, IN_PROGRESS or COMPLETED (lower case is also acceptable). If this argument is omitted tasks in progress are returned.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;priority&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Filters the returned tasks by priority, a numerical value is expected, either 1, 2 or 3.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;pooledTasks&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Determines whether pooled tasks for the user are included in the results. To omit pooled tasks set this argument to false.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;dueBefore&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Restricts the returned tasks to only those that are due before the provided date (the date must be in ISO8601 format)&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;dueAfter&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Restricts the returned tasks to only those that are due after the provided date (the date must be in ISO8601 format)&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;properties&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Comma separated list of property names to include in the results. If this argument is omitted all properties are returned.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;maxItems&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Specifies the maximum number of results to return.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;skipCount&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Specifies the position in the results to start, used for paging results.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;exclude&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Comma separated list of task types to exclude from the the results.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;workflow_instance_id&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Restricts the returned tasks to those that belong to the given workflow process instance id.&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;arg&amp;gt;&lt;BR /&gt;&amp;lt;shortname&amp;gt;property&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;lt;description&amp;gt;Restricts the returned tasks to only those that match the given property. The property name should be a valid QName format followed by '/' then the property value. E.g. bpm:description/myDescription&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;lt;/arg&amp;gt;&lt;BR /&gt;&amp;lt;/args&amp;gt;&lt;BR /&gt;&amp;lt;responses&amp;gt;&lt;BR /&gt;&amp;lt;response&amp;gt;&lt;BR /&gt;&amp;lt;format&amp;gt;json&amp;lt;/format&amp;gt;&lt;BR /&gt;&amp;lt;type&amp;gt;&lt;BR /&gt;&amp;lt;![CDATA[&lt;BR /&gt;{&lt;BR /&gt;"data":&lt;BR /&gt;[&lt;BR /&gt;{&lt;BR /&gt;"id": string,&lt;BR /&gt;"url": string,&lt;BR /&gt;"name": string,&lt;BR /&gt;"title": string,&lt;BR /&gt;"description": string,&lt;BR /&gt;"state": string (IN_PROGRESS|COMPLETE),&lt;BR /&gt;"path": string,&lt;BR /&gt;"isPooled": boolean,&lt;BR /&gt;"isEditable": boolean,&lt;BR /&gt;"isReassignable": boolean,&lt;BR /&gt;"isClaimable": boolean,&lt;BR /&gt;"isReleasable": boolean,&lt;BR /&gt;"outcome": string,&lt;BR /&gt;"owner":&lt;BR /&gt;{&lt;BR /&gt;"userName": string,&lt;BR /&gt;"firstName": string,&lt;BR /&gt;"lastName": string&lt;BR /&gt;},&lt;BR /&gt;"properties":&lt;BR /&gt;{&lt;BR /&gt;"key": string, boolean, number, array or map,&lt;BR /&gt;...&lt;BR /&gt;},&lt;BR /&gt;"workflowInstance":&lt;BR /&gt;{&lt;BR /&gt;"id": string,&lt;BR /&gt;"url": string,&lt;BR /&gt;"name": string,&lt;BR /&gt;"title": string,&lt;BR /&gt;"description": string,&lt;BR /&gt;"isActive": boolean,&lt;BR /&gt;"startDate": string,&lt;BR /&gt;"priority": number,&lt;BR /&gt;"message": string,&lt;BR /&gt;"endDate": string,&lt;BR /&gt;"dueDate": string,&lt;BR /&gt;"context": string,&lt;BR /&gt;"package": string,&lt;BR /&gt;"initiator":&lt;BR /&gt;{&lt;BR /&gt;"userName": string,&lt;BR /&gt;"firstName": string,&lt;BR /&gt;"lastName": string&lt;BR /&gt;},&lt;BR /&gt;"definitionUrl": string&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;...&lt;BR /&gt;],&lt;BR /&gt;"paging":&lt;BR /&gt;{&lt;BR /&gt;"totalItems": number,&lt;BR /&gt;"maxItems": number,&lt;BR /&gt;"skipCount": number&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]]&amp;gt;&lt;BR /&gt;&amp;lt;/type&amp;gt;&lt;BR /&gt;&amp;lt;/response&amp;gt;&lt;BR /&gt;&amp;lt;/responses&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/webscript&amp;gt;&lt;/P&gt;&lt;P&gt;But it is not sorting there is no change on my task. I think instead of java file i need .class file&lt;/P&gt;&lt;P&gt;Now can you please tell me that i am following the correct procedure or not.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 04:41:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34138#M14411</guid>
      <dc:creator>akash251998</dc:creator>
      <dc:date>2020-12-16T04:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Latest task instances</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34139#M14412</link>
      <description>&lt;P&gt;Dear sir&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/74498"&gt;@abhinavmishra14&lt;/A&gt;&amp;nbsp;please help us in this .&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 07:50:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34139#M14412</guid>
      <dc:creator>akash251998</dc:creator>
      <dc:date>2020-12-17T07:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Latest task instances</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34140#M14413</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/79410"&gt;@akash251998&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In &lt;STRONG&gt;your own package&lt;/STRONG&gt;&amp;nbsp;(i.e. com.example.workflow) you should create a&amp;nbsp;&lt;FONT face="courier new,courier"&gt;TaskInstancesGet&lt;/FONT&gt;&amp;nbsp;file (copied from the original file and with changed&amp;nbsp;&lt;FONT face="courier new,courier"&gt;OrderBy&lt;/FONT&gt; and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Comparator&lt;/FONT&gt;). Then in the &lt;FONT face="arial,helvetica,sans-serif"&gt;custom-web-context.xml&lt;/FONT&gt; you should add a new bean with the same id as the original and changed package, i.e.:&lt;/P&gt;&lt;PRE&gt;&amp;lt;bean id="webscript.org.alfresco.repository.workflow.task-instances.get"
class="com.example.workflow.TaskInstancesGet"
parent="abstractWorkflowWebScript"&amp;gt;
&amp;lt;/bean&amp;gt;&lt;/PRE&gt;&lt;P&gt;That's it.&lt;/P&gt;&lt;P&gt;Final tip, instead of&amp;nbsp;&lt;FONT color="#FF0000"&gt;ContentModel.PROP_CREATED&lt;/FONT&gt;&amp;nbsp;use&amp;nbsp;&lt;FONT color="#99CC00"&gt;WorkflowModel.PROP_START_DATE&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 09:37:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/latest-task-instances/m-p/34140#M14413</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2021-10-02T09:37:49Z</dc:date>
    </item>
  </channel>
</rss>

