cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying a custom content model

tarapenner
Champ in-the-making
Champ in-the-making
Hello,

I'm trying to deploy a simple custom content model. If I create only one subtype which inherits all of its properties from cm:content, the model loads and I'm able to select it using 'Change Type' in Share. When I try to add custom metadata as in the model file below, nothing shows in the 'Change Type' dropdown. I suspect that something is wrong in the share-custom-config.xml file, bit I'm at a loss. Any help would be greatly appreciated!

(I've been following the instructions from Jeff Potts' Working With Custom Content Types http://bit.ly/zzK2k6 document - the only difference is the location of the share-custom-config.xml file, which was under shared/classes/alfresco/web-extension in my 4.0.d installation.)

This is my custom model:

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

<!– Test Content Model –>

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

   <description>Test Content Model</description>
   <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"/>
     <!– Import Alfresco Data List Model Definitions –>
      <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
   </imports>

   <namespaces>
       <namespace uri="custom.model" prefix="test" />
   </namespaces>
  
   <!–      C O N S T R A I N T S      –>
   <constraints>
      <constraint name="test:plantType" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>Grass</value>
               <value>Legume</value>
               <value>Shrub</value>
               <value>Tree</value>
            </list>
         </parameter>
      </constraint>            
   </constraints>  

   <!–      T Y P E   D E F I N I T I O N S      –>  
   <types>
         <type name="test:doc">
        <title>General Document</title>
        <parent>cm:content</parent>
         </type>
            <type name="test:species">
            <title>Species</title>
            <parent>test:doc</parent>
            <properties>
               <property name="test:plantType">
                  <title>Plant Type</title>
                  <type>d:text</type>
                  <mandatory>true</mandatory>
                     <constraints>
                        <constraint ref="test:plantType">
                        </constraint>
                     </constraints>
               </property>
            </properties>
            </type>
      </types>
</model>

This is the content of share-config-custom.xml (in shared/classes/alfresco/web-extension):

<alfresco-config>
  
   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>true</visible>
   </config>

   <config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>
        
         <endpoint>
            <id>activiti-admin</id>
            <name>Activiti Admin UI - user access</name>
            <description>Access to Activiti Admin UI, that requires user authentication</description>
            <connector-id>activiti-admin-connector</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/activiti-admin</endpoint-url>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>
   
<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">

<aspects>
<!– Aspects that a user can see –>
<visible>
<!–<aspect name="sc:webable" />
<aspect name="sc:productRelated" />–>
</visible>
<!– Aspects that a user can add. Same as "visible" if left empty –>
<addable>
</addable>
<!– Aspects that a user can remove. Same as "visible" if left empty
–>
<removeable>
</removeable> –>
</aspects>

<types>
<type name="cm:content">
   <subtype name="cb:doc" />
   <subtype name="test:doc" />
   <subtype name="test:species />
</type>
</types>

</alfresco-config>

Here is the content of my log file:

21:23:44,037 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
21:23:44,463 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
21:24:44,544 WARN  [org.alfresco.util.AbstractTriggerBean] Job ehCacheTracerJob is not active/enabled
21:25:07,355 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
21:25:07,355 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
21:25:38,146 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
21:25:54,178 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] No changes were made to the schema.
21:25:56,592 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Search' subsystem, ID: [Search, managed, lucene]
21:26:00,055 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Search' subsystem, ID: [Search, managed, lucene] complete
21:26:14,129 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
21:26:15,196 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker] ImageMagickContentTransformerWorker not available: 02180000 Failed to perform ImageMagick transformation:
Execution result:
   os:         Windows Server 2008 R2
   command:    [C:/Alfresco/ImageMagick/bin/convert, C:\Windows\TEMP\Alfresco\ImageMagickContentTransformerWorker_init_source_8862477293349466656.gif[0], C:\Windows\TEMP\Alfresco\ImageMagickContentTransformerWorker_init_target_6674647620958189380.png]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "C:/Alfresco/ImageMagick/bin/convert": CreateProcess error=2, The system cannot find the file specified
21:26:15,349 ERROR [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] Failed to start a runtime executable content transformer:
Execution result:
   os:         Windows Server 2008 R2
   command:    [C:/Alfresco/swftools, -V]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "C:/Alfresco/swftools": CreateProcess error=5, Access is denied
