<?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: Ended process? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145976#M101962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's an option Ronald, however, without history enabled we cannot be 100% sure a process is ended or has never existed in the first place. So returning true based on the existence (or absence) of a runtime-process instance is not a safe bet. We also cannot rely on the history being on, so I guess this is a judgement-call that needs to be done by the user of the API.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Mar 2013 09:00:08 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2013-03-28T09:00:08Z</dc:date>
    <item>
      <title>Ended process?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145970#M101956</link>
      <description>I'm learning Activiti &amp;amp; had a question about determining whether or not a process has ended.I have a unit tests that runs thru the tasks in a process. It then calls ProcessInstance.isEnded() which returns false seeming to indicate that the process instance has not completed.But if I perform a hi</description>
      <pubDate>Tue, 26 Mar 2013 18:23:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145970#M101956</guid>
      <dc:creator>oconnor0</dc:creator>
      <dc:date>2013-03-26T18:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Ended process?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145971#M101957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I you reload, or try to reload, the processinstance from the database before doing the last isEnded() you'll see that that it is not there anymore.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, this is kind of confusing, but there is no guarantee that the process is ended in the same thread, so the behaviour you see is 'nomal' but indeed kind of illogical in a sense&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 22:38:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145971#M101957</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2013-03-26T22:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Ended process?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145972#M101958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I you reload, or try to reload, the processinstance from the database before doing the last isEnded() you'll see that that it is not there anymore.&lt;BR /&gt;&lt;BR /&gt;Yes, this is kind of confusing, but there is no guarantee that the process is ended in the same thread, so the behaviour you see is 'nomal' but indeed kind of illogical in a sense&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;To make sure I understand:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I attempt to load the completed process instance via RuntimeService.createProcessInstanceQuery(), I will be unable to find it because it's been removed from the current process instances &amp;amp; into historical (assuming historical is turned on)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The absence of that process instance is an indication that it has completed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is an historical query the only way via the API to determine how that process instance completed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Under what conditions does isEnded() return the correct answer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 22:52:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145972#M101958</guid>
      <dc:creator>oconnor0</dc:creator>
      <dc:date>2013-03-26T22:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ended process?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145973#M101959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I you reload, or try to reload, the processinstance from the database before doing the last isEnded() you'll see that that it is not there anymore.&lt;BR /&gt;&lt;BR /&gt;Yes, this is kind of confusing, but there is no guarantee that the process is ended in the same thread, so the behaviour you see is 'nomal' but indeed kind of illogical in a sense&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;To make sure I understand:&lt;BR /&gt;&lt;BR /&gt;If I attempt to load the completed process instance via RuntimeService.createProcessInstanceQuery(), I will be unable to find it because it's been removed from the current process instances &amp;amp; into historical (assuming historical is turned on)?&lt;BR /&gt;&lt;BR /&gt;The absence of that process instance is an indication that it has completed.&lt;BR /&gt;&lt;BR /&gt;Is an historical query the only way via the API to determine how that process instance completed?&lt;BR /&gt;&lt;BR /&gt;Under what conditions does isEnded() return the correct answer?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I find this situation absolutely confusing too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Absence shows ending but not vice-versa, a process might be ended but may not be removed from runtime table. Also historical query's unfinished/finished methods shows this behavior. You can use native queries for end time nullity to be sure.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 01:25:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145973#M101959</guid>
      <dc:creator>gokceng1</dc:creator>
      <dc:date>2013-03-27T01:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ended process?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145974#M101960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The&amp;nbsp; ProcessInstance.isEnded() only works if the API-call you just did actually ended the workflow (eg. startWorklfow of a workflow with NO wait-states in it and NO async behavior). Please remember that the object you get back from our API is detached and is only a representation of the workflow at the time you did the actual call. Any later mutations to the process by other API-calls or internal job-threads are not reflected on the detached ProcesInstance entity. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As ronald says, if you want to make sure a process is finished NOW, use the runtimeService.query(..) to see if it returns a process-instance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 12:32:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145974#M101960</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-03-27T12:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ended process?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145975#M101961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe a runtimeService.isEnded(procId) as a convenience method?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 15:26:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145975#M101961</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2013-03-27T15:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Ended process?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145976#M101962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's an option Ronald, however, without history enabled we cannot be 100% sure a process is ended or has never existed in the first place. So returning true based on the existence (or absence) of a runtime-process instance is not a safe bet. We also cannot rely on the history being on, so I guess this is a judgement-call that needs to be done by the user of the API.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 09:00:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ended-process/m-p/145976#M101962</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-03-28T09:00:08Z</dc:date>
    </item>
  </channel>
</rss>

