<?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 Setting local variables in execution which is going to be created next in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/setting-local-variables-in-execution-which-is-going-to-be/m-p/21098#M9292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Consider that there is a &amp;nbsp;" Service task A " &amp;nbsp;which is attached to a parallel gateway then there are two tasks "Service Task B " and "Service task C".&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have marked " Service Task B " , "Service task C" and parallel gateway as Asynchronous&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore a &lt;STRONG&gt;new execution&lt;/STRONG&gt; will be created to execute&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;"Service task C"&lt;/STRONG&gt; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose Execution 1 was executing Service Task A and then&lt;/P&gt;&lt;P&gt;Execution 1 started executing Service Task B and&lt;/P&gt;&lt;P&gt;Execution 2 was created and it started executing service task B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How to make execution 2 aware that it was created from execution 1 ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Similarly while On Join only 1 execution remains&amp;nbsp;then in parallel gateway I want to collect local variables of both execution 2 and execution 1 and perform some operation and make a new variable on&amp;nbsp;the surviving execution&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/alfresco/13482_Untitled Diagram.jpg" style="width: 620px; height: 252px;" /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After service task A I need to dynamically set X = 1 for 1 execution and X = 2.5 for other execution.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If i can set those values in listener of parallel gateway then how can i identify which is old execution and which is new execution .&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Apr 2017 13:59:48 GMT</pubDate>
    <dc:creator>piyush_kaizen</dc:creator>
    <dc:date>2017-04-30T13:59:48Z</dc:date>
    <item>
      <title>Setting local variables in execution which is going to be created next</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/setting-local-variables-in-execution-which-is-going-to-be/m-p/21098#M9292</link>
      <description>Consider that there is a &amp;nbsp;" Service task A " &amp;nbsp;which is attached to a parallel gateway then there are two tasks "Service Task B " and "Service task C".I have marked " Service Task B " , "Service task C" and parallel gateway as Asynchronous.Therefore a new execution will be created to execute&amp;nbsp;"Service</description>
      <pubDate>Sun, 30 Apr 2017 13:59:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/setting-local-variables-in-execution-which-is-going-to-be/m-p/21098#M9292</guid>
      <dc:creator>piyush_kaizen</dc:creator>
      <dc:date>2017-04-30T13:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Setting local variables in execution which is going to be created next</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/setting-local-variables-in-execution-which-is-going-to-be/m-p/21099#M9293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I completely understand your scenario, but if you have marked both Service Task B and Service Task C as asynchronous, then the original execution from Service Task A is released as soon as you hit the gateway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can prove this by logging the execution ID from each of the service tasks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for collecting local variables from each of the branch executions, you can set variables on the process instance which will be child execution agnostic.&lt;BR /&gt;&lt;SPAN&gt;I typically use map with the execution id as the key so there is no overlap between the different branches.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Another option for somethign ilke this is to use a multi instance loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Perhaps I am missing what you are trying to do, perhaps a more specific example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 May 2017 20:40:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/setting-local-variables-in-execution-which-is-going-to-be/m-p/21099#M9293</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-01T20:40:06Z</dc:date>
    </item>
  </channel>
</rss>

