cancel
Showing results for 
Search instead for 
Did you mean: 

add aspect as a property

unknown-user
Champ on-the-rise
Champ on-the-rise
how can i add an aspect as a properties of the metadata?
Thx
bird
6 REPLIES 6

davidc
Star Contributor
Star Contributor
What exactly are you trying to achieve?

unknown-user
Champ on-the-rise
Champ on-the-rise
what i want to do is include a new property.

I explain myself, there is the metadata, like author, or date or description… There are some properties which are automatically filled in, as the date or the author. So i would like to add two other properties as the space, or state of a document, but i want to do this in a automatically way.

The other possibility i can think of, is to add an aspect and then make an automatic rule. But i don't know if this is possible. By automatically rule i mean do it in the code, and not force the user to do it. So when a document is inbound, then activate this rule as adding a new aspect in a transparent way for the user.

Can you give me any idea?

Thanks very much
Bird

davidc
Star Contributor
Star Contributor
You can define an aspect as described in http://wiki.alfresco.com/wiki/Data_Dictionary_Guide.  Then using a Javascript action tied to a rule you can within the script add the aspect and set the property values.

unknown-user
Champ on-the-rise
Champ on-the-rise
i can understand more or less what are you trying to explain, but don't know exactly where to do so.

But my question was… how can i make a rule, to be automatic and transparent to a user. To generated automatically.

Thanks for your help
Bird

davidc
Star Contributor
Star Contributor
Here are some options:

1) Add the rule to Company Home and set "Apply to sub-spaces"
2) Create a Space Template with the rule defined, so it's picked up whenever a Space is created from the Space Template

Otherwise, you can use the http://wiki.alfresco.com/wiki/Alfresco_Content_Management_Java_API to create a rule programmatically and attach it to a Space.  However, I'm not sure when you would execute this code.

unknown-user
Champ on-the-rise
Champ on-the-rise
thanks very much for your help.

We will have a look at the second option, but now what we have is the first one.

Regards.
Bird