cancel
Showing results for 
Search instead for 
Did you mean: 

Defining versioned and unversioned Document types

spano
Champ in-the-making
Champ in-the-making
Hello,

I am trying to create two types of Documents in Alfresco, one that supports versions of a Document to be created while the other does not support versions. I have defined the following two document types in cmisTestModel.xml which are shown below.

1. BPMDocument (supports creation of versions)
2. BPMDocumentUnversioned (does not support versions)

The difference between the two are that BPMDocument contains the cm:versionable aspect whereas BPMDocumentUnversioned does not. Unfortunately BPMDocumentUnversioned still allows me to create different versions of the document using the CMIS spec (checkin and checkout). Is there something wrong with my definitions provided below?


<type name="cmiscustom:BPMDocument">
    <title>BPM Document</title>
    <parent>cm:content</parent>
    <properties>
        <property name="cmiscustom:BPMBoolean">
            <title>BPMBoolean</title>
            <type>d:boolean</type>
            <multiple>true</multiple>
        </property>
        <property name="cmiscustom:BPMInteger">
            <title>BPMInteger</title>
            <type>d:int</type>
        </property>
        <property name="cmiscustom:BPMFloat">
            <title>BPMFloat</title>
            <type>d:float</type>
        </property>
        <property name="cmiscustom:BPMDateTime">
            <title>BPMDateTime</title>
            <type>d:datetime</type>
        </property>
    </properties>
    <mandatory-aspects>
        <aspect>cm:versionable</aspect>
    </mandatory-aspects>
</type>
    



<type name="cmiscustom:BPMDocumentUnversioned">
    <title>BPM Document Unversioned</title>
    <parent>cm:content</parent>
    <properties>
        <property name="cmiscustom:BPMUnversionedBoolean">
            <title>BPMUnversionedBoolean</title>
            <type>d:boolean</type>
            <multiple>true</multiple>
        </property>
        <property name="cmiscustom:BPMUnversionedInteger">
            <title>BPMUnversionedInteger</title>
            <type>d:int</type>
        </property>
        <property name="cmiscustom:BPMUnversionedFloat">
            <title>BPMUnversionedFloat</title>
            <type>d:float</type>
        </property>
        <property name="cmiscustom:BPMUnversionedDateTime">
            <title>BPMUnversionedDateTime</title>
            <type>d:datetime</type>
        </property>
    </properties>
</type>
4 REPLIES 4

parzgnat
Star Contributor
Star Contributor
I believe that this is a bug in Alfresco's CMIS implementation.  I had a similar problem.  What version of Alfresco are you on?

spano
Champ in-the-making
Champ in-the-making
I am on 4.2.c

spano
Champ in-the-making
Champ in-the-making
I am still unable to fix this problem but have come upon this link:

http://wiki.alfresco.com/wiki/CMIS#Aspect_Domain_Model

Would anyone more knowledgeable know if this might be the answer:

Aspect Domain Model

Each Aspect in Alfresco is mapped to a Policy Type definition. The mapping of Aspect to Type Definition is exactly the same as Class to Type Definition.

Although each Aspect is represented as a Policy, they are not "creatable", and therefore cannot be applied to objects via CMIS policy services.

The Aspects cm:referenceable, cm:auditable and <strong>cm:versionable</strong> are not mapped to Policies, as they are already mapped to native document/folder properties defined in the CMIS domain model.

spano
Champ in-the-making
Champ in-the-making
Bumping this. Hoping someone can still help, I have not been able to come up with anything new…