cancel
Showing results for 
Search instead for 
Did you mean: 

Bootstrapping in AMP alfresco

mrsaqib
Champ in-the-making
Champ in-the-making
Hi,

I have an AMP module component which creates some spaces and files under company_home in bootstrapping. Its working fine, but my issue is i've set the property "executeOnceOnly" = "false" , it means this module will be executed each time alfresco restarts (right?)
So upon next restart, it throws exception that space name already exists, which is true because alfresco has already created the required spaces & files.

Is there any way i can control this that if specific spaces/files does not exists then create otherwise just continue.
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
well in your code where you are creating the spaces you can always check weather it is exist or not.
Are you using java?

mrsaqib
Champ in-the-making
Champ in-the-making
No, i am using bootstrap mechanism and importing ACP file. (see below)

<blockcode>
<bean id="tds.bootstrapSpaces" class="org.alfresco.repo.module.ImporterModuleComponent"
      parent="module.baseComponent">
      <property name="moduleId" value="TDS" />
      <property name="name" value="tds.bootstrapSpaces" />
      <property name="description" value="Initial data requirements" />
      <property name="sinceVersion" value="1.1" />
      <property name="appliesFromVersion" value="1.1" />
      <property name="importer" ref="spacesBootstrap" />   
      <property name="bootstrapViews">
         <list>
            <props>   
               <prop key="path">/${spaces.company_home.childname}</prop>
              <prop key="location">alfresco/module/TDS/bootstrap/data/tds.acp</prop>
         </props>   
   </list>
      </property>
   </bean>

mrsaqib
Champ in-the-making
Champ in-the-making
Any Suggestion please!!!

mrsaqib
Champ in-the-making
Champ in-the-making
There isn't anything line SKIP_EXISTING in import strategy (http://wiki.alfresco.com/wiki/ACP#Import_UUID_Bindings) ???

To skip the update/replace of file if already exists.  ???