AnsweredAssumed Answered

Custom model and aspects

Question asked by nowhere on Mar 13, 2009
Latest reply on Mar 13, 2009 by nowhere
Hi all,
I'm trying to create custom model and I have a very stupid question:

I have defined my model as follow:


<types>
      <type name="my:perscontent">
         <title>My job document </title>
         <parent>cm:content</parent>
         <properties>
            <property name="my:dataPianificazione">
               <type>d:datetime</type>
            </property>
            <property name="my:type">
               <type>d:text</type>
            </property>
         </properties>
       </type>
</types>
<aspects>
  <aspect name="my:responsible">
            <associations>
                <association name="my:resp">
                    <source>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </source>
                    <target>
                        <class>cm:person</class>
                        <mandatory>true</mandatory>
                        <many>false</many>
                    </target>
                </association>
            </associations>
        </aspect>
   </aspects>


I'd like the "responsible aspect" to be automatically added when I create my content "perscontent" and choose my responsible among Alfresco users (just as bpmAssignee in workflow) when I define other content properties in webclient UI. Is there a way to automatically attach the aspect to the content when it's created?
Hope you can help me :)
Greetings,
NW

Outcomes