<?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: set subprocess name in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36076#M15223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;It works fine on 1.9 could be an issue with the admin app UI that was fixed post to 1.5.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;IMG class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/22474_pastedImage_16.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the REST API return the process instance name?&amp;nbsp;&lt;/P&gt;&lt;P&gt;POST&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://localhost:9999/activiti-app/api/query/historic-process-instances?tenant_id=1" title="http://localhost:9999/activiti-app/api/query/historic-process-instances?tenant_id=1" rel="nofollow noopener noreferrer"&gt;http://host&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ort/activiti-app/api/query/historic-process-instances?tenant_id=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;"superProcessInstanceId": "40010"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note replace tenant_id with the tenant you are using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2018 09:53:34 GMT</pubDate>
    <dc:creator>bassam_al-saror</dc:creator>
    <dc:date>2018-08-07T09:53:34Z</dc:date>
    <item>
      <title>set subprocess name</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36072#M15219</link>
      <description>I have a Process Definition that makes a number of different calls to a subprocess via Call Activity,&amp;nbsp; as the subprocess is called multiple times for many different reasons, I'd like to be able to set the 'Name' for&amp;nbsp;each instance of the called subprocess, so that name gets displayed on the Admin Con</description>
      <pubDate>Fri, 03 Aug 2018 13:57:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36072#M15219</guid>
      <dc:creator>peteth</dc:creator>
      <dc:date>2018-08-03T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: set subprocess name</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36073#M15220</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can chek this test case where you can change the current process instance name in activiti 6. You can check the for the same test case exists in the 1.5 as well....&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Activiti/Activiti/blob/6.x/modules/activiti-engine/src/test/java/org/activiti/engine/test/api/runtime/RuntimeServiceTest.java" title="https://github.com/Activiti/Activiti/blob/6.x/modules/activiti-engine/src/test/java/org/activiti/engine/test/api/runtime/RuntimeServiceTest.java" rel="nofollow noopener noreferrer"&gt;Activiti/RuntimeServiceTest.java at 6.x · Activiti/Activiti · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test this method :&lt;STRONG&gt;testSetProcessInstanceName&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 06:50:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36073#M15220</guid>
      <dc:creator>mdtabrezmca</dc:creator>
      <dc:date>2018-08-06T06:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: set subprocess name</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36074#M15221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where did&amp;nbsp;you&amp;nbsp;use the ExecutionListener?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 15:57:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36074#M15221</guid>
      <dc:creator>bassam_al-saror</dc:creator>
      <dc:date>2018-08-06T15:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: set subprocess name</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36075#M15222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestions and question.&amp;nbsp; I tried running that Unit Test that sets the process instance name using Version 1.5 and yes it works.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding where I put the listener, I tried it on the Start of the Process,&amp;nbsp;with the listener listening to&amp;nbsp;the 'start' event type.&amp;nbsp; I also tried it on the first transition arrow, after the 'start'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However today rather than setting on the listener,&amp;nbsp; I realised the Called Process always makes a call to a&amp;nbsp; &amp;nbsp; &amp;nbsp;JavaDelegate's execute(DelegateExecution execution)&lt;/P&gt;&lt;P&gt;so today I tried setting the process name in there to a process variable.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9.0pt;"&gt;&lt;PRE style="font-size: 9.0pt;"&gt;&lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;execute(DelegateExecution execution) &lt;SPAN style="color: #000080; font-weight: bold;"&gt;throws &lt;/SPAN&gt;Exception {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; String currentActivityId = execution.getCurrentActivityId();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;logger&lt;/SPAN&gt;.debug(String.&lt;SPAN&gt;format&lt;/SPAN&gt;( &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"CurrentActivityId: %s , for processInstanceId:%s"&lt;/SPAN&gt;, currentActivityId, execution.getProcessInstanceId() ));&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(currentActivityId != &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null &lt;/SPAN&gt;&amp;amp;&amp;amp; currentActivityId.equals(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"restRetryTask"&lt;/SPAN&gt;)) {&lt;SPAN style="color: #808080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;RuntimeService runtimeService = execution.getEngineServices().getRuntimeService();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String taskName = (String) execution.getVariable(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"taskName"&lt;/SPAN&gt;);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;logger&lt;/SPAN&gt;.debug(String.&lt;SPAN&gt;format&lt;/SPAN&gt;(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Setting ProcessInstanceName to TaskName: %s , for processInstanceId:%s"&lt;/SPAN&gt;, taskName, execution.getProcessInstanceId()));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(taskName != &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;) {&lt;BR /&gt;&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; runtimeService.setProcessInstanceName(execution.getProcessInstanceId(), taskName);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;And interestingly, this seems to correctly set the value into the ACT_HI_PROCINST table for the called process, I can run a SQL query to check (see screenshot below).&amp;nbsp; However the value still does not appear in the Admin App UI&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM act_hi_procinst WHERE PROC_INST_ID_ = 5522689&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/22468_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Admin UI for parent process&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/22472_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Admin UI for Called Process&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/22473_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts gratefully received.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 16:33:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36075#M15222</guid>
      <dc:creator>peteth</dc:creator>
      <dc:date>2018-08-06T16:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: set subprocess name</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36076#M15223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;It works fine on 1.9 could be an issue with the admin app UI that was fixed post to 1.5.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;IMG class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/22474_pastedImage_16.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the REST API return the process instance name?&amp;nbsp;&lt;/P&gt;&lt;P&gt;POST&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://localhost:9999/activiti-app/api/query/historic-process-instances?tenant_id=1" title="http://localhost:9999/activiti-app/api/query/historic-process-instances?tenant_id=1" rel="nofollow noopener noreferrer"&gt;http://host&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ort/activiti-app/api/query/historic-process-instances?tenant_id=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;"superProcessInstanceId": "40010"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note replace tenant_id with the tenant you are using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 09:53:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-subprocess-name/m-p/36076#M15223</guid>
      <dc:creator>bassam_al-saror</dc:creator>
      <dc:date>2018-08-07T09:53:34Z</dc:date>
    </item>
  </channel>
</rss>

