cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Model not Adding

mikenels2000
Champ in-the-making
Champ in-the-making
Hi all it seems I cannot add a 2nd custom model.  I am a newbie creating my first couple of models. My first model shows up correctly when creating/attaching new files in alfresco explorer.  The first one "Policy and Procedures Record" shows up fine on the content type dropdown, and meta data is correct and can key these additional fields in.  The "Employee Handbook Record" model type does not display.  I can't see much difference in the setup between the models.  Would appreciate if anyone out there can see what I'm doing wrong. (using 3.2 version enterprise).

Thanks in advance.

Have 5 total files all stored in the Alfresco\tomcat\shared\classes\alfresco\extension subdirectory.
policyModel.xml
<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

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

<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0 ../../../../../modelSchema.xsd"
xmlns="http://www.alfresco.org/model/dictionary/1.0"
name="yea:policyModel">

   <!– Optional meta-data about the model –>  
   <description>Policy 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 custom.model should be chanyead to reflect your own namespace –>
   <namespaces>
      <namespace uri="http://www.yaskawa.com/model/yea/content/policy" prefix="yea"/>
   </namespaces>
  
   <constraints>
      <constraint name="yea:divisions" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>-Select One-</value>
               <value>Finance</value>
               <value>FOS</value>
               <value>Human Resources</value>
               <value>Marketing</value>
               <value>OPS</value>
               <value>Sales</value>
            </list>
         </parameter>
      </constraint>
      <constraint name="yea:locations" type="LIST">
               <parameter name="allowedValues">
                  <list>
                     <value>-Select One-</value>
                     <value>All</value>
                     <value>Branch</value>
                     <value>Corporate</value>
                  </list>
               </parameter>
      </constraint>
      <constraint name="yea:categories" type="LIST">
             <parameter name="allowedValues">
                  <list>
                   <value>-Select One-</value>
         <value>Accidents YEA-P-100</value>
         <value>Acquisitions &amp; Meryears YEA-P-200</value>
         <value>Affirmative Action &amp; EEO YEA-P-300</value>
         <value>Antitrust Compliance YEA-P-400</value>
         <value>Attendance YEA-P-600</value>
         <value>Audit, HR YEA-P-700</value>
         <value>Automobile, Company YEA-P-800</value>
         <value>Benefits, Misc. YEA-P-900</value>
         <value>Communications YEA-P-1000</value>
         <value>Community Relations YEA-P-1100</value>
         <value>Compensation YEA-P-1200</value>
         <value>Compensation YEA P-1200</value>
         <value>Conduct/Misconduct YEA-P-1300</value>
         <value>Conflict of Interest YEA-P-1400</value>
         <value>Counseling YEA-P-1500</value>
         <value>Demotion YEA-P-1600"</value>
         <value>Discipline YEA-P-1700</value>
         <value>Disclosure YEA-P-1800</value>
         <value>Emeryeancy Procedures YEA-P-1900</value>
         <value>Employment - YEA-P-4200</value>
         <value>Equipment YEA-P-2000</value>
         <value>Ethics YEA-P-2100</value>
         <value>Expense Accounts YEA-P-2200</value>
         <value>Facilities YEA-P-2300</value>
         <value>Filing System YEA-P-2400</value>
         <value>Financial Services YEA-P-2500</value>
         <value>Garnishment YEA-P-2600</value>
         <value>Grievance YEA-P-2700</value>
         <value>Hazard Communications YEA-P-2800</value>
         <value>Health &amp; Medical Benefits YEA-P-2900</value>
         <value>Inactive Policies</value>
         <value>Insurance, Corporate YEA-P-3000</value>
         <value>Leaves of Absence YEA-P-3100</value>
         <value>Organization Chart YEA-P-3200</value>
         <value>Orientation YEA-P-3300</value>
         <value>Overtime YEA-P-3400</value>
         <value>Performance Reviews YEA-P-3500</value>
         <value>Position Descriptions YEA-P-3600</value>
         <value>Promotion YEA-P-3700</value>
         <value>Purchasing YEA-P-3800</value>
         <value>Recognition YEA-P-4000</value>
         <value>Record Keeping YEA-P-3900</value>
         <value>Recreation &amp; Social YEA-P-4100</value>
         <value>Recruiting YEA-P-4200</value>
         <value>Relocation YEA-P-4300</value>
         <value>Retention &amp; Motivation YEA-P-4400</value>
         <value>Retirement YEA-P-4500</value>
         <value>Safety &amp; Security YEA-P-4600</value>
         <value>Schedule of Work Hours YEA-P-4700</value>
         <value>Sexual Harassment YEA-P-4800</value>
         <value>Substance Abuse YEA-P-4900</value>
         <value>Sugyeastion System YEA-P-5000</value>
         <value>Surveys YEA-P-5100</value>
         <value>Temporary Employees YEA-P-5200</value>
         <value>Termination YEA-P-5300</value>
         <value>Training &amp; Education YEA-P-5400</value>
         <value>Transfers YEA-P-5500</value>
         <value>Travel YEA-P-5600</value>
         <value>Uniforms YEA-P-5700</value>
         <value>Vacations YEA-P-5800</value>
         <value>Visitors YEA-P-5900</value>
                </list>
             </parameter>
      </constraint>
   </constraints>
  
   <types>
      <type name="yea:policyRecord"> 
      <title>Policies and Procedure Record</title>
      <parent>cm:content</parent>
         <properties>
         <property name="yea:policyNumber">
            <title>Policy Number</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
            <multiple>false</multiple>
            <default>0000.00</default>
         </property>
         <property name="yea:supercedesNumber">
            <title>Supercedes #</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
            <default>0000.00</default>
         </property>
         <property name="yea:issueDate">
                <type>d:date</type>
                <mandatory>true</mandatory>
         </property>
         <property name="yea:division">
            <title>Division</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
            <constraints>
               <constraint ref="yea:divisions"/>
            </constraints>
         </property>
         <property name="yea:location">
                <title>Location</title>
                <type>d:text</type>
                <mandatory>true</mandatory>
                <constraints>
                   <constraint ref="yea:locations"/>
                </constraints>
         </property>
         <property name="yea:category">
                    <title>Category</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="yea:categories"/>
                    </constraints>
         </property>
         </properties>
      </type>
   </types>
  
   <aspects>
     
   </aspects>
     
