chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Vanheusden <>
Subject Create Relationship and Updatability problem
Date Thu, 29 Jul 2010 14:33:25 GMT

I have the following problem using the OpenCMIS Client and Alfresco Enterprise 3.3. 

If I want to create a relationship between two documents I use this code:

Map<String, Serializable> relProps = new HashMap<String, Serializable>();
relProps.put("cmis:sourceId", doc1.getId());
relProps.put("cmis:targetId", doc2.getId());
relProps.put("cmis:objectTypeId", "cmis:relationship");
session.createRelationship(relProps, null, null, null);

When I execute this code I get the following exception: 
CmisInvalidArgumentException: Source Id is not set!

When debugging this code I see the following situation.
The convertProperties in PersistentObjectFactoryImpl is called and when it iterates over the
first property (cmis:sourceId) it skips the loop at:

// check updatability
if (updatabilityFilter != null) {
     if (!updatabilityFilter.contains(definition.getUpdatability())) {

If I query the property definition for cmis:sourceId I get a READONLY value from Alfresco
which isn't available in the list.

    private static final Set<Updatability> CREATE_UPDATABILITY = new HashSet<Updatability>();
    static {

So it is impossible to create a new Releationship because the cmis:sourceId and cmis:targetId
will never be availble after the property conversion.

Not sure if it is an Alfresco or OpenCMIS bug or just me?

Hope you guys can point me in the right direction!

Kind regards,


View raw message