<?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 Switching to AsyncExecutor in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225193#M178323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, I am trying to switch to AsyncExecutor and want to set it up in a clustered mode (enabled on all servers). My process engine configuration looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp; @Bean(name = "processEngineConfiguration")&lt;BR /&gt;&amp;nbsp; public ProcessEngineConfigurationImpl processEngineConfiguration() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setClassLoader(getClass().getClassLoader());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setDataSource(dataSource()); // This is a postgres DB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setDatabaseSchema(activitiSchema); // Have a separate schema for activiti&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setDatabaseSchemaUpdate("true");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setTransactionManager(annotationDrivenTransactionManager());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setJobExecutorActivate(false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setAsyncExecutorEnabled(true);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setAsyncExecutorActivate(true);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setHistory("full");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setMailServerHost(mailServer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngineConfiguration.setMailServerPort(mailServerPort);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return processEngineConfiguration;&lt;BR /&gt;&amp;nbsp; }&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;/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;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;/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;But when I tested a workflow with two servers, I saw both servers executed a task from the same process instance. Is this expected? How can I configure the process engine so that only one server executes any given task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sankalp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 May 2016 21:01:33 GMT</pubDate>
    <dc:creator>sankalpn</dc:creator>
    <dc:date>2016-05-09T21:01:33Z</dc:date>
    <item>
      <title>Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225193#M178323</link>
      <description>Hi all, I am trying to switch to AsyncExecutor and want to set it up in a clustered mode (enabled on all servers). My process engine configuration looks like this:&amp;nbsp; @Bean(name = "processEngineConfiguration")&amp;nbsp; public ProcessEngineConfigurationImpl processEngineConfiguration() {&amp;nbsp;&amp;nbsp;&amp;nbsp; SpringProcessEngine</description>
      <pubDate>Mon, 09 May 2016 21:01:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225193#M178323</guid>
      <dc:creator>sankalpn</dc:creator>
      <dc:date>2016-05-09T21:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225194#M178324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Sankalp,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Was the one job executed twice?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you have default executor implementation any of the nodes can execute task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How can I configure the process engine so that only one server executes any given task?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Disable executor on one node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 08:33:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225194#M178324</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-05-10T08:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225195#M178325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for quick response. It is indeed desirable to have AsyncExecutor enabled on both servers so that any of them can execute a job. Also, legacy JobExecutor is disabled on both.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But, what I observed is, the same job was executed twice. First workflow tasks is not idempotent (it depends on third party web service, and cannot be easily made idempotent). The server which executed this task first completed workflow in normal path and the server which executed later triggered error path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, how do I configure process engine so that any given job is executed only once and AsyncExecutor is still enabled on both servers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 15:36:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225195#M178325</guid>
      <dc:creator>sankalpn</dc:creator>
      <dc:date>2016-05-10T15:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225196#M178326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is "disabling all AsyncExecutors except one" the recommendation from the Activiti Team, in general, for clustered, production Activiti installations?&amp;nbsp; This is not scalable, nor fault tolerant.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Were you telling the OP to disable one just to troubleshoot?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please provide more information as to why you recommended this to the OP because this impacts many of us on which executor we configure in a clustered environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 14:04:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225196#M178326</guid>
      <dc:creator>jwestra</dc:creator>
      <dc:date>2016-05-11T14:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225197#M178327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, the executor should and can be run on multiple nodes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 16:09:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225197#M178327</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-05-18T16:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225198#M178328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the clarification Joram.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; But, why do I see a single task being executed by both AsyncExecutors? Is there some configuration to prevent that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sankalp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 00:32:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225198#M178328</guid>
      <dc:creator>sankalpn</dc:creator>
      <dc:date>2016-05-19T00:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225199#M178329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, that should not happen. The jobs are first locked before they are executed. How did you verify both executors did execute it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 13:26:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225199#M178329</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-05-26T13:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225200#M178330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got logs from same workflow, same service task on both servers. Is there some database/transaction manger level setting for this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 00:52:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225200#M178330</guid>
      <dc:creator>sankalpn</dc:creator>
      <dc:date>2016-05-27T00:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225201#M178331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;and you only had one process instance active? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Transaction should be the default setting (read committed), normally that's the default on all databases we support.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 17:52:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225201#M178331</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-06-02T17:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225202#M178332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Joram and Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I thoroughly apologize for any confusion this thread caused. On the malfunctioning server, upstart jar path was changed and it was running an older test binary which had AsyncExecutor and legacy JobExecutor enabled. New jar with updated, correct activiti config did not run to begin with giving us erroneous results. The moment we corrected upstart, we saw correct behavior. Maybe this thread should serve as a lesson. Your clarification about locking tasks is indeed valuable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sankalp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 15:58:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225202#M178332</guid>
      <dc:creator>sankalpn</dc:creator>
      <dc:date>2016-06-13T15:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Switching to AsyncExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225203#M178333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for posting back. That does explain it &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, 20 Jun 2016 12:54:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/switching-to-asyncexecutor/m-p/225203#M178333</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-06-20T12:54:43Z</dc:date>
    </item>
  </channel>
</rss>

