<?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 REST API &amp;gt; link between nodes and processes in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123296#M33756</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks to the API I'm now able to list all the nodes and all the processes ..&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I can't find any link between those 2 entities ..&lt;/P&gt;&lt;P&gt;How could I find the processes associated with a given node ?&lt;/P&gt;&lt;P&gt;How could I find the associated node of a given process ?&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jan 2022 13:34:55 GMT</pubDate>
    <dc:creator>JC83</dc:creator>
    <dc:date>2022-01-12T13:34:55Z</dc:date>
    <item>
      <title>REST API &gt; link between nodes and processes</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123296#M33756</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks to the API I'm now able to list all the nodes and all the processes ..&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I can't find any link between those 2 entities ..&lt;/P&gt;&lt;P&gt;How could I find the processes associated with a given node ?&lt;/P&gt;&lt;P&gt;How could I find the associated node of a given process ?&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:34:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123296#M33756</guid>
      <dc:creator>JC83</dc:creator>
      <dc:date>2022-01-12T13:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: REST API &gt; link between nodes and processes</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123297#M33757</link>
      <description>&lt;P&gt;Processes are composed of Tasks. Tasks are associated to documents.&lt;/P&gt;
&lt;P&gt;You need to find a task on a process and to use the "items" REST API.&lt;/P&gt;
&lt;P&gt;For instance, for task 79...&lt;/P&gt;
&lt;PRE&gt;http://127.0.0.1:8080/alfresco/api/-default-/public/workflow/versions/1/tasks/79/items

        "entry": {
          "createdAt": "2022-01-12T13:42:55.268+0000",
          "size": 107376,
          "createdBy": "admin",
          "modifiedAt": "2022-01-12T13:42:56.389+0000",
          "name": "from-ecm-to-content-services.pdf",
          "modifiedBy": "admin",
          "id": "2e53740f-5bef-442b-8319-1e7150341318",
          "mimeType": "application/pdf"
        }&lt;/PRE&gt;
&lt;P&gt;... there is one document associated with located in workspace://SpacesStore/2e53740f-5bef-442b-8319-1e7150341318&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:47:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123297#M33757</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2022-01-12T13:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: REST API &gt; link between nodes and processes</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123298#M33758</link>
      <description>&lt;P&gt;thanks !&lt;/P&gt;&lt;P&gt;I cannot find any tasks of completed processes ..&lt;/P&gt;&lt;P&gt;I don't see any filter in ../processes/id/tasks allowing to show "completed" tasks ..&lt;/P&gt;&lt;P&gt;Another question : what if we have several version of the document. How can I see the version which was concerned but a given process ?&lt;/P&gt;&lt;PRE&gt;# curl -s  "http://server/alfresco/api/-default-/public/workflow/versions/1/processes/1088180" |  jq ''
{
  "entry": {
    "processDefinitionId": "validationHierarchique:159:1072212",
    "durationInMs": 256863,
    "startUserId": "JC205236",
    "startActivityId": "alfrescoStartevent1",
    "endedAt": "2022-01-07T09:07:23.000+0000",
    "startedAt": "2022-01-07T09:03:06.000+0000",
    "id": "1088180",
    "completed": true,
    "endActivityId": "terminateendevent1",
    "processDefinitionKey": "validationHierarchique"
  }
}
# curl -s "http://server/alfresco/api/-default-/public/workflow/versions/1/processes/1088180/tasks" |  jq ''
{
  "list": {
    "pagination": {
      "count": 0,
      "hasMoreItems": false,
      "totalItems": 0,
      "skipCount": 0,
      "maxItems": 100
    },
    "entries": []
  }
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jan 2022 14:06:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123298#M33758</guid>
      <dc:creator>JC83</dc:creator>
      <dc:date>2022-01-12T14:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: REST API &gt; link between nodes and processes</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123299#M33759</link>
      <description>&lt;P&gt;Once a process has been completed, you need to use the process API, since there is no "live" task.&lt;/P&gt;
&lt;P&gt;For instance, for process 33:&lt;/P&gt;
&lt;PRE&gt;http://127.0.0.1:8080/alfresco/api/-default-/public/workflow/versions/1/processes/33/items&lt;/PRE&gt;
&lt;P&gt;I guess there is no direct invocation to get the version used for that task / process. You need to calculate that from dates and version REST API.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 14:34:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123299#M33759</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2022-01-12T14:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: REST API &gt; link between nodes and processes</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123300#M33760</link>
      <description>&lt;P&gt;thanks ..&lt;/P&gt;&lt;P&gt;Ok .. it's nearly done ..&lt;/P&gt;&lt;P&gt;I try to compare process endedDate with version "modifiedAt" date ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this the right comparison to do ?&lt;/P&gt;&lt;P&gt;It seems not&lt;/P&gt;&lt;P&gt;Here 3 versions .. I cannot know the one to choose ..&lt;/P&gt;&lt;PRE&gt;Completed #1084545 on value: Progress Report # 12 v1.2.docx (nodeRef=679a519e-3cc4-481d-8e87-c1d8638034b8) by JB221813 type=validationHierarchique:159:1072212
process end date = 2022-01-10T09:45:09.000+0000
v1.2 @ 2022-01-04T08:55:10.559+0000 diff=-521399(s)
v1.1 @ 2022-01-03T10:14:18.144+0000 diff=-603051(s)
v1.0 @ 2021-11-16T15:05:11.080+0000 diff=-4732798(s)&lt;/PRE&gt;&lt;P&gt;When there is only one version, thoses date are not the same..&lt;/P&gt;&lt;PRE&gt;Completed #1082664 on   value: blabla.docx (nodeRef=74a503c8-0074-4ed3-9bf5-38be710db8f8) by HR124135 type=validationHierarchique:159:1072212
  process end date = 2022-01-10T14:38:58.000+0000
   v1.0 @ 2021-12-22T15:35:33.971+0000 diff=-1638205(s)&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jan 2022 16:24:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-gt-link-between-nodes-and-processes/m-p/123300#M33760</guid>
      <dc:creator>JC83</dc:creator>
      <dc:date>2022-01-12T16:24:06Z</dc:date>
    </item>
  </channel>
</rss>

