cancel
Showing results for 
Search instead for 
Did you mean: 

Space with Version Action + AutoVersioning - CMIS Sync NO but Add File in Explorer YES?

lloy0076
Champ in-the-making
Champ in-the-making
alfresco-community-4.2.f-installer-linux-x64.bin on Centos 6.5 with the easy install option.

According to http://wiki.alfresco.com/wiki/Actions_and_Rules#Versionable when I use a rule action to add versionable, AutoVersion should be turned on. However, it seems to depend on how the file gets into the share.

Here is what I do:

1. Setup a rule for content that does not have the versionable aspect and give it the versionable aspect if it is created or entered the space.
2. Setup another rule for content that does have the versionable aspect and set it to checkin when it is updated.

PATH 1: Upload file by adding content using the Explorer web-application (http://foobar:8080/alfresco -i.e. the JSF app and not the one which is called share).

1. Upload a file, any file.
2. Examine the dialogs - notice that Auto Versioning tick box is present AND turned on.
3. Edit the file in any way.

It doesn't matter if you save it using WebDav, via CMIS Sync, CIFS or edit it in place.

It's happy.

PATH 2: Upload file by using CMIS sync from http://cmissync.com.

1. Upload a file, any file but using CMIS sync.
2. Go to the Alfresco Share app and notice that the file IS versioned.
3. But sadly, notice that for some reason auto-versioning property is off.

Also, notice that the "set property" action is BROKEN so you can't set any properties at all (but that is not this bug).

Now when you re-save/update files by CMIS sync, they get overwritten and you potentially lose data. And there's only ONE version (1.0).

Other salient information:

Here is my versionable aspect:

<blockcode>
      <aspect name="cm:versionable">
         <title>Versionable</title>
         <properties>
            <property name="cm:versionLabel">
               <title>Version Label</title>
               <type>d:text</type>
               <protected>true</protected>
            </property>
            <property name="cm:versionType">
               <title>Version Type</title>
               <type>d:text</type>
               <protected>true</protected>
            </property>
            <property name="cm:initialVersion">
               <title>Initial Version</title>
               <type>d:boolean</type>
               <default>true</default>
            </property>
            <property name="cm:autoVersion">
               <title>Auto Version</title>
               <type>d:boolean</type>
               <default>true</default>
            </property>
            <property name="cm:autoVersionOnUpdateProps">
               <title>Auto Version - on update properties only</title>
               <type>d:boolean</type>
               <default>true</default>
            </property>
          </properties>
      </aspect>
</blockcode>

It looks right to me!

But when applied by the site rule, the aspect - versionable is applied but not the property.

Is this a bug?

The attached file is what I see when I use CMIS sync to put the file in the repository. Notice how the Auto Version property says 'No' (i.e. false) but there is one version there; I believe it does have the versionable aspect.

2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Share (the app) is deliberately out of line with respect to versioning.   It's hard coded that way.

lloy0076
Champ in-the-making
Champ in-the-making
So I decided to make a JavaScript script, as attached and bumped the logging (1); in my logs I see:

<blockcode>
2014-04-15 10:56:51,765  DEBUG [jscript.RhinoScriptProcessor.calls] [http-bio-8080-exec-3] workspace://SpacesStore/376298e0-c387-47cd-96ee-fbc66a0f2bc3 Start
2014-04-15 10:56:51,941  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-3] !!! function main() !!
2014-04-15 10:56:51,942  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-3] autoVersionOnUpdateProps: true
2014-04-15 10:56:51,942  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-3] autoVersion: true
2014-04-15 10:56:51,942  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-3] Node ref: workspace://SpacesStore/3211b4be-147c-4504-b7d1-2e378a76b9f8
2014-04-15 10:56:51,943  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-3] !!! getNodeProps() !!
2014-04-15 10:56:51,943  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-3] autoVersionOnUpdateProps: true
2014-04-15 10:56:51,943  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-3] autoVersion: true
</blockcode>

…obviously the particular reference (37…bc3 above) is different each time the script runs.

I further tested by using Apple Finder's WebDav functionality and this picked up the auto version functionality.

Could it be that CMISSYNC (http://www.cmissync.com/) on Windows 7 configured with http://THE_DNS_NAME:8080/alfresco/cmisatom hits the share app somehow but how would I prove this in another way or at least get the share app to log that it's ignoring the fact that my JavaScript and the addition of the aspect seems to turn the auto version off?

DSL

(1) I discovered that setting ALL of Alfresco's log to DEBUG was not necessarily a good idea!