cancel
Showing results for 
Search instead for 
Did you mean: 

Versioning, major and minor versions

radekc
Champ in-the-making
Champ in-the-making
Hello,

What is the proper way to correctly create a major version change via PHP Library ?
We want to modify atributes and content of a document node and mark this change as major.

When we try to use $node->createVersion($description=null, $major=boolean) and then to modify and save node attributes (including its content, name, description etc.), then this scenario creates two versions - one created by createVersion() and second via $session->save() which goes after $node properties update.

On the other hand I don't see any way to tell Alfresco, that this is major document change without calling createVersion().

Please, what is the right way to do this, without generationg two versions ?
Could it be the solution to disable automatic versioning somehow, to call createVersion, then change attributes and call session->save - which would not generate new version ?

Thanks for any advice, we use Alfresco 3.4 d.
Radek
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
there's a property to set on the node which controls whether its major or minor.   Or you can control it explicitly.

radekc
Champ in-the-making
Champ in-the-making
Could You please provide some example or link to this attribute ?

Thanks.

radekc
Champ in-the-making
Champ in-the-making
Or could anyone share some link to tutorial, how to comunicate with Alfresco directly via Soap ?

I am trying this way:

      $client = WebServiceFactory::getAuthoringService("http://example.com:8080/alfresco/api", $this->docModel->ticket);
      $result = $client->getVersions(array("node" => $fileNode->__toArray()));

but I am failing with basics. Could someone kick me to right way ?

(1) I do not completely understand the structure of API reference:
http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#File_Upload
I am missing the "input" section for some methods. E.g. For File_Upload - filedata, siteid, … these are input variable names ?
So can I provide them this way ? :
$soapClient->postFileUpload(array("filedata" => …, "siteid" => ));

Thanks.