<?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 get parent process instance  in a child process  in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/get-parent-process-instance-in-a-child-process/m-p/162317#M116206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a question regarding to the call activity sub process. In principal, i would like to start a parent process, which has some user tasks and calling activities. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When child process in the calling activity starts, I would like to get the parent process instance. The input param is the task (Task), which is in the case the user task of child process. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecutionEntity executionEntity = (ExecutionEntity) runtimeService.createExecutionQuery().executionId(task.getExecutionId()).singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;String parentId =executionEntity.getParentId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;String superExecutionId = executionEntity.getSuperExecutionId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecutionEntity rootExecution = (ExecutionEntity)runtimeService.createExecutionQuery().executionId(parentId).singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ProcessInstance processInstance=runtimeService.createProcessInstanceQuery().processDefinitionId(rootExecution.getProcessDefinitionId()).singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Somehow, I dont get the parent process instance. Can someone help to find out how to get the parent process instance?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Aug 2013 10:43:52 GMT</pubDate>
    <dc:creator>hyd198471</dc:creator>
    <dc:date>2013-08-19T10:43:52Z</dc:date>
    <item>
      <title>get parent process instance  in a child process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-parent-process-instance-in-a-child-process/m-p/162317#M116206</link>
      <description>Hello everyone, I have a question regarding to the call activity sub process. In principal, i would like to start a parent process, which has some user tasks and calling activities. When child process in the calling activity starts, I would like to get the parent process instance. The input param is</description>
      <pubDate>Mon, 19 Aug 2013 10:43:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-parent-process-instance-in-a-child-process/m-p/162317#M116206</guid>
      <dc:creator>hyd198471</dc:creator>
      <dc:date>2013-08-19T10:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: get parent process instance  in a child process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-parent-process-instance-in-a-child-process/m-p/162318#M116207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's because the transaction wasn't committed to the database yet. You can use the EngineServices instance you can get from a DelegateExecution to use the same transaction context and then you should be able to find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 07:14:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-parent-process-instance-in-a-child-process/m-p/162318#M116207</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-08-21T07:14:48Z</dc:date>
    </item>
  </channel>
</rss>

