Managing relationships between objects
CMIS supports relationships (the same thing as an association in Alfresco), and it's possible to set up a relationship via the createRelationship
service call and remove a relationship via the deleteObject
service call in the
object service. The getObjectRelationships
service call that is part of the relationship service is used to get relationships where an object is either a source or a target.
The source object in the relationship needs to have the allowable action canCreateRelationship
set to true
for it to be possible to set up the relationship.
Alfresco comes with a number of out of the box association/relationship types. One of them is cm:replaces
. We will use this relationship type for the examples that follow, where we set up a relationship between two documents and one of them replaces the other. For example, let's say we have a folder with company policy documents and they can be changed on a yearly basis. The folder contains the following...