[Résolu]Utilisation du exampleModel.xml

cancel
Showing results for 
Search instead for 
Did you mean: 
hlander10
Member II

[Résolu]Utilisation du exampleModel.xml

Bonjour,
J'utilisais jusqu'ici la version 2.1 et 2.9 d'alfresco. J'ai installé la version 3.2.

J'avais personnalisé les propriétés des champs. J'ai remis mes fichiers tel quel et ils ne fonctionnent pas.

J'ai donc voulu utiliser les fichiers d'example pour voir si les fichiers avaient changé :

J'ai donc décommenté le fichier web-client-config-custom.xml concernant les partie Example, puis renommé le fichier exampleModel.xml et le example-model-context.xml.

J'obtiens bien le Standard Operating Procedure dans le contenu, et je vois bien les champs publishedDate, authorisedBy etc.. par contre je ne vois pas les champs contenu dans les aspects : my:width, my:height

Et la je comprends pas pourquoi.

Avez vous une idée.

Merci
10 Replies
hlander10
Member II

Re: [Résolu]Utilisation du exampleModel.xml

Vous avez tous réussi a utiliser l'example ?

ET c'est normal que mes anciens fichier de configuration, ne fonctionne plus avec cette version
jayjayecl
Active Member II

Re: [Résolu]Utilisation du exampleModel.xml


<config evaluator="aspect-name" condition="my:imageClassification">
      <property-sheet>
         <show-property name="my:width"/>
         <show-property name="my:height"/>
         <show-property name="my:resolution"/>
      </property-sheet>
   </config>

Cette config signifie que les 3 champs pré-cités ne s'afficheront que pour les objets possédant l'aspect "my:imageClassification".
Peut-être essayiez-vous de les visualiser pour un contenu ne possédant pas cet aspect ?
hlander10
Member II

Re: [Résolu]Utilisation du exampleModel.xml

Très  bonne remarque de votre part, mais comment spécifier l'aspect à un object.

EN regardant le plus prêt l'exampleModel présent dans la version 2.1, j'ai constaté que c'est le même que la version 3.2, ce qui me laisse penser que mes fichiers de config pour la 2.1 devrait fonctionner pour la 3.2

J'ai donc web-client-config-custom.xml
<alfresco-config>

   <!– Example of overriding the from email address –>
   <!–
   <config>
      <client>
         <from-email-address>someone@your-domain.com</from-email-address>
         <search-max-results>100</search-max-results>
      </client>
   </config>
   –>

   <!– Example of adding languages to the list in the login page –>
  
   <config evaluator="string-compare" condition="Languages">
      <languages>
         <language locale="fr_FR">French</language>
      </languages>
   </config>
  
  
   <!– MODIF OPENSPIR –>
  
    <!– EXPATRIES –>
    <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="ex:Details"/>
      </aspects>
   </config>
  
   <config evaluator="aspect-name" condition="ex:Details">
         <property-sheet>
            <separator name="sepCust1" display-label="Contract" component-generator="HeaderSeparatorGenerator" />
              <show-property name="ex:Matricule"/>
              <show-property name="ex:Societe"/>   
              <show-property name="ex:Compsal"/>
              <show-property name="ex:Nom"/>
              <show-property name="ex:Prenom"/>
              <show-property name="ex:Etab"/>
              <show-property name="ex:Service"/>
              <show-property name="ex:Nature"/>
              <show-property name="ex:Rubrique"/>
              <show-property name="ex:Typepaie"/>
              <show-property name="ex:CodeBarre"/>
              <show-property name="ex:Categorie"/>
              <show-property name="ex:DateNum"/>
       </property-sheet>
   </config>  
    
  
  
   <!– Example of configuring advanced search –>
   <!–
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
         </content-types>
         <custom-properties>
            <meta-data aspect="app:simpleworkflow" property="app:approveStep" />
         </custom-properties>
      </advanced-search>
   </config>
   –>

   <!– Example of changing the sort direction for a view in the client –>
   <!–
   <config evaluator="string-compare" condition="Views">
      <views>
         <view-defaults>
            <topic>
               <sort-direction>ascending</sort-direction>
            </topic>
         </view-defaults>
      </views>
   </config>
   –>

   <!– Example of adding a custom icon to the Create Space dialog –>
   <!–
   <config evaluator="string-compare" condition="cm:folder icons">
      <icons>
         <icon name="space-icon-custom" path="/images/icons/space-icon-custom.gif" />
      </icons>
   </config>
   –>

   <!– The config below shows how to incorporate the example model–>
   <!– into the web client, for this to work you will need to –>
   <!– rename example-model-context.xml.sample to example-model-context.xml –>
  
   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="my:sop" />
      </content-types>
   </config>

   <config evaluator="node-type" condition="my:sop">
      <property-sheet>
         <show-property name="mimetype" display-label-id="content_type"
                        component-generator="MimeTypeSelectorGenerator" />
         <show-property name="size" display-label-id="size"
                        converter="org.alfresco.faces.ByteSizeConverter"
                        show-in-edit-mode="false" />              
         <show-property name="my:publishedDate" />
         <show-association name="my:signOff" />
         <show-property name="my:authorisedBy" />
         <show-child-association name="my:processSteps" />
      </property-sheet>
   </config>

   <config evaluator="aspect-name" condition="my:imageClassification">
      <property-sheet>
         <show-property name="my:width"/>
         <show-property name="my:height"/>
         <show-property name="my:resolution"/>
      </property-sheet>
   </config>

   <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="my:imageClassification"/>
      </aspects>
   </config>

   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="my:sop" />
         </content-types>
         <custom-properties>
            <meta-data type="my:sop" property="my:authorisedBy" />
            <meta-data aspect="my:imageClassification" property="my:resolution" />
         </custom-properties>
      </advanced-search>
   </config>
  

