Well, what I want to achieve is "location" related, not "type" related. I want to create some entries in a Share Site's discussion board when a content is created/updated in it's document library.
AFAIK behaviour's execution (class policies at least) are constrained based on the node's type or aspect so in order to achieve my goal I would have to bind the policy to "cm:content" and then, in the behaviour decide if the created node is related to a site that requires notification or not. That seems like a very bad and overkill idea, isn't it ? Instead I managed to programatically add a rule at site-creation time that fires on "inbound" events.
Maybe I could instead do it like this:
- Add a rule to the document library that on create adds a custom "notifyToForum" aspect
- Add a behaviour that fires on "onUpdateProperties" of the "aspect". ( I think this property fires even on creation time, but that should be easy to detect when this happens based on the previous properties map )
- Add a behaviour that fires on "beforeDeleteNode" of the "aspect", to notify the deletion of a file.
- Add a behaviour that fires on "onCreateVersion", although probably the creation of a new version also fires "onUpdateProperties" and this won't be neccesary.
Does it make sense ? I'll give it a try this afternoon.