AnsweredAssumed Answered

Custom repository

Question asked by jackarnd on May 3, 2017
Latest reply on May 9, 2017 by jackarnd

So I'm doing the Jeff Potts tutorial about Working With Custom Content Types in Alfresco but after i made the few changes as said in the tutorial to add some rules in the rule configuration panel i don't see any change.
All the things I added don't appear.
My share-config-custom.xml in ..\tutorial_home\content-tutorial-share\src\main\resources\META-INF\ looks like this :

<alfresco-config>
<!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary">
</config>
</alfresco-config>

<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="sc:doc" />
<subtype name="sc:whitepaper" />
</type>
<type name="sc:doc">
<subtype name="sc:whitepaper" />
</type>
</types>

And my scModel.xml in ..\tutorial_home\content-tutorial-repo\src\main\resources\alfresco\module\content-tutorial-repo\model\ looks like this : 

<?xml version="1.0" encoding="UTF-8"?> <!-- Definition of new Model -->
<model name="sc:somecomodel"
       xmlns="http://www.alfresco.org/model/dictionary/1.0">
     <!-- Optional meta-data about the model -->
    <description>Someco Model</description>
    <author>Jeff Potts</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"/>
    </imports>      <!-- Introduction of new namespaces defined by this model -->
    <namespaces>
        <namespace uri="http://www.someco.com/model/content/1.0" prefix="sc"/>
    </namespaces>
    <constraints>
        <constraint name="sc:campaignList" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Application Syndication</value>
                    <value>Private Event Retailing</value>
                    <value>Social Shopping</value>
                </list>
            </parameter>
        </constraint>
    </constraints>
    <types>         <!-- Enterprise-wide generic document type -->
        <type name="sc:doc">
            <title>Someco Document</title>
            <parent>cm:content</parent>
            <associations>
                <association name="sc:relatedDocuments">
                    <title>Related Documents</title>
                    <source>
                        <mandatory>false</mandatory>
                        <many>true</many>
                    </source>
                    <target>
                        <class>sc:doc</class>
                        <mandatory>false</mandatory>
                        <many>true</many>
                    </target>
                </association>
            </associations>
            <mandatory-aspects>
                <aspect>cm:generalclassifiable</aspect>
            </mandatory-aspects>
        </type>
        <type name="sc:whitepaper">
            <title>Someco Whitepaper</title>
            <parent>sc:doc</parent>
        </type>
        <type name="sc:marketingDoc">
            <title>Someco Marketing Document</title>
            <parent>sc:doc</parent>
            <properties>
                <property name="sc:campaign">
                    <type>d:text</type>
                    <multiple>true</multiple>
                    <constraints>
                        <constraint ref="sc:campaignList"/>
                    </constraints>
                </property>
            </properties>
        </type>
    </types>
    <aspects>
        <aspect name="sc:webable">
            <title>Someco Webable</title>
            <properties>
                <property name="sc:published">
                    <type>d:date</type>
                </property>
                <property name="sc:isActive">
                    <type>d:boolean</type>
                    <default>false</default>
                </property>
            </properties>
        </aspect>
        <aspect name="sc:productRelated">
            <title>Someco Product Metadata</title>
            <properties>
                <property name="sc:product">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <multiple>true</multiple>
                </property>
                <property name="sc:version">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <multiple>true</multiple>
                </property>
            </properties>
        </aspect>
    </aspects>
</model>

If anyone ever had this problem and can help me. I don't really know where the problem may come from and I'm a newbie in the Alfresco development world so only showed these two documents, if you need anything else, let me know.

Outcomes