cancel
Showing results for 
Search instead for 
Did you mean: 

Problem and unknown when install amp in alfresco

cperez
Champ in-the-making
Champ in-the-making
Hi all.

I'm developing an amp module and I need help.

First of all, I import a space template.acp to "space template" within "data dictionary" and this work fine.

But I want to create at the same time as I Install the amp, or start alfresco to create Space from that template within all childnodes in "company_home/Input_data/Entity" and I dont know how.
I want to do that automatically.
How I can do?

I have also created a link menu I want to show only within the spaces will be created whit the previous method. To do this I have the following code but it adds to me this links whithin all spaces.


<alfresco-config>
   <config>
         <action id="subir_Documentacion">
               <label-id>digit_title</label-id>
               <image>/images/icons/scan16x16.png</image>
               <action>wizard:digitWizardApplet</action>
               <action-listener>#{BrowseBean.setupSpaceAction}</action-listener>
               <params>
                     <param name="id">#{actionContext.id}</param>
               </params>
          </action>
      
         <action-group id="space_browse_menu">
               <action idref="subir_Documentacion" />
         </action-group>
      </config>
     
</alfresco-config>


How I can do to only be done in specific spaces?

thank a lot!!
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
I think you should refer this to import data on bootstrap.
http://blog.arvixe.com/bootstrapping-data-in-alfresco/

cperez
Champ in-the-making
Champ in-the-making
Thanks for your quick answer

Everything mentioned in the link I already had done.
I look and I found this module-context.xml code to import the acp in a specific space (within Company_home/Data_Input/Testing) but does not work.

<bean id="moduloTesting.bootstrap" class="org.alfresco.repo.module.ImporterModuleComponent" parent="module.baseComponent">
   <!– Module Details –>
   <property name="moduleId" value="org.alfresco.AlfrescoTesting" />
   <property name="name" value="Facturas" />
   <property name="description" value="Import the space template" />
   <property name="sinceVersion" value="1.0" />
   <property name="appliesFromVersion" value="1.0" />
  
   <!– Data properties –>
   <property name="importer" ref="spacesBootstrap"/>
   <property name="bootstrapViews">
      <list>
         <props>
            <prop key="path">/${spaces.company_home.childname}/cm:Data_Input/cm:Testing</prop>
            <prop key="location">alfresco/module/org.alfresco.AlfrescoTesting/bootstrap/spaceTemplate.acp</prop>
         </props>
      </list>
   </property>
</bean>


If I import the spaceTemplate.acp with "${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.childname}" works.


I don't know what I have wrong.
Does anyone know the reason?

Thanks in advance.

kaynezhang
World-Class Innovator
World-Class Innovator
It seems there is noting wrong with you code,please check the flowing things:
1.Have you place your module-context.xml in correct location? it should be placed under
 classpath*:alfresco/module/*/module-context.xml

2.Dose folder ${spaces.company_home.childname}/cmSmiley Very Happyata_Input/cm:Testing exist in your repository?

cperez
Champ in-the-making
Champ in-the-making
Thanks kaynezhang.
Yes, my "module-context.xml" is placed correctly and the folder exists.

Finally I do this manually because the folder "cm:Testing" used until now as a example, in production maybe be more than one and I don't need this in all of them.

Thanks for your time.