21:26:15,349 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
21:26:15,349 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'OOoDirect' subsystem, ID: [OOoDirect, default]
21:26:22,668 ERROR [org.alfresco.util.exec.RuntimeExecBootstrapBean] Bootstrap command failed:
Execution result:
   os:         Windows Server 2008 R2
   command:    [C:/Alfresco/openoffice/App/openoffice/program, -accept=socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager, -env:UserInstallation=file:///C:/Alfresco/alf_data/oouser, -nologo, -headless, -nofirststartwizard, -nocrashrep, -norestore]
   succeeded:  false
   exit code:  2
   out:       
   err:        Cannot run program "C:/Alfresco/openoffice/App/openoffice/program": CreateProcess error=5, Access is denied
21:26:25,412 WARN  [org.alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
21:26:25,428 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete
21:26:29,910 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Alfresco\alf_data
21:26:31,924 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
21:26:34,363 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] No patches were required.
21:26:34,428 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 1 module(s).
21:26:34,824 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.module.vti' version 1.2.
21:26:34,836 DEBUG [org.alfresco.repo.module.ModuleComponentHelper] Started module 'ModuleDetails[{module.version=1.2, module.description=Alfresco Vti Extension, module.id=org.alfresco.module.vti, module.repo.version.max=999, module.title=Vti, module.repo.version.min=0, module.installState=INSTALLED, module.installDate=2012-02-20T17:58:09.863-07:00}]' including 0components.
21:26:34,848 DEBUG [org.alfresco.repo.module.ModuleComponentHelper] Installed module found in distribution: org.alfresco.module.vti
21:26:34,853 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [fileServers, default]
21:26:38,824 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
21:26:39,430 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
21:26:39,938 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
21:26:39,938 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
21:26:42,267 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'imap' subsystem, ID: [imap, default] complete
21:26:42,267 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, outbound]
21:26:42,578 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, outbound] complete
21:26:42,578 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, inbound]
21:26:43,079 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, inbound] complete
21:26:43,079 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'googledocs' subsystem, ID: [googledocs, default]
21:26:43,578 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'googledocs' subsystem, ID: [googledocs, default] complete
21:26:43,578 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Subscriptions' subsystem, ID: [Subscriptions, default]
21:26:43,667 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Subscriptions' subsystem, ID: [Subscriptions, default] complete
21:26:43,793 INFO  [org.alfresco.repo.usage.UserUsageTrackingComponent] Disabled - clear non-missing user usages …
21:26:44,337 INFO  [org.alfresco.repo.usage.UserUsageTrackingComponent] Found 0 users to clear
21:26:44,337 INFO  [org.alfresco.repo.usage.UserUsageTrackingComponent] … cleared non-missing usages for 0 users
21:26:44,337 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Synchronization' subsystem, ID: [Synchronization, default]
21:26:46,391 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete
21:26:47,174 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_22-b04; maximum heap size 989.875MB
21:26:47,178 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community). Current version: 4.0.0 (4003) schema 5,025. Originally installed version: 4.0.0 (4003) schema 5,025.
21:26:47,180 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default]
21:26:48,107 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default] complete
21:26:48,107 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'Replication' subsystem, ID: [Replication, default]
21:26:48,537 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Replication' subsystem, ID: [Replication, default] complete
21:27:10,026 INFO  [org.alfresco.module.vti.VtiServer] Vti server started successfully on port: 7070
21:27:10,026 INFO  [org.alfresco.module.vti.VtiServer] Vti server SessionIdManagerWorkerName: jetty1
21:27:18,374 ERROR [org.alfresco.repo.action.executer.MailActionExecuter] Failed to send email to taraherman@gmail.com
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unknown SMTP host: smtp.example.com;
  nested exception is:
   java.net.UnknownHostException: smtp.example.com. Failed messages: javax.mail.MessagingException: Unknown SMTP host: smtp.example.com;
  nested exception is:
   java.net.UnknownHostException: smtp.example.com; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Unknown SMTP host: smtp.example.com;
  nested exception is:
   java.net.UnknownHostException: smtp.example.com
   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1280)
   at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
   at javax.mail.Service.connect(Service.java:275)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:355)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:344)
   at org.alfresco.repo.action.executer.MailActionExecuter.prepareAndSendEmail(MailActionExecuter.java:574)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:333)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy227.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:700)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:538)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:524)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:789)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy37.executeAction(Unknown Source)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.sendMail(FeedNotifierImpl.java:483)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.prepareAndSendEmail(FeedNotifierImpl.java:461)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl$1.execute(FeedNotifierImpl.java:295)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl$1.execute(FeedNotifierImpl.java:292)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.executeInternal(FeedNotifierImpl.java:291)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.execute(FeedNotifierImpl.java:222)
   at org.alfresco.repo.activities.feed.FeedNotifierJob$1.doWork(FeedNotifierJob.java:67)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.activities.feed.FeedNotifierJob.execute(FeedNotifierJob.java:63)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: java.net.UnknownHostException: smtp.example.com
   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   at java.net.Socket.connect(Socket.java:529)
   at java.net.Socket.connect(Socket.java:478)
   at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
   at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
   … 51 more