</alfresco-config>

un A_exModel.xml
<?xml version="1.0" encoding="UTF-8"?>

<!– Définition du modèle : ex Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.  So, all ex –>
<!–       types and aspects added here will automatically be registered –>

<model name="ex:exModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>  
   <description>ex Model</description>
   <author></author>
   <version>1.0</version>

   <imports>
        <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –> <!– NOTE: The
   following namespace ex.model should be changed to reflect your own
   namespace –>
  
   <namespaces>
               <namespace uri="ex.new.model" prefix="ex"/>
   </namespaces>

   <aspects>
           <!– Definition of new Content Aspect: Individu Details –>
      <aspect name="ex:Details">
         <title>A_Expatries Details</title>
         <properties>
            <property name="ex:Matricule">
                       <title>Matricule</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:Societe">
                       <title>Societe</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:Compsal">
                       <title>Compsal</title>
                       <type>d:int</type>
                  </property>
                  <property name="ex:Nom">
                       <title>Nom</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:Prenom">
                       <title>Prenom</title>
                        <type>d:text</type>
                  </property>
                  <property name="ex:Etab">
                       <title>Etablissement</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:Service">
                       <title>Service</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:Nature">
                       <title>Nature</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:Rubrique">
                       <title>Rubrique</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:Typepaie">
                       <title>Typepaie</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:CodeBarre">
                       <title>Code Barre</title>
                       <type>d:text</type>
                  </property>
                  <property name="ex:DateNum">
                       <title>Date Num豩sation</title>
                       <type>d:date</type>
                  </property>
                  <property name="ex:Categorie">
                       <title>Categorie</title>
                       <type>d:text</type>
                  </property>
             </properties>
      </aspect>
    </aspects>
</model>

et un A_propriete-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Registration of new models –>   
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
              <value>alfresco/extension/A_exModel.xml</value>
             </list>
        </property>
    </bean>
         
</beans>

Ainsi que les fichiers ExampleModel.xml et example-model-context.xml

Je vois viens les proriétes ExampleModel mais je vois pas celle de A_exModel.xml (A_Expatries Details).

Donc je comprends encore moi alors que ces fichiers fonctionnent sous Alfresco2.1
jayjayecl
Active Member II

Re: [Résolu]Utilisation du exampleModel.xml

Pouvez-vous décrire de quelle manière vous vous apercevez que vos modèles ne fonctionnent pas :
- parce qu'il y a une trace d'erreur ?
- parce que vous regardez les propriétés d'un contenu ? Si c'est le cas, quand avez-vous créé ce contenu ? comment ?

