cancel
Showing results for 
Search instead for 
Did you mean: 

Discovering content models

drisschelouati
Champ on-the-rise
Champ on-the-rise
Hello folks, iam beginning to work on Alfresco because it seems to be an outstanding product. For the moment, i installed the community version 5.0d with the records management module 2.3.

After reading lots of tutorials about content modeling (and iam absolutely not a programmer, more of a consultant), i tried to make my own data model based on the ecm architect blog, except for the deployment procedure.

My model consists on a generic document model "ad:document" (child of "cm:content"), with 3  child document models "ad:facturec", "ad:facturef","ad:businessdoc", and 3 "cm:folder" child folder types "ad:cfolder", "ad:bfolder", "ad:hrfolder".

When i tried to update the content of the repository, i did like told on some tutorials:

1. Stop Alfresco
2. Copy the 3 xml model configuration files in ${ALFRESCO_HOME}\tomcat\shared\classes\alfresco\extension
2. Start service

After i launched Alfresco, i couldnt go further thant the login page. I got this message : "Vos informations d'authentification n'ont pas été reconnues ou Alfresco n'est peut-être pas disponible actuellement" (i.e : your login data couldnt be regognized or Alfresco is currently out of service"

After deleting my model configuration files, Alfresco launches normally. Here are my files if someone could tell me what i did wrong, because iam really a newbie, but who wants to learn fast.


CONTEXT FILE:

<code>
<?xml version="1.0" encoding="UTF-8"?>
<beans>
          <!– Registration of new models –>
       <bean id="archi.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
              <property name="models">
                     <list>
                            <value>alfresco/extension/archiModel.xml</value>
                        </list>
                 </property>
          </bean>
   </beans>

<code>

CUSTOM MODEL FILE

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model xmlns="http://www.alfresco.org/model/dictionary/1.0" name="ad:archimodel">
          <!– Optional meta-data about the model –>
       <description>ARCHIVE DYNAMICS Content Model</description>
       <author>Driss Chelouati</author>
       <version>1.0</version>
          <!– Imports are required to allow references to definitions in other models –>
       <imports>
              <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"></import>
              <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"></import>
              <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"></import>
          </imports>
          <!– Introduction of new namespaces defined by this model –>
       <namespaces>
              <namespace uri="http://www.archi.info/model/content/1.0" prefix="ad"></namespace>
          </namespaces>
       <constraints>
              <constraint name="ad:clientList" type="LIST">
                     <parameter name="allowedValues">
                            <list>
                                   <value>Hassan</value>
                                   <value>Hamid</value>
                                   <value>Bouazza</value>
                               </list>
                        </parameter>
                 </constraint>
              <constraint name="ad:fournisseurList" type="LIST">
                     <parameter name="allowedValues">
                            <list>
                                   <value>Oussama</value>
                                   <value>Abdelhaq</value>
                                   <value>Omar</value>
                               </list>
                        </parameter>
                 </constraint>
              <constraint name="ad:typeList" type="LIST">
                     <parameter name="allowedValues">
                            <list>
                                   <value>Rapport</value>
                                   <value>Compte-rendu</value>
                                   <value>Projet</value>
                               </list>
                        </parameter>
                 </constraint>
          </constraints>
       <types>
                 <!– Enterprise-wide generic document type –>
              <type name="ad:document">
                     <title>Document d'entreprise</title>
                     <parent>cm:content</parent>
                     <mandatory-aspects>
                            <aspect>cm:generalclassifiable</aspect>
                        </mandatory-aspects>
                 </type>
              <type name="ad:facturec">
                     <title>facture client</title>
                     <parent>ad:document</parent>
                     <properties>
                            <property name="ad:client">
                                   <title>Nom du client</title>
                                   <type>d:text</type>
                                   <multiple>true</multiple>
                                   <constraints>
                                          <constraint ref="ad:clientList"></constraint>
                                      </constraints>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="adSmiley Tongueaydate">
                                   <title>Date de paiement</title>
                                   <type>d:date</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:ammount">
                                   <title>Montant</title>
                                   <type>d:float</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:reference">
                                   <title>R�f�rence facture</title>
                                   <type>d:int</type>
                                   <mandatory>false</mandatory>
                               </property>
                        </properties>
                 </type>
              <type name="ad:facturef">
                     <title>facture fournisseur</title>
                     <parent>ad:document</parent>
                     <properties>
                            <property name="ad:fournisseur">
                                   <title>Nom du fournisseur</title>
                                   <type>d:text</type>
                                   <multiple>true</multiple>
                                   <constraints>
                                          <constraint ref="ad:fournisseurList"></constraint>
                                      </constraints>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="adSmiley Tongueaydate">
                                   <title>Date de paiement</title>
                                   <type>d:date</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:ammount">
                                   <title>Montant</title>
                                   <type>d:float</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:reference">
                                   <title>R�f�rence facture</title>
                                   <type>d:int</type>
                                   <mandatory>false</mandatory>
                               </property>
                        </properties>
                 </type>
              <type name="ad:businessdoc">
                     <title>Document business</title>
                     <parent>ad:document</parent>
                     <properties>
                            <property name="ad:doctype">
                                   <title>Type de document</title>
                                   <type>d:text</type>
                                   <multiple>true</multiple>
                                   <constraints>
                                          <constraint ref="ad:typeList"></constraint>
                                      </constraints>
                                   <mandatory>true</mandatory>
                               </property>
                        </properties>
                     <mandatory-aspects>
                            <aspect>cmSmiley Very Happyublin Core</aspect>
                        </mandatory-aspects>
                 </type>
              <type name="ad:cFolder">
                     <title>Dossier client</title>
                     <parent>cm:folder</parent>
                     <properties>
                            <property name="ad:company">
                                   <title>Soci�t�</title>
                                   <type>d:text</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:sector">
                                   <title>Secteur d'activit�</title>
                                   <type>d:text</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:adress">
                                   <title>Adresse</title>
                                   <type>d:text</type>
                               </property>
                            <property name="ad:tel">
                                   <title>T�l�phone</title>
                                   <type>d:text</type>
                               </property>
                            <property name="ad:mail">
                                   <title>email</title>
                                   <type>d:text</type>
                               </property>
                        </properties>
                 </type>
              <type name="ad:bFolder">
                     <title>Dossier business</title>
                     <parent>cm:folder</parent>
                     <properties>
                            <property name="ad:company">
                                   <title>Soci�t�</title>
                                   <type>d:text</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:business">
                                   <title>Affaire</title>
                                   <type>d:text</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:status">
                                   <title>Cl�tur�e</title>
                                   <type>d:boolean</type>
                               </property>
                        </properties>
                 </type>
              <type name="ad:hrFolder">
                     <title>Dossier RH</title>
                     <parent>cm:folder</parent>
                     <properties>
                            <property name="ad:LastName">
                                   <title>Nom</title>
                                   <type>d:text</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="ad:firstName">
                                   <title>Pr�nom</title>
                                   <type>d:text</type>
                                   <mandatory>true</mandatory>
                               </property>
                            <property name="adSmiley Tongueosition">
                                   <title>Fonction</title>
                                   <type>d:text</type>
                               </property>
                        </properties>
                 </type>
          </types>
   </model>

SHARE CLIENT CONFIG FILE

<?xml version="1.0" encoding="UTF-8"?>
<alfresco-config>
          <!– show clients on facturec and facturef property sheet –>
       <config evaluator="node-type" condition="ad:facturec">
              <property-sheet>
                     <show-property name="ad:client" display-label-id="Nom du client"></show-property>
                 </property-sheet>
          </config>
       <config evaluator="node-type" condition="ad:facturef">
              <property-sheet>
                     <show-property name="ad:fournisseur" display-label-id="Nom du fournisseur"></show-property>
                 </property-sheet>
          </config>
          <!– show types on business document property sheet –>
       <config evaluator="node-type" condition="ad:businessdoc">
              <property-sheet>
                     <show-property name="ad:doctype" display-label-id="Type de document"></show-property>
                 </property-sheet>
          </config>
          <!– add NEW CONTENT types to add content list wizard –>
       <config evaluator="string-compare" condition="Content Wizards">
              <content-types>
                     <type name="ad:facturec"></type>
                     <type name="ad:facturef"></type>
                     <type name="ad:businessdoc"></type>
                 </content-types>
          </config>
          <!– add new FOLDER types to add content list wizard –>
       <config evaluator="string-compare" condition="Space Wizards">
              <folder-types>
                     <type name="ad:cFolder"></type>
                     <type name="ad:bFolder"></type>
                     <type name="ad:hrFolder"></type>
                 </folder-types>
          </config>
       <config evaluator="string-compare" condition="Action Wizards">
                 <!– The list of types shown in the is-subtype condition –>
              <subtypes>
                     <type name="ad:document"></type>
                     <type name="ad:facturec"></type>
                     <type name="ad:facturef"></type>
                     <type name="ad:businessdoc"></type>
                 </subtypes>
                 <!– The list of content and/or folder types shown in the specialise-type action –>
              <specialise-types>
                     <type name="ad:document"></type>
                     <type name="ad:facturec"></type>
                     <type name="ad:facturef"></type>
                     <type name="ad:businessdoc"></type>
                     <type name="ad:cFolder"></type>
                     <type name="ad:bFolder"></type>
                     <type name="ad:hrFolder"></type>
                 </specialise-types>
          </config>
       <config evaluator="string-compare" condition="Advanced Search">
              <advanced-search>
                     <content-types>
                            <type name="ad:document"></type>
                            <type name="ad:facturec"></type>
                            <type name="ad:facturef"></type>
                            <type name="ad:businessdoc"></type>
                            <type name="ad:cFolder"></type>
                            <type name="ad:bFolder"></type>
                            <type name="ad:hrFolder"></type>
                        </content-types>
                 </advanced-search>
          </config>
   </alfresco-config>



THANKS FOR YOUR HELP !!!!!!!!


1 REPLY 1

drisschelouati
Champ on-the-rise
Champ on-the-rise
I tried replacing the accented caracters with normal caracters, but got the same result. I also wanted more advice about the dynamic deployment method. I did as the method said, uploaded a sample alfresco tutorial model in the model section of the data dictionnary, checked it as "active" in the properties form and saved. After that, i didnt notify any change in the models. Does SHARE need to be congigured to display the new models with the dynamic approach? what are the steps to do it? thank you!