21:27:18,478 ERROR [org.alfresco.repo.activities.feed.FeedNotifierImpl] Exception during notification of feeds
org.alfresco.error.AlfrescoRuntimeException: 02180002 Failed to send email to:taraherman@gmail.com
   at org.alfresco.repo.action.executer.MailActionExecuter.prepareAndSendEmail(MailActionExecuter.java:606)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:333)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy227.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:700)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:538)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:524)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:789)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy37.executeAction(Unknown Source)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.sendMail(FeedNotifierImpl.java:483)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.prepareAndSendEmail(FeedNotifierImpl.java:461)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl$1.execute(FeedNotifierImpl.java:295)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl$1.execute(FeedNotifierImpl.java:292)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.executeInternal(FeedNotifierImpl.java:291)
   at org.alfresco.repo.activities.feed.FeedNotifierImpl.execute(FeedNotifierImpl.java:222)
   at org.alfresco.repo.activities.feed.FeedNotifierJob$1.doWork(FeedNotifierJob.java:67)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.activities.feed.FeedNotifierJob.execute(FeedNotifierJob.java:63)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unknown SMTP host: smtp.example.com;
  nested exception is:
   java.net.UnknownHostException: smtp.example.com. Failed messages: javax.mail.MessagingException: Unknown SMTP host: smtp.example.com;
  nested exception is:
   java.net.UnknownHostException: smtp.example.com; message exceptions (1) are:
Failed message 1: javax.mail.MessagingException: Unknown SMTP host: smtp.example.com;
  nested exception is:
   java.net.UnknownHostException: smtp.example.com
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:400)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:355)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:344)
   at org.alfresco.repo.action.executer.MailActionExecuter.prepareAndSendEmail(MailActionExecuter.java:574)
   … 44 more
Caused by: javax.mail.MessagingException: Unknown SMTP host: smtp.example.com;
  nested exception is:
   java.net.UnknownHostException: smtp.example.com
   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1280)
   at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
   at javax.mail.Service.connect(Service.java:275)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
   … 48 more
Caused by: java.net.UnknownHostException: smtp.example.com
   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   at java.net.Socket.connect(Socket.java:529)
   at java.net.Socket.connect(Socket.java:478)
   at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
   at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
   … 51 more
