<?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: History and multi instance SubProcess in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229180#M182310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if I'm following, but: multi instance won't show up in the history logs, only multiple historic activities. Which I agree, is not really nice and we should make that better.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jan 2016 12:07:16 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2016-01-07T12:07:16Z</dc:date>
    <item>
      <title>History and multi instance SubProcess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229179#M182309</link>
      <description>Hi, guys.I'm playing with retrieving historical sequence way for process instance and was confused a little bit by the case with multi instance sub process (not a call activity).I have SubProcess with loop cardinality 3 and there are some activities in the sub process.When I get historical activity</description>
      <pubDate>Wed, 06 Jan 2016 22:39:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229179#M182309</guid>
      <dc:creator>iam</dc:creator>
      <dc:date>2016-01-06T22:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: History and multi instance SubProcess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229180#M182310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if I'm following, but: multi instance won't show up in the history logs, only multiple historic activities. Which I agree, is not really nice and we should make that better.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 12:07:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229180#M182310</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-01-07T12:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: History and multi instance SubProcess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229181#M182311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Joram.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done simplest test with multi instance script task and the history log looks… a little bit unexpected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACT_HI_ACTINST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[table][tr][h]ID_[/h][h]PROC_DEF_ID_[/h][h]PROC_INST_ID_[/h][h]EXECUTION_ID_[/h][h]ACT_ID_[/h][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]6[/td][td]testProcessA:1:4[/td][td]5[/td][td]5[/td][td]startevent1[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]10[/td][td]testProcessA:1:4[/td][td]5[/td][td]&lt;/SPAN&gt;&lt;STRONG style="color: red;"&gt;9&lt;/STRONG&gt;&lt;SPAN&gt;[/td][td]scripttask1[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]26[/td][td]testProcessA:1:4[/td][td]5[/td][td]18[/td][td]scripttask1[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]31[/td][td]testProcessA:1:4[/td][td]5[/td][td]19[/td][td]scripttask1[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]34[/td][td]testProcessA:1:4[/td][td]5[/td][td]5[/td][td]endevent3[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/table]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACT_HI_VARINST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[table][tr][h]ID_[/h][h]PROC_INST_ID_[/h][h]EXECUTION_ID_[/h][h]NAME_[/h][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]7[/td][td]5[/td][td]5[/td][td]orderId[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]11[/td][td]5[/td][td]9[/td][td]nrOfInstances[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]13[/td][td]5[/td][td]9[/td][td]nrOfCompletedInstances[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]15[/td][td]5[/td][td]9[/td][td]nrOfActiveInstances[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]20[/td][td]5[/td][td]&lt;/SPAN&gt;&lt;STRONG style="color: red;"&gt;17&lt;/STRONG&gt;&lt;SPAN&gt;[/td][td]loopCounter[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]24[/td][td]5[/td][td]18[/td][td]loopCounter[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[tr][td]29[/td][td]5[/td][td]19[/td][td]loopCounter[/td][/tr]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/table]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Execution "9" is a scope. If we would not have this executionId in ACT_HI_ACTINST then we will not know how to retrieve "nrOfCompletedInstances" by executionId.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;On the other hand.. if we dont have execution "17" in ACT_HI_ACTINST then we dont know nothing about execution with loopCounter=0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And about executions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In runtime I've got each of the three execution using breakpoint in some test method of my test bean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I always use Context.getExecutionContext().getExecution() in my beans to use current execution, I actualy do not use execution as argument in processes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It was surprise: the first execution was a ScopeExecution, the second and the third was ConcurrentExecutions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just try to modify MultiInstanceActivityBehavior from &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (loopCounter == 0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callCustomActivityStartListeners(execution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerActivityBehavior.execute(execution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.executeActivity(activity);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (loopCounter == 0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callCustomActivityStartListeners(execution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Context.setExecutionContext((ExecutionEntity)execution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerActivityBehavior.execute(execution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } finally {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Context.removeExecutionContext();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.executeActivity(activity);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not shure if that was correct to set Execution Context there, but after that Context.getExecutionContext().getExecution() returns ConcurrentExecutions for each parallel instances.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 02:08:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229181#M182311</guid>
      <dc:creator>iam</dc:creator>
      <dc:date>2016-01-08T02:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: History and multi instance SubProcess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229182#M182312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One thing to note ios that the execution id in the ACT_HI_ACTINST is not really usable to correlate with the ACT_HI_VARINST, as it's not necessarily the execution that enters the activity that will be used to set variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not following you remark about setting the ExecutionContext. To my knowledge, that class serves a few use cases (getting the context in case of job failure is one I believe). If you'd want to rely on that call, it would need to be added on many more behaviours besides the MultiInstance behaviour.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 20:57:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/history-and-multi-instance-subprocess/m-p/229182#M182312</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-01-20T20:57:04Z</dc:date>
    </item>
  </channel>
</rss>

