<?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: Simultaneous process creation and execution in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78974#M52486</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;500+ seconds for a single transaction seems a bit "dangerous" considering DB locks, concurrency and the like.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Correct&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Am I right in assuming that if the first task in the process is a human task then there is no real issue in terms of the length of the transaction (i.e. it should take “a few seconds” (ignore hardware, DB etc.) to do the Activiti inserts etc. to set up the process) as Activiti will just go into a wait sate?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Correct&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you should investigate (in any case) is why could starting one of the 100 instances fail and there are other options.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E.g. to split it into individual starts and have a retry on each one that failed by e.g. giving a process instance a business key and looking up in a retry (e.g. if it was from a batch file) if a process with a specific businesskey already exists. But creating parallel threads yourself, e.g. 10, and having all of them use the same transaction (not sure how to do that :-)) could be an option to reduce time… or…. Basically, this is not specific to Activiti, but more generic problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Aug 2011 09:26:42 GMT</pubDate>
    <dc:creator>ronald_van_kuij</dc:creator>
    <dc:date>2011-08-09T09:26:42Z</dc:date>
    <item>
      <title>Simultaneous process creation and execution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78971#M52483</link>
      <description>Hi,Our plan is to use Activiti embedded within our application.&amp;nbsp; One piece of functionality that we are looking to build is where a manager will have the option of creating say 100 pieces of work for his/her staff.&amp;nbsp; In effect the manager will enter 100 customer numbers on a screen that a team of peo</description>
      <pubDate>Mon, 08 Aug 2011 13:16:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78971#M52483</guid>
      <dc:creator>j_p_ryan</dc:creator>
      <dc:date>2011-08-08T13:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous process creation and execution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78972#M52484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;- what is one go? One transaction? Is not a problem if the first task is a 'user task' or something short, not a 1h db run…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Nope, that is sequential, unless you create 100 threads yourself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Be concerned about things you would otherwise be conserned about as well… &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2011 15:50:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78972#M52484</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-08-08T15:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous process creation and execution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78973#M52485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ronald,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the response.&amp;nbsp; Theoretical (for now at least) follow up:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Assume that “one go” is a single transaction (we must create the processes for the 100 customers or not at all) and that the first task in the process is a Java call.&amp;nbsp; The task takes 5 seconds to complete for each customer with the task having some side effect (e.g. DB update).&amp;nbsp; I believe that this implies that the transaction will be open for 100 * 5 seconds plus the Activiti Engine time.&amp;nbsp; 500+ seconds for a single transaction seems a bit "dangerous" considering DB locks, concurrency and the like.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just looking for some pointers on how one might proceed if the theory became a reality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I right in assuming that if the first task in the process is a human task then there is no real issue in terms of the length of the transaction (i.e. it should take “a few seconds” (ignore hardware, DB etc.) to do the Activiti inserts etc. to set up the process) as Activiti will just go into a wait sate?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;James&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 08:05:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78973#M52485</guid>
      <dc:creator>j_p_ryan</dc:creator>
      <dc:date>2011-08-09T08:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous process creation and execution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78974#M52486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;500+ seconds for a single transaction seems a bit "dangerous" considering DB locks, concurrency and the like.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Correct&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Am I right in assuming that if the first task in the process is a human task then there is no real issue in terms of the length of the transaction (i.e. it should take “a few seconds” (ignore hardware, DB etc.) to do the Activiti inserts etc. to set up the process) as Activiti will just go into a wait sate?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Correct&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you should investigate (in any case) is why could starting one of the 100 instances fail and there are other options.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E.g. to split it into individual starts and have a retry on each one that failed by e.g. giving a process instance a business key and looking up in a retry (e.g. if it was from a batch file) if a process with a specific businesskey already exists. But creating parallel threads yourself, e.g. 10, and having all of them use the same transaction (not sure how to do that :-)) could be an option to reduce time… or…. Basically, this is not specific to Activiti, but more generic problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 09:26:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78974#M52486</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-08-09T09:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous process creation and execution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78975#M52487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ronald,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess what you are suggesting is to make the creation of the business process instance idempotent.&amp;nbsp; Sounds like a possible use for an aspect (AOP).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would certainly agree that all the usual design challenges will exist around race conditions, what happens if it is valid to have &amp;gt;1 business process for a customer etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I might be back to you if the theory becomes a reality for some more Activiti specific guidance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;James&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 15:48:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78975#M52487</guid>
      <dc:creator>j_p_ryan</dc:creator>
      <dc:date>2011-08-09T15:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous process creation and execution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78976#M52488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Correct and if you make sure the businesskey is unique, the engine will already fail starting another one with the identical key&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 21:37:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/simultaneous-process-creation-and-execution/m-p/78976#M52488</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-08-09T21:37:00Z</dc:date>
    </item>
  </channel>
</rss>