21:27:43,459 WARN  [org.springframework.extensions.webscripts.DeclarativeRegistry] Unable to register script classpath:webscripts/org/springframework/extensions/cmis/content.get.desc.xml due to error: 02180000 Web Script document org/springframework/extensions/cmis/content.get.desc.xml is attempting to define the url '/cmis/content:GET' already defined by org/alfresco/cmis/client/content.get.desc.xml
21:27:43,459 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 464 Web Scripts (+1 failed), 731 URLs
21:27:43,459 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 2 Package Description Documents (+0 failed)
21:27:43,459 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 1 Schema Description Documents (+0 failed)
21:27:43,459 INFO  [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Repository Web Script Container (in 33295.46ms)
21:27:43,495 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
21:27:43,495 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
11 REPLIES 11

jpotts
World-Class Innovator
World-Class Innovator
Thanks for reading the tutorial. I hope it has been helpful so far.

In the types element, you need to include every combination of specialization that you might want your users to do. For example, you have listed sub-types of cm:content, but your test:species type inherits from test:doc. Using the config as it is currently, if a document is currently a "test:doc" they won't be able to specialize it to "test:species". To make that possible, try changing your config to look like this:
<types>
<type name="cm:content">
   <subtype name="cb:doc" />
   <subtype name="test:doc" />
   <subtype name="test:species />
</type>
<type name="test:doc">
   <subtype name="test:species />
</type>
</types>
Hope that helps,
Jeff

tarapenner
Champ in-the-making
Champ in-the-making
Hi Jeff - thanks so much for responding, and for creating the guide, which I have found very very useful (as well as the developer webinar series and your blog)   Smiley Very Happy

Unfortunately though, I'm still not having any luck with custom subtypes. I've managed to get 4 custom datalists working, but as soon as I try to add subtypes of cm:content (and subtypes of kesn:doc, a subtype of cm:content), I get errors in the log file saying that the bootstrap model could not be imported. Is there something I'm still missing in one of these files?

This is the content of my model file:

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

<!– Definition of new Model –>

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

   <!– Optional meta-data about the model –>  
   <description>Keefer Ecological Services Nursery Model</description>
   <author>Tara Penner</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>  
   <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"/>
     <!– Import Alfresco Data List Model Definitions –>
      <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>  
   <namespaces>
       <namespace uri="kesn.keefereco.com" prefix="kesn"/>
   </namespaces>
  
 
<!–      T Y P E   D E F I N I T I O N S      –>  
   <types>

<!–      C O N S T R A I N T S      –>

   <!–      T Y P E   D E F I N I T I O N S      –>  

<!–   KES Document   –>

   <types>
         <type name="kesn:doc">
        <title>KES Document</title>
            <description>KES Document</description>
        <parent>cm:content</parent>
         </type>

<!–   Species  –>
                  
            <type name="kesn:species">
            <title>Species</title>
            <description>Species</description>
            <parent>kesn:doc</parent>
      </type>
      
<!–   Client      –>
      
      <type name="kesn:client">
      <title>Client</title>
      <description>Contact information for clients of KES</description>
      <parent>kesn:doc</parent>
      </type>
      
<!–   Collection      –>
      
      <type name="kesn:collection">
      <title>Collection</title>
      <description>Information about a collection</description>
      <parent>kesn:doc</parent>
</type>

<!–   Order   –>

<type name="kesn:order">
            <title>Order</title>
            <description>Order</description>
            <parent>kesn:doc</parent>
</type>
   
<!–   Data list defintions–>

<!–   Stratification –>      

      <type name="kesn:stratification">
       <title>Stratification Data</title>
       <description>Stratification Data</description>–>
       <parent>dl:dataListItem</parent>
        <properties>   
            <property name="kesn:dateStart">
               <title>Start Date</title>
               <type>d:date</type>
                <mandatory>false</mandatory>
            </property>
            <property name="kesn:dateEnd">
               <title>End Date</title>
               <type>d:date</type>
                <mandatory>false</mandatory>
            </property>      
            <property name="kesn:timeCleaning">
               <title>Cleaning Time</title>
               <type>d:datetime</type>
               <mandatory>false</mandatory>
            </property>
            <property name="kesn:timeCleaningMachine">
               <title>Time in the Cleaning Machine</title>
               <type>d:datetime</type>
               <mandatory>false</mandatory>
            </property>
           </properties>   
       <associations>
         <association name="kesn:stratSpecies">
            <title>Species</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
       </associations>
     </type>

<!– Germination –>
      
      <type name="kesn:germination">
       <title>Germination Data</title>
       <description>Germination Data</description>
       <parent>dl:dataListItem</parent>
        <properties>   
            <property name="kesn:daysToGerm">
               <title>Days to Germination</title>
               <type>d:int</type>
                <mandatory>false</mandatory>
            </property>
            <property name="kesn:numGerm">
               <title>Number of Germinated Plants</title>
               <type>d:int</type>
                <mandatory>false</mandatory>
            </property>      
            <property name="kesn:percentGerm">
               <title>Germination Percentage</title>
               <type>d:int</type>
               <mandatory>false</mandatory>
            </property>
           </properties>   
       <associations>
         <association name="kesn:germSpecies">
            <title>Species</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
         <association name="kesn:germColl">
            <title>Collection</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
       </associations>
     </type>      

<!–   Sowing   –>      

      <type name="kesn:sowing">
       <title>Sowing Data</title>
       <description>Sowing Data</description>
       <parent>dl:dataListItem</parent>
        <properties>   
            <property name="kesn:numTrays">
               <title>Number of Trays</title>
               <type>d:int</type>
                <mandatory>false</mandatory>
            </property>
            <property name="kesn:trayType">
               <title>Tray Type</title>
               <type>d:int</type>
                <mandatory>false</mandatory>
            </property>      
           </properties>   
       <associations>
         <association name="kesn:sowSpecies">
            <title>Species</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
         <association name="kesn:sowOrder">
            <title>Order</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
         <association name="kesn:sowColl">
            <title>Collection</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
       </associations>
     </type>   

<!–   Success   –>             

      <type name="kesn:success">
       <title>Success Data</title>
       <description>Success Data</description>
       <parent>dl:dataListItem</parent>
        <properties>   
            <property name="kesn:successRate">
               <title>Success Rate</title>
               <type>d:int</type>
                <mandatory>false</mandatory>
            </property>
            <property name="kesn:stressType">
               <title>Stress Type</title>
               <type>d:int</type>
                <mandatory>false</mandatory>
            </property>      
            <property name="kesn:rigor">
               <title>Rigor</title>
               <type>d:int</type>
                <mandatory>false</mandatory>
            </property>   
           </properties>   
       <associations>
         <association name="kesn:sucSpecies">
            <title>Species</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
         <association name="kesn:sucColl">
            <title>Seedlot Number</title>
            <source>
              <mandatory>true</mandatory>
              <many>true</many>
            </source>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
            </target>
         </association>
       </associations>
     </type>            
   </types>    
</model>

This is the content of share-custom-config.xml:

<alfresco-config>

   <!– Global config section –>
   <config replace="true">
      <flags>
         <!–
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         –>
         <client-debug>false</client-debug>

         <!–
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         –>
         <client-debug-autologging>false</client-debug-autologging>
      </flags>
   </config>
  
   <config evaluator="string-compare" condition="WebFramework">
      <web-framework>
         <!– SpringSurf Autowire Runtime Settings –>
         <!–
              Developers can set mode to 'development' to disable; SpringSurf caches,
              FreeMarker template caching and Rhino JavaScript compilation.
         –>
         <autowire>
            <!– Pick the mode: "production" or "development" –>
            <mode>production</mode>
         </autowire>
      </web-framework>
   </config>

   <config evaluator="string-compare" condition="Replication">
      <share-urls>
         <!–
            To discover a Repository Id, browse to the remote server's CMIS landing page at:
              http://{server}:{port}/alfresco/service/cmis/index.html
            The Repository Id field is found under the "CMIS Repository Information" expandable panel.

            Example config entry:
              <share-url repositoryId="622f9533-2a1e-48fe-af4e-ee9e41667ea4">http://new-york-office:8080/share/</share-url>
         –>
      </share-urls>
   </config>

   <!– Document Library config section –>

   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">

      <tree>
         <!–
            Whether the folder Tree component should enumerate child folders or not.
            This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
         –>
         <evaluate-child-folders>true</evaluate-child-folders>
        
         <!–
            Optionally limit the number of folders shown in treeview throughout Share.
         –>
         <maximum-folder-count>-1</maximum-folder-count>
      </tree>

      <!–
         Used by the "Manage Aspects" action and Rules pages

         For custom aspects, remember to also add the relevant i18n string(s)
            aspect.cm_myaspect=My Aspect
      –>
      <aspects>

         <!–
            Aspects that a user can see in UI.
            Used by Rules, aspects are the listed aspects for rule's "has-aspect" action condition.
         –>
         <visible>
            <aspect name="cm:generalclassifiable" />
            <aspect name="cm:complianceable" />
            <aspect name="cm:dublincore" />
            <aspect name="cm:effectivity" />
            <aspect name="cm:summarizable" />
            <aspect name="cm:versionable" />
            <aspect name="cm:templatable" />
            <aspect name="cm:emailed" />
            <aspect name="emailserver:aliasable" />
            <aspect name="cm:taggable" />
            <aspect name="app:inlineeditable" />
            <aspect name="gd:googleEditable" />
            <aspect name="cm:geographic" />
            <aspect name="exif:exif" />
         </visible>

         <!–
            Aspects that a user can add in UI.
            Used by Rules, aspects are the listed aspects for rule's "add-features" action.
            Same as "visible" if left empty.
         –>
         <addable>
         </addable>

         <!–
            Aspects that a user can remove in UI.
            Used by Rules, aspects are the listed aspects for rule's "remove-features" action.
            Same as "visible" if left empty
         –>
         <removeable>
         </removeable>
      </aspects>

      <!–
         Used by the "Change Type" action.
         Used by Rules:
          - parent types are the listed types for rule's "is-subtype" action condition
          - sub types are the listed types for rule's "specialise-type" action

         Define valid subtypes using the following example:
            <type name="cm:content">
<!–               <subtype name="cm:mysubtype" />–>
            </type>

         Remember to also add the relevant i18n string(s):
            type.cm_mysubtype=My SubType
      –>
      <types>
         <type name="cm:content">
                <subtype name="kesn:doc" />
               <subtype name="kesn:species" />
               <subtype name="kesn:client" />
               <subtype name="kesn:collection" />
               <subtype name="kesn:order" />                                                   
             </type>
         <type name="kesn:doc">
               <subtype name="kesn:species" />
               <subtype name="kesn:client" />
               <subtype name="kesn:collection" />
               <subtype name="kesn:order" />                                                   
             </type>
         <type name="cm:folder">
         </type>
      </types>

      <!–
         If set, will present a WebDAV link for the current item on the Document and Folder details pages.
         Also used to generate the "View in Alfresco Explorer" action for folders.
      –>
      <!–
      <repository-url>http://localhost:8080/alfresco</repository-url>
      –>
     
      <!–
         Google Docs™ integration
      –>
      <google-docs>
         <!–
            Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
         –>
         <enabled>true</enabled>
        
         <!–
            The mimetypes of documents Google Docs allows you to create via the Share interface.
            The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
         –>
         <creatable-types>
            <creatable type="doc">application/msword</creatable>
            <creatable type="xls">application/vnd.ms-excel</creatable>
            <creatable type="ppt">application/vnd.ms-powerpoint</creatable>
         </creatable-types>
      </google-docs>
     
      <!–
         File upload configuration
      –>
      <file-upload>
         <!–
            Adobe Flash™
            In certain environments, an HTTP request originating from Flash cannot be authenticated using an existing session.
            See: http://bugs.adobe.com/jira/browse/FP-4830
            For these cases, it is useful to disable the Flash-based uploader for Share Document Libraries.
         –>
         <adobe-flash-enabled>true</adobe-flash-enabled>
      </file-upload>
   </config>

   <!– Custom DocLibActions config section –>
   <config evaluator="string-compare" condition="DocLibActions">
      <actionGroups>
         <actionGroup id="document-browse">

            <!– Simple Repo Actions –>
            <!–
            <action index="340" id="document-extract-metadata" />
            <action index="350" id="document-increment-counter" />
            –>

            <!– Dialog Repo Actions –>
            <!–
            <action index="360" id="document-transform" />
            <action index="370" id="document-transform-image" />
            <action index="380" id="document-execute-script" />
            –>

         </actionGroup>
      </actionGroups>
   </config>

   <!– Global folder picker config section –>
   <config evaluator="string-compare" condition="GlobalFolder">
      <siteTree>
         <container type="cm:folder">
            <!– Use a specific label for this container type in the tree –>
            <rootLabel>location.path.documents</rootLabel>
            <!– Use a specific uri to retreive the child nodes for this container type in the tree –>
            <uri>slingshot/doclib/treenode/site/{site}/{container}{path}?children={evaluateChildFoldersSite}&amp;max={maximumFolderCountSite}</uri>
         </container>
      </siteTree>
   </config>

   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Root nodeRef or xpath expression for top-level folder.
         e.g. alfresco://user/home, /app:company_home/st:sites/cm:site1
         If using an xpath expression, ensure it is properly ISO9075 encoded here.
      –>
      <root-node>alfresco://company/home</root-node>

      <tree>
         <!–
            Whether the folder Tree component should enumerate child folders or not.
            This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
         –>
         <evaluate-child-folders>false</evaluate-child-folders>
        
         <!–
            Optionally limit the number of folders shown in treeview throughout Share.
         –>
         <maximum-folder-count>500</maximum-folder-count>
      </tree>
   </config>
  
   <!– Kerberos settings –>
   <!– To enable kerberos rename this condition to "Kerberos" –>
   <config evaluator="string-compare" condition="KerberosDisabled" replace="true">
      <kerberos>

<!– Stratification Data –>

   <config evaluator="model-type" condition="kesn:stratification">
      <forms>
         <!– Create item form –>
         <form>
            <field-visibility>
               <!– for the form creation we are showing everything except approved date –>
               <show id="kesn:dateStart" />           
               <show id="kesn:dateEnd" />                             
               <show id="kesn:timeCleaning" />           
               <show id="kesn:timeCleaningMachine" />                                          
                      <show id="kesn:stratSpecies" />
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>                
               <field id="kesn:stratSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>–>
            </appearance>
         </form>

               <!– Data Grid view –>
               <form id="datagrid">
                 <field-visibility>                    
               <show id="kesn:dateStart" />           
               <show id="kesn:dateEnd" />                             
               <show id="kesn:timeCleaning" />           
               <show id="kesn:timeCleaningMachine" />                                           
                      <show id="kesn:stratSpecies" />
                 </field-visibility>
               </form>
         </forms>
      </config>
  
   <!– Edit view –>
   <config evaluator="node-type" condition="kesn:stratification">
      <forms>
         <!– Edit item form –>
         <form>
            <field-visibility>
               <show id="kesn:dateStart" />           
               <show id="kesn:dateEnd" />                             
               <show id="kesn:timeCleaning" />           
               <show id="kesn:timeCleaningMachine" />                                           
                      <show id="kesn:stratSpecies" />    
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>
               <field id="kesn:stratSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
               </field>                     
            </appearance>
         </form>
      </forms>
   </config>  

<!– Germination Data –>

   <config evaluator="model-type" condition="kesn:germination">
      <forms>

   <!– Create item form –>

         <form>
            <field-visibility>
               <show id="kesn:daysToGerm" />           
               <show id="kesn:numGerm" />                             
               <show id="kesn:percentGerm" />                                    
                      <show id="kesn:germSpecies" />
                      <show id="kesn:germColl" />
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>                
               <field id="kesn:germSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>
               <field id="kesn:germColl">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>                           
            </appearance>
         </form>

   <!– Data Grid view –>

         <form id="datagrid">
            <field-visibility>                    
               <show id="kesn:daysToGerm" />           
               <show id="kesn:numGerm" />                             
               <show id="kesn:percentGerm" />                                    
                      <show id="kesn:germSpecies" />
                      <show id="kesn:germColl" />
            </field-visibility>
         </form>
         </forms>
      </config>
  
   <!– Edit view –>

   <config evaluator="node-type" condition="kesn:germination">
      <forms>
         <!– Edit item form –>
         <form>
            <field-visibility>
               <show id="kesn:daysToGerm" />           
               <show id="kesn:numGerm" />                             
               <show id="kesn:percentGerm" />                                    
                      <show id="kesn:germSpecies" />
                      <show id="kesn:germColl" />
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>                
               <field id="kesn:germSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>
               <field id="kesn:germColl">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>                           
            </appearance>
         </form>
      </forms>
   </config>  

<!–   Sowing   –>

   <config evaluator="model-type" condition="kesn:sowing">
      <forms>

   <!– Create item form –>

         <form>
            <field-visibility>
               <show id="kesn:numTrays" />           
               <show id="kesn:trayType" />                             
               <show id="kesn:sowSpecies" />                                    
                      <show id="kesn:sowOrder" />
                      <show id="kesn:sowColl" />
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>                
               <field id="kesn:sowSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>
               <field id="kesn:sowOrder">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>                           
               <field id="kesn:sowColl">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>      
            </appearance>
         </form>

   <!– Data Grid view –>

         <form id="datagrid">
            <field-visibility>                    
               <show id="kesn:numTrays" />           
               <show id="kesn:trayType" />                             
               <show id="kesn:sowSpecies" />                                    
                      <show id="kesn:sowOrder" />
                      <show id="kesn:sowColl" />
            </field-visibility>
         </form>
         </forms>
      </config>
  
   <!– Edit view –>

   <config evaluator="node-type" condition="kesn:sowing">
      <forms>
         <!– Edit item form –>
         <form>
            <field-visibility>
               <show id="kesn:numTrays" />           
               <show id="kesn:trayType" />                             
               <show id="kesn:sowSpecies" />                                    
                      <show id="kesn:sowOrder" />
                      <show id="kesn:sowColl" />
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>                
               <field id="kesn:sowSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>
               <field id="kesn:sowOrder">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>                           
               <field id="kesn:sowColl">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>      
            </appearance>
         </form>
      </forms>
   </config>      

<!–   Success   –>

   <config evaluator="model-type" condition="kesn:success">
      <forms>

   <!– Create item form –>

         <form>
            <field-visibility>
               <show id="kesn:successRate" />           
               <show id="kesn:stressType" />                             
               <show id="kesn:rigor" />                                    
                      <show id="kesn:sucSpecies" />
                      <show id="kesn:sucColl" />
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>                
               <field id="kesn:sucSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>
               <field id="kesn:sucColl">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>                           
            </appearance>
         </form>

   <!– Data Grid view –>

         <form id="datagrid">
            <field-visibility>                    
               <show id="kesn:successRate" />           
               <show id="kesn:stressType" />                             
               <show id="kesn:rigor" />                                    
                      <show id="kesn:sucSpecies" />
                      <show id="kesn:sucColl" />
            </field-visibility>
         </form>
         </forms>
      </config>
  
   <!– Edit view –>

   <config evaluator="node-type" condition="kesn:sowing">
      <forms>
         <!– Edit item form –>
         <form>
            <field-visibility>
               <show id="kesn:successRate" />           
               <show id="kesn:stressType" />                             
               <show id="kesn:rigor" />                                    
                      <show id="kesn:sucSpecies" />
                      <show id="kesn:sucColl" />
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>                
               <field id="kesn:sucSpecies">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>
               <field id="kesn:sucColl">
                  <control>
                   <control-param name="startLocation">{doclib}</control-param>
                  </control>
                   </field>                           
            </appearance>
         </form>
      </forms>
   </config>          

</alfresco-config>

jpotts
World-Class Innovator
World-Class Innovator
You're XML isn't valid. You've got an opening "types" element in there twice.

Jeff

tarapenner
Champ in-the-making
Champ in-the-making
Success! Thanks so much Jeff - I will always be sure to validate my xml before posting from now on!   Smiley Surprisedops:

tarapenner
Champ in-the-making
Champ in-the-making
I may have spoken too soon. I've got the new content types in the drop down list, but when I try to change the type (all 5 subtypes were showing in the list), I get a message saying that the content type couldn't be changed. So I went back to the guide I've been following, and copied the new and existing node config elements from share-form-config.xml for each of the subtypes I created - all of which are inheriting their properties directly from cm:content.

When I restart Tomcat, despite no related errors in the log file, I no longer see any of the custom types in the change-type drop-down list. I'm pretty new to Alfresco, and I'd appreciate any troubleshooting pointers or other suggestions.

This is what I added to the share-config-custom.xml file:


<!– kesn:doc –>   
<!– cm:content type (creating nodes) –>
   <config evaluator="model-type" condition="kesn:doc">
      <forms>
         <!– Default Create Content form –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="app:editInline" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="app:editInline">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">editInline</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Document Library Create Google Doc form –>
         <form id="doclib-create-googledoc">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="gd:googleEditable" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">none</control-param>
                     <control-param name="forceContent">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="gd:googleEditable">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">googleEditable</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Search form –>
         <form id="search">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>

<!– kesn:species –>   
<!– cm:content type (creating nodes) –>
   <config evaluator="model-type" condition="kesn:species">
      <forms>
         <!– Default Create Content form –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="app:editInline" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="app:editInline">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">editInline</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Document Library Create Google Doc form –>
         <form id="doclib-create-googledoc">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="gd:googleEditable" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">none</control-param>
                     <control-param name="forceContent">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="gd:googleEditable">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">googleEditable</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Search form –>
         <form id="search">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>

<!– kesn:collection –>   
<!– cm:content type (creating nodes) –>
   <config evaluator="model-type" condition="kesn:collection">
      <forms>
         <!– Default Create Content form –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="app:editInline" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="app:editInline">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">editInline</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Document Library Create Google Doc form –>
         <form id="doclib-create-googledoc">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="gd:googleEditable" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">none</control-param>
                     <control-param name="forceContent">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="gd:googleEditable">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">googleEditable</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Search form –>
         <form id="search">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>


<!– kesn:client –>   
<!– cm:content type (creating nodes) –>
   <config evaluator="model-type" condition="kesn:client">
      <forms>
         <!– Default Create Content form –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="app:editInline" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="app:editInline">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">editInline</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Document Library Create Google Doc form –>
         <form id="doclib-create-googledoc">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="gd:googleEditable" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">none</control-param>
                     <control-param name="forceContent">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="gd:googleEditable">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">googleEditable</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Search form –>
         <form id="search">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>


<!– kesn:order –>   
<!– cm:content type (creating nodes) –>
   <config evaluator="model-type" condition="kesn:order">
      <forms>
         <!– Default Create Content form –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="app:editInline" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="app:editInline">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">editInline</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Document Library Create Google Doc form –>
         <form id="doclib-create-googledoc">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
               <show id="mimetype" />
               <show id="gd:googleEditable" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">none</control-param>
                     <control-param name="forceContent">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">mimeType</control-param>
                  </control>
               </field>
               <field id="gd:googleEditable">
                  <control template="/org/alfresco/components/form/controls/hidden.ftl">
                     <control-param name="contextProperty">googleEditable</control-param>
                  </control>
               </field>
            </appearance>
         </form>
         <!– Search form –>
         <form id="search">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>
</alfresco-config>

The types are defined as (with this, but not the chunk of code above, I get all types in the drop down list, but errors when I try to change a doctype):

      <types>
         <type name="cm:content">
                <subtype name="kesn:doc" />
               <subtype name="kesn:species" />
               <subtype name="kesn:client" />
               <subtype name="kesn:collection" />
               <subtype name="kesn:order" />                                                   
             </type>
         <type name="kesn:doc">
               <subtype name="kesn:species" />
               <subtype name="kesn:client" />
               <subtype name="kesn:collection" />
               <subtype name="kesn:order" />                                                   
             </type>
         <type name="cm:folder">
         </type>
      </types>

jpotts
World-Class Innovator
World-Class Innovator
I deployed your content model and your share configuration and was able to successfully change types. But here's the catch. You can only move down in the hierarchy. So if you change something from cm:content to kesn:doc, you can change that doc to kesn:species. But once you get to kesn:species, you can make no more changes because kesn:species has no child types, only siblings, and you aren't allowed to change to sibling types.

I notice that in 4.0.d, the "Change Type" dropdown list does not refresh itself after a change type. So when you change to kesn:species and then click "Change Type" again, you'll still see the choices, none of which are valid based on the "move down" limitation described above.

If you leave the document and come back in to the properties (or just reload), the Change Type dropdown will be empty, which is working as designed.

I have created a Jira on the type dropdown not refreshing problem.

Jeff

tarapenner
Champ in-the-making
Champ in-the-making
Hi Jeff, thank-you so much for your help and reply. I continued to have problems until I re-installed (Community 4.0.d), and now it's working exactly as you described.

Thanks again!

sim2487
Confirmed Champ
Confirmed Champ

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

    <description>Custom Content Model</description>  
    <version>1.0b</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 –>
    <namespaces>
        <namespace uri="http://custom.model.org/model/content/1.0" prefix="dd"/>
        <!– Define a ns for types to broaden the ns –>
        <namespace uri="http://custom.model.org/model/content/1.0" prefix="ddt"/>
        <!– Define a ns for aspects to broaden the ns –>
        <namespace uri="http://custom.model.org/model/content/1.0" prefix="dda"/>
        <!– Define a ns for constraints to broaden the ns –>
        <namespace uri="http://custom.model.org/model/content/1.0" prefix="ddc"/>
        <!– Define a ns for associations (relationships) to broaden the ns –>
        <namespace uri="http://custom.model.org/model/content/1.0" prefix="ddr"/>
        <!– Define a ns for properties to broaden the ns –>
        <namespace uri="http://custom.model.org/model/content/1.0" prefix="ddp"/>
    </namespaces>

<constraints>

        <!– Passed in the meta data for the reports –>
        <constraint name="ddc:allowedLanguageType" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Unspecified</value> <!– means the value is blank –>
                    <value>Unclassified</value> <!– means the value is non-blank but not in the list below –>
                    <value>EN</value>
                    <value>ES</value>
                    <!– Ideally these codes need to be iso 639-1 codes - but I think that they come from MTV and it has bad data –>
                </list>
            </parameter>
        </constraint>
</constraints>
<types>
<type name="ddt:providerCommunication">
            <title>Provider Communication</title>
            <description>
                Classifies documents pretreatment estimates and correspondance.
            </description>
            <parent>cm:content</parent>
            <mandatory-aspects>
                <aspect>dda:printedCommunications</aspect>               
            </mandatory-aspects>
        </type>
</types>
<aspects>
        <!– Doc Properties for Provider and Enrollee service related documents –>
        <aspect name="dda:printedCommunications">
            <title>Provider and Enrollee Document Properties</title>
            <properties>
                <property name="ddp:accNo">
                    <title>Account Number</title>
                    <description>
                        The primary unique identifier of the associated
                    </description>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <index enabled="true">
                        <atomic>false</atomic>
                        <stored>true</stored>
                        <tokenised>false</tokenised>
                    </index>
                </property>
         </properties>
        </aspect>
</aspects>
</model>



model deploy successfully . I just want to know that , is this a right way to make custom model? if no, please given me the reason why not use more then one prefix in a model.

mrogers
Star Contributor
Star Contributor
The prefix is there to make your life easier.   I can't see how duplicating the prefix makes things easier but if you need to then you can.

Furthermore you could be encouraging some dodgy code for example would you be expecting a search for "ddt:allowedLanguageType"   to work.   Or throw it out with a property not defined error?     I suspect it may work which is perhaps not what you intend.