pour spécifier un aspect a un objet :
- page de details de l'objet
- run action / lancer une action
- add aspect / ajouter un aspect

Au passage, renommez le fichier example-model-context.xml en example-model-context.xml.bak et relancez Alfresco pour voir si cela fonctionne
hlander10
Member II

Re: [Résolu]Utilisation du exampleModel.xml

merci bcp Rodel, j'avais totalement oublier de créer ma règle du contenu pour attribuer les aspects.
hlander10
Member II

Re: [Résolu]Utilisation du exampleModel.xml

Bon j'ai réussi avec votre aide à faire fonctionner l'exampleModel par contre avec mes fichiers, j'ai un message : Failed to resolve aspect :ex.Details, et je le vois pas dans la liste "Sélectionner la caractéristique requise" lors de la création de la régle. Je dois avoir un pb dans mes fichiers.

Une autre question en même temps, j'ai une application JAVA qui rempli en automatique les champs aspects, j'ai essayé de faire de même avec les types et impossible, pourquoi?
jayjayecl
Active Member II

Re: [Résolu]Utilisation du exampleModel.xml

Sans trace de logs, point d'analyse possible Smiley Happy
hlander10
Member II

Re: [Résolu]Utilisation du exampleModel.xml

désolé
15:49:10,187 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
15:49:10,187 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
15:49:10,187 INFO  [org.alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/C:/Alfresco/tomcat/shared/classes/alfresco-global.properties]
15:49:10,250 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:49:28,171 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
15:49:30,296 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] No changes were made to the schema.
15:49:33,562 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [default]
15:49:33,593 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:49:35,171 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [default] complete
15:49:35,375 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Alfresco\alf_data
15:49:35,421 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
15:49:35,765 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] No patches were required.
15:49:35,781 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 1 module(s).
15:49:35,843 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.module.vti' version 1.2.
15:49:36,109 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [default]
15:49:36,156 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:49:36,359 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [managed, alfrescoNtlm1]
15:49:36,390 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:49:36,718 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [managed, alfrescoNtlm1] complete
15:49:36,765 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [default] complete
15:49:36,765 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [default]
15:49:36,781 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:49:36,828 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'imap' subsystem, ID: [default] complete
15:49:36,828 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Synchronization' subsystem, ID: [default]
15:49:36,843 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:49:36,859 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [default] complete
15:49:36,890 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_03-b05; maximum heap size 493,063MB
15:49:36,890 WARN  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 493,063MB is less than recommended 512MB
15:49:36,890 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community): Current version 3.2.0 (2039) schema 2019 - Installed version 3.2.0 (2039) schema 2019
15:49:37,171 INFO  [org.alfresco.module.vti.VtiServer] Vti server started successfully on port: 7070
15:49:50,250 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'wcm_deployment_receiver' subsystem, ID: [default]
15:49:50,281 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:49:50,343 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'wcm_deployment_receiver' subsystem, ID: [default] complete
15:49:51,953 INFO  [org.alfresco.config.JBossEnabledWebApplicationContext] Refreshing org.alfresco.config.JBossEnabledWebApplicationContext@21b936: display name [Root WebApplicationContext]; startup date [Fri Sep 04 15:49:51 CEST 2009]; root of context hierarchy
15:49:52,203 INFO  [org.alfresco.config.JBossEnabledWebApplicationContext] Bean factory for application context [org.alfresco.config.JBossEnabledWebApplicationContext@21b936]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1db73b1
15:49:53,171 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 24 Web Scripts (+0 failed), 26 URLs
15:49:53,187 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 200.1453ms)
15:49:53,343 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 42 Web Scripts (+0 failed), 44 URLs
15:49:53,359 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 173.37326ms)
15:49:53,406 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
15:49:55,796 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
15:52:59,093 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
15:55:07,921 WARN  [org.alfresco.web.bean.actions.BaseActionWizard] Failed to resolve aspect 'ex:Details'
hlander10
Member II

Re: [Résolu]Utilisation du exampleModel.xml

Personne n'a une idée de mon pb, je tourne en rond sans voir l'erreur