AnsweredAssumed Answered

specialize content @ onContentUpdate

Question asked by saconni on May 9, 2008
Hi guys!

First, sorry if this is not the right place for this topic. Didn't
find a better one

This is my issue:

I have written a content type, extending the basic content type. Then
I wrote a JScript policy to be executed on content update the bean xml

       <bean id="cm.content.onContentUpdate"
               <property name="policyName">
               <property name="className">
               <property name="behaviour">
                       <bean class="org.alfresco.repo.jscript.ScriptBehaviour"
                               <property name="location">
                                       <bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">

The Script checks the file name extension and if the file satisfy some
parsing rules. If every thing is ok, the content is specialized to my
custom content type.


Uploading content through the web client works like charm, but when I
upload a file using the alfresco file server, something funny
happened: the new conent node lacks of any of the basic content type
properties (title, description, etc). Is like specializing the type in
that specific moment prevents alfresco from creating the attribute

Some body have any clue about what is happening, or even better know
an alternative way to specialize a document in the precise moment it
is uploaded.

Thanks a lot, in advance.

And again, sorry if this is not the right place to post this issue.