<?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: Get process instances history for a specific object in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105266#M73610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got the same requirements as you, but I use another approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I store the process instance id as a property in my object, and query it with &lt;/SPAN&gt;&lt;CODE&gt;HistoricProcessInstance.processInstanceId()&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2012 01:31:43 GMT</pubDate>
    <dc:creator>rogerofyan</dc:creator>
    <dc:date>2012-05-29T01:31:43Z</dc:date>
    <item>
      <title>Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105261#M73605</link>
      <description>Hi everyoneIn my app I'm building workflows and I want to get the history of the workflows triggered for a specific object.When the workflows are executing, is easy to retrieve the workflows for that entity/object, the API gives everything is needed, but when it ends and it's needed to be accessed v</description>
      <pubDate>Mon, 28 May 2012 11:32:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105261#M73605</guid>
      <dc:creator>pedrog1</dc:creator>
      <dc:date>2012-05-28T11:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105262#M73606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Where is your query defined and what is it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 12:56:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105262#M73606</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-05-28T12:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105263#M73607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Where is your query defined and what is it?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your quick reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, it get lost in the copy/paste &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;private List&amp;lt;ProcessInstance&amp;gt; returnOngoingProcessInstances(MyObject myObject) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; variables = new HashMap&amp;lt;String, Object&amp;gt;();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; variables.put("my_object_class", myObject.getClass().getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp; variables.put("my_object_id", myObject.getId());&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; for(Map.Entry&amp;lt;String, Object&amp;gt; variable : variables.entrySet()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.variableValueEquals(variable.getKey(), variable.getValue());&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return query.list();&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;My point is, i can retrieve easily the process instances with specific variables with the runtime API, but when they are finished and go the the history tables, I don't know how to do it. I can't find anything in the HistoryService that allows me to retrieve the process instances that have some variables (they are in the db, I have the history log in full mode).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 13:41:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105263#M73607</guid>
      <dc:creator>pedrog1</dc:creator>
      <dc:date>2012-05-28T13:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105264#M73608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Uhhhmmmm did you have a look at chapter 11 from the documentation?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 15:54:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105264#M73608</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-05-28T15:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105265#M73609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Uhhhmmmm did you have a look at chapter 11 from the documentation?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I did. But I can't find a way to get all the process instances (completed) for my object when what connects my object to the process instances are the variables (as you can see in my first post).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; HistoryProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery();&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;I had tried different ways to use the HistoryProcessInstanceQuery with variables, without success. When the process instance was executing it was easy (first post).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try to exemplify with what I have in my db.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ACT_HI_PROCINST (three completed processes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;ID_&amp;nbsp; PROC_INST_ID_&amp;nbsp; PROC_DEF_ID_&lt;BR /&gt;5&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp; teste:1:4&lt;BR /&gt;6&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp; teste:1:4&lt;BR /&gt;7&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; teste:1:4&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;ACT_HI_DETAIL (six variables, two for each process instance)&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;ID_&amp;nbsp; TYPE_&amp;nbsp; PROC_INST_ID_&amp;nbsp; NAME_&amp;nbsp; LONG_&amp;nbsp; TEXT_&lt;BR /&gt;10&amp;nbsp; VariableUpdate&amp;nbsp; 5&amp;nbsp; obj_class&amp;nbsp; NULL&amp;nbsp; com.myapp.order&lt;BR /&gt;8&amp;nbsp; VariableUpdate&amp;nbsp; 5&amp;nbsp; obj_id&amp;nbsp; 9876&amp;nbsp; 9876&lt;BR /&gt;14&amp;nbsp; VariableUpdate&amp;nbsp; 6&amp;nbsp; obj_class&amp;nbsp; NULL&amp;nbsp; com.myapp.order&lt;BR /&gt;12&amp;nbsp; VariableUpdate&amp;nbsp; 6&amp;nbsp; obj_id&amp;nbsp; 12345&amp;nbsp; 12345&lt;BR /&gt;16&amp;nbsp; VariableUpdate&amp;nbsp; 7&amp;nbsp; obj_class&amp;nbsp; NULL&amp;nbsp; com.myapp.order&lt;BR /&gt;14&amp;nbsp; VariableUpdate&amp;nbsp; 7&amp;nbsp; obj_id&amp;nbsp; 12345&amp;nbsp; 12345&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I use the HistoryService to load the process instances of the order 12345?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is probably that I'm not connecting the process instances with my object in the right way… it will be nice if someone point me in the right direction &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 17:49:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105265#M73609</guid>
      <dc:creator>pedrog1</dc:creator>
      <dc:date>2012-05-28T17:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105266#M73610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got the same requirements as you, but I use another approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I store the process instance id as a property in my object, and query it with &lt;/SPAN&gt;&lt;CODE&gt;HistoricProcessInstance.processInstanceId()&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 01:31:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105266#M73610</guid>
      <dc:creator>rogerofyan</dc:creator>
      <dc:date>2012-05-29T01:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105267#M73611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;why don't you use the businesskey concept of activiti? or do like rogerofyan did store things the othe way around&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 07:35:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105267#M73611</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-05-29T07:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105268#M73612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;why don't you use the businesskey concept of activiti? or do like rogerofyan did store things the othe way around&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your replies&amp;nbsp; &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to use the businesskey concept, it would work perfectly if it allowed more than one record with the same businesskey per process definition. My objects can have multiple workflows of the same process definition; also, rogerofyan approach will not work for me because of this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've just found what would solve my problem, my problem is exactly the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1230" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1230&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=3011" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=3011&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=2922" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=2922&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your replies. I will check the source code and try to remove the unique constrain in the business key…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 10:04:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105268#M73612</guid>
      <dc:creator>pedrog1</dc:creator>
      <dc:date>2012-05-29T10:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105269#M73613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would love some additional guidance on this thread.&amp;nbsp; I think the author has laid it out exactly:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Business keys are broken for use cases where duplicates are OK from a business point of view&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;You can't query historic process instances for variables, even if you have enabled full historical detail&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN&gt;As far as I can tell this makes it near impossible to do meaningful things with historical data through the APIs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 16:13:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105269#M73613</guid>
      <dc:creator>sfeinstein</dc:creator>
      <dc:date>2012-08-16T16:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105270#M73614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Resurrecting this thread as I am facing the exact same problem… any chance the unique constraint could get dropped?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 11:45:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105270#M73614</guid>
      <dc:creator>franck102</dc:creator>
      <dc:date>2014-01-21T11:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get process instances history for a specific object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105271#M73615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you tell me which unique constraint? Can't find it in the posts above&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If its about the unique business key - process definition id constraint, I removed that a few weeks ago on master&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 13:15:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-instances-history-for-a-specific-object/m-p/105271#M73615</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-01-21T13:15:29Z</dc:date>
    </item>
  </channel>
</rss>

