<?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: Querying ProcessInstance on PROCESS_COMPLETED events in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/querying-processinstance-on-process-completed-events/m-p/12467#M5473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to get the variable I wanted like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; String var = (String) ((ExecutionEntity) ((ActivitiEntityEventImpl) event).getEntity()).getVariable("var");&lt;/P&gt;&lt;P&gt;And I noticed that the id returned by event.getProcessInstanceId() will exist in the database after event handling is finished. Perhaps only the history of the process instance is saved in that table. My problem is fixed; but still it would be nice to be able to query finished process instances and unfinished alike.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Apr 2017 12:54:47 GMT</pubDate>
    <dc:creator>ravenblackdusk</dc:creator>
    <dc:date>2017-04-17T12:54:47Z</dc:date>
    <item>
      <title>Querying ProcessInstance on PROCESS_COMPLETED events</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/querying-processinstance-on-process-completed-events/m-p/12466#M5472</link>
      <description>I'm trying to handle a PROCESS_COMPLETED event by creating an ActivityEventListener bean:&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onEvent(ActivitiEvent event) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;final ProcessInstance processInstance = event.getEngineServices().getRuntimeService()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .createProcessInstanceQuery().processInstan</description>
      <pubDate>Mon, 17 Apr 2017 09:01:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/querying-processinstance-on-process-completed-events/m-p/12466#M5472</guid>
      <dc:creator>ravenblackdusk</dc:creator>
      <dc:date>2017-04-17T09:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Querying ProcessInstance on PROCESS_COMPLETED events</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/querying-processinstance-on-process-completed-events/m-p/12467#M5473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to get the variable I wanted like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; String var = (String) ((ExecutionEntity) ((ActivitiEntityEventImpl) event).getEntity()).getVariable("var");&lt;/P&gt;&lt;P&gt;And I noticed that the id returned by event.getProcessInstanceId() will exist in the database after event handling is finished. Perhaps only the history of the process instance is saved in that table. My problem is fixed; but still it would be nice to be able to query finished process instances and unfinished alike.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Apr 2017 12:54:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/querying-processinstance-on-process-completed-events/m-p/12467#M5473</guid>
      <dc:creator>ravenblackdusk</dc:creator>
      <dc:date>2017-04-17T12:54:47Z</dc:date>
    </item>
  </channel>
</rss>

