<?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 Finding Parent Execution With RuntimeService in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/finding-parent-execution-with-runtimeservice/m-p/122831#M86496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've 2 layers: Parent Process and 3 child processes which are call activities. These 3 callactivities are parallel to each other.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I started parent and query for parent I got 4 instead of 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;runtimeService.createExecutionQuery().processDefinitionKey("level1Process").singleResult();&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked 4 of them by debugging, and I see 3 of 4 are parallel executions, so their parentId values are null. They have same processInstanceId and processDefinitionId. After that inspection I started to use &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;createNativeExecutionQuery()&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; but I couldn't get what I want:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;runtimeService.createNativeExecutionQuery().parameter("parentId", null).parameter("processDefinitionKey", "level1Process").singleResult();&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This returns null. Also &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;runtimeService.createNativeExecutionQuery().parameter("processDefinitionKey", "level1Process").singleResult();&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;returns null. The last one should be the same as first query. Because I query processDefinitionKey in both but one of them gives exception the other null. What should I do?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Dec 2012 12:34:49 GMT</pubDate>
    <dc:creator>gokceng1</dc:creator>
    <dc:date>2012-12-31T12:34:49Z</dc:date>
    <item>
      <title>Finding Parent Execution With RuntimeService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/finding-parent-execution-with-runtimeservice/m-p/122831#M86496</link>
      <description>Hi,I've 2 layers: Parent Process and 3 child processes which are call activities. These 3 callactivities are parallel to each other.As I started parent and query for parent I got 4 instead of 1.1runtimeService.createExecutionQuery().processDefinitionKey("level1Process").singleResult();‍I checked 4 o</description>
      <pubDate>Mon, 31 Dec 2012 12:34:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/finding-parent-execution-with-runtimeservice/m-p/122831#M86496</guid>
      <dc:creator>gokceng1</dc:creator>
      <dc:date>2012-12-31T12:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Parent Execution With RuntimeService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/finding-parent-execution-with-runtimeservice/m-p/122832#M86497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't fully grasp what you are trying to do: but when you are using a call activity, it will call another process definition, hence the process definition key will be different. Did you try using the 'superProcessInstanceId' in your query?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2013 09:38:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/finding-parent-execution-with-runtimeservice/m-p/122832#M86497</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-01-03T09:38:16Z</dc:date>
    </item>
  </channel>
</rss>

