<?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 Process not query-able immediately after it started in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/process-not-query-able-immediately-after-it-started/m-p/195118#M148248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just found this weird thing: if there is a sub-process, or parallel execution, it appears that process instance / execution queries return null up until the process reaches its first wait state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I.e. I have the following code in my sub-process' Java Service Task:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RuntimeService rs = execution.getEngineServices().getRuntimeService();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String processInstanceId = execution.getProcessInstanceId();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProcessInstance parentProcess = rs.createProcessInstanceQuery().subProcessInstanceId(processInstanceId).includeProcessVariables().singleResult();&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The sub-process diagram is quite simple: &lt;/SPAN&gt;&lt;A href="http://www.screencast.com/t/kZaTJsIb" rel="nofollow noopener noreferrer"&gt;http://www.screencast.com/t/kZaTJsIb&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem here is that without that intermediary timer event, the query above will return null for parent process. With the timer, everything appears to be working properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like the task execution happens in a separate database transaction - hence the lack of visibility. Is this correct behaviour? &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 01:43:10 GMT</pubDate>
    <dc:creator>ekolesnikov</dc:creator>
    <dc:date>2014-06-20T01:43:10Z</dc:date>
    <item>
      <title>Process not query-able immediately after it started</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-not-query-able-immediately-after-it-started/m-p/195118#M148248</link>
      <description>Hi all,Just found this weird thing: if there is a sub-process, or parallel execution, it appears that process instance / execution queries return null up until the process reaches its first wait state.I.e. I have the following code in my sub-process' Java Service Task:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RuntimeService rs = execu</description>
      <pubDate>Fri, 20 Jun 2014 01:43:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-not-query-able-immediately-after-it-started/m-p/195118#M148248</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-06-20T01:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Process not query-able immediately after it started</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-not-query-able-immediately-after-it-started/m-p/195119#M148249</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;BR /&gt;&lt;SPAN&gt;This is normal behaviour in Activiti. The database changes will only be performed when a wait state is reached, so it's not yet in the database at all. An activity can be made asynchronous to force a wait state as well.&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>Fri, 20 Jun 2014 06:57:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-not-query-able-immediately-after-it-started/m-p/195119#M148249</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-06-20T06:57:57Z</dc:date>
    </item>
  </channel>
</rss>

