<?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 Name in Java service in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243030#M196160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh,&lt;/P&gt;&lt;P&gt;Upon starting a process, activiti persists the data to database upon reaching the first asynchronous task. Hence the query was able to fetch from the name from the database!&lt;/P&gt;&lt;P&gt;It is explained here in detail&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/userguide/index.html#asyncContinuations" title="https://www.activiti.org/userguide/index.html#asyncContinuations" rel="nofollow noopener noreferrer"&gt;Activiti User Guide&lt;/A&gt;&amp;nbsp;(&amp;nbsp;section Asynchronous Continuations)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jan 2017 17:11:00 GMT</pubDate>
    <dc:creator>cjose</dc:creator>
    <dc:date>2017-01-11T17:11:00Z</dc:date>
    <item>
      <title>Get Process Name in Java service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243025#M196155</link>
      <description>Hi,We are using Enterprise Activiti 1.5I'm trying to get the Process Name of the current process in Java service task but couldn't find any method, see method to get the process instance id by "execution.getProcessInstanceId()".Any idea? Please let me know.Thanks!!</description>
      <pubDate>Fri, 28 Oct 2016 15:32:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243025#M196155</guid>
      <dc:creator>eramesh</dc:creator>
      <dc:date>2016-10-28T15:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get Process Name in Java service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243026#M196156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get it via&amp;nbsp;process instance query API&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;execution.getEngineServices().getRuntimeService().createProcessInstanceQuery().processInstanceId(execution.getProcessInstanceId()).singleResult().getName();&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2016 17:24:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243026#M196156</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2016-12-21T17:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get Process Name in Java service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243027#M196157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Ciju!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried the code it gave me null pointer exception so tried to get the query count for the process instance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ProcessInstanceQuery pqry = execution.getEngineServices().getRuntimeService().createProcessInstanceQuery().processInstanceId(execution.getProcessInstanceId())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the query count is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using Enterprise Activiti 1.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Durai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 18:48:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243027#M196157</guid>
      <dc:creator>eramesh</dc:creator>
      <dc:date>2017-01-10T18:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Process Name in Java service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243028#M196158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is probably because the process instance is not yet committed&amp;nbsp;into the database at the time of your query.&lt;/P&gt;&lt;P&gt;For example if you do query count&amp;nbsp;in a script/service task in a process that looks like Start-&amp;gt;Script-&amp;gt;End it doesn't work.&lt;/P&gt;&lt;P&gt;Now if you make the script/service task "Async" and do the process instance query, it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 23:23:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243028#M196158</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-01-10T23:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get Process Name in Java service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243029#M196159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ciju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I had the query count logic in "Execution Listeners" start event in the task following Process Start. After marking the checkbox "Asyncronous" checked in the task where my script exists then I was able to get the query result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you got minute can you please throw some light on the purpose of the "Asynchronous" checkbox in the user task does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for the help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2017 13:35:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243029#M196159</guid>
      <dc:creator>eramesh</dc:creator>
      <dc:date>2017-01-11T13:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Process Name in Java service</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243030#M196160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh,&lt;/P&gt;&lt;P&gt;Upon starting a process, activiti persists the data to database upon reaching the first asynchronous task. Hence the query was able to fetch from the name from the database!&lt;/P&gt;&lt;P&gt;It is explained here in detail&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/userguide/index.html#asyncContinuations" title="https://www.activiti.org/userguide/index.html#asyncContinuations" rel="nofollow noopener noreferrer"&gt;Activiti User Guide&lt;/A&gt;&amp;nbsp;(&amp;nbsp;section Asynchronous Continuations)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2017 17:11:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-process-name-in-java-service/m-p/243030#M196160</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-01-11T17:11:00Z</dc:date>
    </item>
  </channel>
</rss>