</model>

policy-model-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/policyModel.xml</value>
            </list>
        </property>
    </bean>
         
</beans>

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

<!– Custom Model –>

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

<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0 ../../../../../modelSchema.xsd"
xmlns="http://www.alfresco.org/model/dictionary/1.0"
name="yea:handbookModel">

   <!– Optional meta-data about the model –>  
   <description>Policy 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 custom.model should be chanyead to reflect your own namespace –>
   <namespaces>
      <namespace uri="http://www.yaskawa.com/model/yea/content/handbook" prefix="yea"/>
   </namespaces>
  
   <constraints>
      <constraint name="yea:divisions" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>-Select One-</value>
               <value>Finance</value>
               <value>FOS</value>
               <value>Human Resources</value>
               <value>Marketing</value>
               <value>OPS</value>
               <value>Sales</value>
            </list>
         </parameter>
      </constraint>
      <constraint name="yea:locations" type="LIST">
               <parameter name="allowedValues">
                  <list>
                     <value>-Select One-</value>
                     <value>All</value>
                     <value>Branch</value>
                     <value>Corporate</value>
                  </list>
               </parameter>
      </constraint>
      <constraint name="yea:categories" type="LIST">
             <parameter name="allowedValues">
                  <list>
                   <value>-Select One-</value>
         <value>Accidents YEA-P-100</value>
         <value>Acquisitions &amp; Meryears YEA-P-200</value>
         <value>Affirmative Action &amp; EEO YEA-P-300</value>
         <value>Antitrust Compliance YEA-P-400</value>
         <value>Attendance YEA-P-600</value>
         <value>Audit, HR YEA-P-700</value>
         <value>Automobile, Company YEA-P-800</value>
         <value>Benefits, Misc. YEA-P-900</value>
         <value>Communications YEA-P-1000</value>
         <value>Community Relations YEA-P-1100</value>
         <value>Compensation YEA-P-1200</value>
         <value>Compensation YEA P-1200</value>
         <value>Conduct/Misconduct YEA-P-1300</value>
         <value>Conflict of Interest YEA-P-1400</value>
         <value>Counseling YEA-P-1500</value>
         <value>Demotion YEA-P-1600"</value>
         <value>Discipline YEA-P-1700</value>
         <value>Disclosure YEA-P-1800</value>
         <value>Emeryeancy Procedures YEA-P-1900</value>
         <value>Employment - YEA-P-4200</value>
         <value>Equipment YEA-P-2000</value>
         <value>Ethics YEA-P-2100</value>
         <value>Expense Accounts YEA-P-2200</value>
         <value>Facilities YEA-P-2300</value>
         <value>Filing System YEA-P-2400</value>
         <value>Financial Services YEA-P-2500</value>
         <value>Garnishment YEA-P-2600</value>
         <value>Grievance YEA-P-2700</value>
         <value>Hazard Communications YEA-P-2800</value>
         <value>Health &amp; Medical Benefits YEA-P-2900</value>
         <value>Inactive Policies</value>
         <value>Insurance, Corporate YEA-P-3000</value>
         <value>Leaves of Absence YEA-P-3100</value>
         <value>Organization Chart YEA-P-3200</value>
         <value>Orientation YEA-P-3300</value>
         <value>Overtime YEA-P-3400</value>
         <value>Performance Reviews YEA-P-3500</value>
         <value>Position Descriptions YEA-P-3600</value>
         <value>Promotion YEA-P-3700</value>
         <value>Purchasing YEA-P-3800</value>
         <value>Recognition YEA-P-4000</value>
         <value>Record Keeping YEA-P-3900</value>
         <value>Recreation &amp; Social YEA-P-4100</value>
         <value>Recruiting YEA-P-4200</value>
         <value>Relocation YEA-P-4300</value>
         <value>Retention &amp; Motivation YEA-P-4400</value>
         <value>Retirement YEA-P-4500</value>
         <value>Safety &amp; Security YEA-P-4600</value>
         <value>Schedule of Work Hours YEA-P-4700</value>
         <value>Sexual Harassment YEA-P-4800</value>
         <value>Substance Abuse YEA-P-4900</value>
         <value>Sugyeastion System YEA-P-5000</value>
         <value>Surveys YEA-P-5100</value>
         <value>Temporary Employees YEA-P-5200</value>
         <value>Termination YEA-P-5300</value>
         <value>Training &amp; Education YEA-P-5400</value>
         <value>Transfers YEA-P-5500</value>
         <value>Travel YEA-P-5600</value>
         <value>Uniforms YEA-P-5700</value>
         <value>Vacations YEA-P-5800</value>
         <value>Visitors YEA-P-5900</value>
                </list>
             </parameter>
      </constraint>
   </constraints>
  
   <types>
      <type name="yea:handbookRecord"> 
      <title>Policies and Procedure Record</title>
      <parent>cm:content</parent>
         <properties>
         <property name="yea:handbookNumber">
            <title>Policy Number</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
            <multiple>false</multiple>
            <default>0000.00</default>
         </property>
         <property name="yea:supercedesNumber">
            <title>Supercedes #</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
            <default>0000.00</default>
         </property>
         <property name="yea:issueDate">
                <type>d:date</type>
                <mandatory>true</mandatory>
         </property>
         <property name="yea:division">
            <title>Division</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
            <constraints>
               <constraint ref="yea:divisions"/>
            </constraints>
         </property>
         <property name="yea:location">
                <title>Location</title>
                <type>d:text</type>
                <mandatory>true</mandatory>
                <constraints>
                   <constraint ref="yea:locations"/>
                </constraints>
         </property>
         <property name="yea:category">
                    <title>Category</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="yea:categories"/>
                    </constraints>
         </property>
         </properties>
      </type>
   </types>
  
   <aspects>
     
   </aspects>
     
