Platform Explorer / Nuxeo Platform 8.2

Operation Document.CreateVersion

Snapshot Version

Description

Create a new version for the input document. Any modification made on the document by the chain will be automatically saved. Increment version if this was specified through the 'snapshot' parameter. Returns the live document (not the version).
Operation id Document.CreateVersion
Category Document
Label Snapshot Version
Requires
Since

Parameters

Name Description Type Required Default value
increment string no None, Minor, Major 
saveDocument boolean no  

Signature

Inputs document, documents
Outputs document, documents

Implementation information

Implementation class org.nuxeo.ecm.automation.core.operations.document.CreateVersion
Contributing component org.nuxeo.ecm.core.automation.coreContrib

JSON definition

{
  "id" : "Document.CreateVersion",
  "label" : "Snapshot Version",
  "category" : "Document",
  "requires" : null,
  "description" : "Create a new version for the input document. Any modification made on the document by the chain will be automatically saved. Increment version if this was specified through the 'snapshot' parameter. This operation should not be used in the context of the empty document created, about to create, before document modification, document modified events. Returns the live document (not the version).",
  "url" : "Document.CreateVersion",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "increment",
    "description" : "",
    "type" : "string",
    "required" : false,
    "widget" : "Option",
    "order" : 0,
    "values" : [ "None", "Minor", "Major" ]
  }, {
    "name" : "saveDocument",
    "description" : "Save the document in the session after versioning",
    "type" : "boolean",
    "required" : false,
    "widget" : "Check",
    "order" : 0,
    "values" : [ ]
  } ]
}