AnsweredAssumed Answered

Solved: New Aspect Registration

Question asked by jk3us on Jul 1, 2009
I'm in the beginning stages of creating types and aspects for our alfresco installation (obviously, still a newbie).  I've created a model with just a single aspect with some simple properties… the TestModel class says it is valid.  But I can't figure out how to get that new aspect to show up when adding an aspect to an item in alfresco.  What I've got is below:


<model name="c4k:c4k_model" xmlns="">
    <description>Cure4Kids Content Model</description>
    <author>Jay Knight</author>

        <!– Import Alfresco Dictionary Definitions –>
        <import uri="" prefix="d"/>
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="" prefix="cm"/>

        <!– Define a Namespace for my new definitions –>
        <namespace uri="org.cure4kids.model" prefix="c4k"/>


    <!– Type and Aspect definitions go here –>
        <aspect name="c4k:Cure4KidsMetadata">
            <title>Cure4Kids Metadata</title>
                <property name="c4k:language">
                <property name="c4k:context">
                <property name="c4k:obj_location">
                <property name="c4k:event_location">
                <property name="c4k:date">
                <property name="c4k:exp_date">
                <property name="c4k:rights_restricted">
                <property name="c4k:rights_description">
                <property name="c4k:reading_level">
                <property name="c4k:audience">


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

    <!– Registration of new models –>
    <bean id="c4k.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">


That second listing is the "Registration" as described at  I've tried naming it example-model-context.xml as mentioned in the docs, but I'm not sure it the name is important (I'd like it to be named something more descriptive). And I'm not sure how alfresco finds these new registration files, does it just search through all the xml files in that directory?  This seems to me to be the part that alfresco isn't picking up, but I'm not sure.

How do I make alfresco find and register this new model and aspect so that I can assign the aspect to content? What can I look for in the logs to determine what is going on?  I was getting errors in the log for a while, because the definitions were wrong, but now I don't see anything about it.

Edit: after looking a bit more, I'm thinking it may have to do with the bean's id attribute… but it's not at all clear what that should be.

Solution:  The missing piece was in the web-client-config-custom.xml file… Needed to add the "Action Wizard" bit tell alfresco to use that new aspect.  I'm on my way now, but still don't know if that id has anything to do with it :) (I changed in to extension.dictionaryBootstrap like I've seen in a few examples.)