<?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 Activiti/Spring Boot disable activiti table generation on startup if tables exist in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activiti-spring-boot-disable-activiti-table-generation-on/m-p/215110#M168240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;I have a spring boot application with activiti integrated via org.acitviti.spring-boot-starter-basic.&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;I created the activiti tables via sql scripts. When I start spring boot, activiti complains that the tables already exist. So I added the following code to potentially stop jpa from complaining the tables exist:&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;@Bean&lt;BR /&gt;StandaloneProcessEngineConfiguration standaloneProcessEngineConfiguration() {&lt;BR /&gt;StandaloneProcessEngineConfiguration standaloneProcessEngineConfiguration =&lt;BR /&gt;new StandaloneProcessEngineConfiguration();&lt;BR /&gt;standaloneProcessEngineConfiguration.setDatabaseSchemaUpdate("true");&lt;BR /&gt;return standaloneProcessEngineConfiguration;&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;But now I get the below stack trace:&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.activiti.engine.ProcessEngineConfiguration] is defined: expected single matching bean but found 2: standaloneProcessEngineConfiguration,springProcessEngineConfiguration&lt;BR /&gt;at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1126)&lt;BR /&gt;at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)&lt;BR /&gt;at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)&lt;BR /&gt;... 25 more&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Basically, the bean is already defined by default and I need to figure out a clean workaround for this. How can I configure activiti/spring such that the tables aren't created on spring startup?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Dec 2016 19:00:16 GMT</pubDate>
    <dc:creator>shere_khan_</dc:creator>
    <dc:date>2016-12-22T19:00:16Z</dc:date>
    <item>
      <title>Activiti/Spring Boot disable activiti table generation on startup if tables exist</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-spring-boot-disable-activiti-table-generation-on/m-p/215110#M168240</link>
      <description>I have a spring boot application with activiti integrated via org.acitviti.spring-boot-starter-basic.I created the activiti tables via sql scripts. When I start spring boot, activiti complains that the tables already exist. So I added the following code to potentially stop jpa from complaining the t</description>
      <pubDate>Thu, 22 Dec 2016 19:00:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-spring-boot-disable-activiti-table-generation-on/m-p/215110#M168240</guid>
      <dc:creator>shere_khan_</dc:creator>
      <dc:date>2016-12-22T19:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti/Spring Boot disable activiti table generation on startup if tables exist</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-spring-boot-disable-activiti-table-generation-on/m-p/215111#M168241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I imagine since you are using the spring boot starters, that you are using Community Edition. If not, please let me know as the answer is different for Community Edition and Enterprise Edition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to access the process engine configuration when Activiti is initialized, you need to create a bean/component that implements the org.activiti.spring.boot.ProcessEngineConfigurationConfigurer interface.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN class="" style="color: #aa22ff; background-color: #f8f8f8;"&gt;@Component&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #008000; background-color: #f8f8f8; font-weight: bold;"&gt;public&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #008000; background-color: #f8f8f8; font-weight: bold;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="background-color: #f8f8f8; color: #222222;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0000ff; background-color: #f8f8f8; font-weight: bold;"&gt;MyProcessEngineCfgConfigurer&lt;/SPAN&gt;&lt;SPAN style="background-color: #f8f8f8; color: #222222;"&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #008000; background-color: #f8f8f8; font-weight: bold;"&gt;implements&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #222222; background-color: #f8f8f8;"&gt;ProcessEngineConfigurationConfigurer&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f8f8f8;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #008000; background-color: #f8f8f8; font-weight: bold;"&gt;&amp;nbsp; public&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #b00040; background-color: #f8f8f8;"&gt;void&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #f8f8f8; color: #0000ff;"&gt;configure&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f8f8f8;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #222222; background-color: #f8f8f8;"&gt;SpringProcessEngineConfiguration&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #222222; background-color: #f8f8f8;"&gt;springProcessEngineConfiguration&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f8f8f8;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f8f8f8;"&gt;{&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f8f8f8;"&gt;...&lt;/SPAN&gt;&lt;SPAN class="" style="color: #222222; background-color: #f8f8f8; border: 1px solid #ff0000;"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #408080; background-color: #f8f8f8;"&gt;// This is where we tweak the process engine configuration&lt;/SPAN&gt;&lt;SPAN style="color: #222222; background-color: #f8f8f8;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f8f8f8;"&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f8f8f8;"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;The Spring boot starter AbstractProcessEngineAutoConfiguration class will look for this bean and if present will call the configure() method on it as soon as the SpringProcessEngineConfiguration is constructed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;The following github thread talks about this feature:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/jbarrez/spring-boot-with-activiti-example/issues/5" title="https://github.com/jbarrez/spring-boot-with-activiti-example/issues/5" rel="nofollow noopener noreferrer"&gt;Unclear how to configure activiti · Issue #5 · jbarrez/spring-boot-with-activiti-example · GitHub&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&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;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2017 16:34:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-spring-boot-disable-activiti-table-generation-on/m-p/215111#M168241</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-01-05T16:34:04Z</dc:date>
    </item>
  </channel>
</rss>