</model>

handbook-model-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/handbookModel.xml</value>
            </list>
        </property>
    </bean>
         
</beans>

web-client-config-custom.xml
<?xml version="1.0" encoding="UTF-8"?>
<alfresco-config>

  
   <config evaluator="string-compare" condition="Content Wizards"
           replace="true">
           <content-types>
              <type name="yea:policyRecord" />  
              <type name="hnd:handbookRecord" />
           </content-types>
          
           <!– For attaching meta data to attachment files –>
           <specialise-types>
              <type name="yea:policyRecord" />  
              <type name="hnd:handbookRecord" />
           </specialise-types>
          
      </config>
 
  
   <!– Policy and Procedures Start  –>
     
   <config evaluator="node-type" condition="yea:policyRecord">
      <property-sheet>
         <separator name="sep" display-label="Policies and Procedures - General Properties" component-generator="HeaderSeparatorGenerator" />
         <show-property name="size" display-label-id="size"
            converter="org.alfresco.faces.ByteSizeConverter" read-only="true" />
        <show-property name="yea:policyNumber" display-label="Policy Number" read-only="false" />
         <show-property name="yea:supercedesNumber" display-label="Supercedes" read-only="false" />
         <show-property name="yea:issueDate" display-label="Issue Date" read-only="false" />
         <show-property name="yea:division" />
         <show-property name="yea:location" />
         <show-property name="yea:category" />
      </property-sheet>
   </config>
 
        
   <!– Policy and Procedures End   –>
  
  
   <!– Handbook Start –>
    
     <config evaluator="node-type" condition="hnd:handbookRecord">
           <property-sheet>
              <separator name="sephandbook" display-label="Employee Handbook - General Properties" component-generator="HeaderSeparatorGenerator" />
              <show-property name="size" display-label-id="size"
                 converter="org.alfresco.faces.ByteSizeConverter" read-only="true" />
             <show-property name="hnd:category" display-label="Category" read-only="false" />
              <show-property name="hnd:sequence" />
              <show-property name="hnd:issueDate" />
           </property-sheet>
     </config>
    
   <!– Handbook End   –>
 
   <!– use this to add records to actions list –>
   <config evaluator="string-compare" condition="Action Wizards">
     
      <!– The list of types shown in the issubtype condition –>
      <subtypes>
         <type name="yea:policyRecord" />
         <type name="hnd:handbookRecord" />
      </subtypes>
     
      <!– Note the UK spelling of specialise  –>
      <specialise-types>
         <type name="yea:policyRecord" />
         <type name="hnd:handbookRecord" />
      </specialise-types>

   </config>
  
  
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="yea:policyRecord" />
            <type name="hnd:handbookRecord" />
         </content-types>
       
      </advanced-search>
   </config>
  
  
  
  

</alfresco-config>
2 REPLIES 2

sselvan
Champ in-the-making
Champ in-the-making
Even though you have two model XML documents, you will have to have only one ***context.xml file.
This ****context.xml file will have two nodes for these separate models.

Then only it will work.

Hope this is helpful!

Note: If helpful, click on the right hand side of the Post as useful - as "Yes".Thank you! Smiley Happy

mikenels2000
Champ in-the-making
Champ in-the-making
That was the issue. 

Thank You for your help!!!!