How Can We Help?

Versioning

Provides support for simple and advanced version numbering, as well as for manipulations of object and document’s major and minor versions.

Configuration

  1. Open M-Files Admin
  2. In the left-side tree view, expand the desired connection to M-Files Server.
  3. In the left-side tree view, expand the Document Vaults node.
  4. Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
  5. Expand Other Applications
  6. Expand Extension Kit
  7. Click on Extended Versioning

Field description

FieldValueDescription
EnabledYes/NoSpecifies whether the module is in use.
Configuration modeSimple/AdvancedDisplay simple or advanced configuration options for module.
Rules > Versioning rule [n]
NameTextCustom rule name.
DescriptionTextOptional rule description.
Configuration modeSimple/AdvancedDisplay simple or advanced options for rule.
Trigger typeOne of the following:
• ObjectCreated
• ObjectChanged
• ObjectEnteredState
• OnComment
• Scheduled
• RunOnce
Type of event that triggers the execution of this rule.
ObjectCreated. If this option is selected, rule will be executed when the source object is created.
ObjectChanged. If this option is selected, rule will be executed when any change is made to the source object
ObjectEnteredState. If this option is selected, rule will be executed when the source object has entered a new state.
OnComment. If this option is selected, rule will be executed when the source object has new comment.
RunOnce. If this option is selected, rule will be run only once and on all matching objects in vault.
NOTE: On vault restart, all enabled rules with Run once trigger will be run immediately.
Execute onOne of the following:
• TriggerObject
• VaultSearch
Displayed only if [Advanced] is selected as Configuration mode. Specify whether actions will be executed on trigger source object or vault search result object.
Business criticalYes/NoIf set to true, rule will be logged in SEQ.
Rules > Versioning rule [n] > Trigger source [n]
Object TypeList of object typesObject type of source object.
ClassList of classesClass of source object.
WorkflowList of workflowsWorkflow of source object.
StateList of workflow statesWorkflow state of source object.
Rules > Versioning rule [n] > Trigger source [n] >Search filters > Filter [n]
SearchConditionsSearch ConditionsOptional additional conditions that source object needs to satisfy.
Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator.
Look inOne of the following:
• LatestObjVersion
• AllObjVersion
When trying to match the above source conditions, look in all object versions, or only the
latest one.
Latest obj version. If this option is selected, the
current object version must match the specified
conditions for object to be treated as source for this
rule.
All obj versions. If this option is selected, any object
version must match the specified conditions and for
object to be treated as source for this rule.
Rules > Versioning rule [n] > Vault search [n] > Search [n]
Conditions• Property definitions
• Status field conditions
Optional list of conditions that must be satisfied in vault in order for this rule to be executed.
Search result typeOne of the following:
• Any
• None
Displayed only if [Advanced] is selected as Configuration mode.
Any. When this option is selected and at least one search condition is set, rule will be executed only if the vault search result has at least one matching result.
None. When this option is selected and at least one search condition is set, rule will be executed only if the vault search result doesn’t have any matching results.
Rules > Versioning rule [n] > Vault search [n] > Search [n] > Status field condition [n]
FieldOne of the following:
• ID
• Type
• Version
Status field.
OperatorOne of the following:
• =
• !=
• >
• <
• >=
• <=
Operator to apply in comparison of actual and expected property value.
ValueValueStatus field value.
Rules > Versioning rule [n] > Vault search [n] > Search [n] > Property conditions [n]
PropertyProperty definitionProperty whose value condition will be checked.
OperatorOne of the following:
• =
• !=
• >
• <
• >=
• <=
• Contains
• DoesNotContain
• StartsWith
• DoesNotStartWith
Operator to apply in comparison of actual and expected property value.
Rules > Versioning rule [n] > Vault search sort [n]
Sort byProperty definitionProperty definition for vault search sort.
Sort directionOne of the following:
• Ascending
• Descending
Ascending. If this option is selected, search result will have ascending order.
Descending. If this option is selected, search result will have ascending order.
Rules > Versioning rule [n] > Actions [n] > Action [n]
Action typeOne of the following:
• SetVersion
• IncrementVersion
• DecrementVersion
• ObjectSnapshot
Type of action to execute.
Set version. Sets the specified version property on object.
Increment version. Increments the specified version property on object.
Decrement version. Decrement the specified version property on object.
Object Snapshot. Creates snapshot of current object and adds it in some collection.
Rules > Versioning rule [n] > Actions [n] > IncrementVersion > Version settings
Version typeOne of the following:
• Simple
• TwoPart
• Semantic
• Custom
Type of version.
Version propertyProperty definitionProperty whose value will be set.
Default valueIntegerDefault version value.
Increment ValueIntegerDisplayed only if Increment Version is selected as an Action type.
Value of increment.
Decrement ValueIntegerDisplayed only if Decrement Version is selected as an Action type.
Value of decrement.
Increment version partOne of the following:
• Major
• Minor
• Patch
Displayed only if [Increment Version] is selected as an Action type and [Semantic] is selected as Version type.
This setting specifies which version number should be updated when creating new version. It is assumed that version number is comprised of one to three digits separated by a dot. Eq. in version number 1.2.3, 1 is major number, 2 is minor and 3 is patch.
Decrement version partOne of the following:
• Major
• Minor
• Patch
Displayed only if [Decrement Version] is selected as Action type and [Semantic] is selected as Version type.
This setting specifies which version number should be updated when creating new version. It is assumed that version number is comprised of one to three digits separated
by a dot. Eq. in version number 1.2.3, 1 is major number, 2 is minor and 3 is patch.
Increment valueIntegerIncrement that will be used when calculating next value.
Rules > Versioning rule [n] > Actions [n] > Versioning action [n] > Version settings > Value
Version typeOne of the following:
• Static
• Numbered
Type of version.
Start numbering fromOne of the following:
• DefaultValue
• Vault
Vault numbering should start from:
DefaultValue.
Start numbering from specified static default value. Vault. Search for object in vault that matches specified grouping conditions and contain this numbering property and start numbering from biggest found value of property.
Rules > Versioning rule [n] > Actions [n] > Versioning action [n] > Version settings > Simple
Version propertyProperty definitionProperty whose value will be set on.
Allowed property data types:
• Number
• Text
• Text (multi – line)
Rules > Versioning rule [n] > Actions [n] > Versioning action [n] > Version settings > Value type > Numbered
Default valueIntegerDefault value to use when none found in vault.
Increment valueIntegerIncrement that will be applied when calculating numbered value from max value in vault or default value.
Search timeout (sec)IntegerSearch timeout in second. Value should always be between 1 and 9 seconds. This timeout is applied to search operation that retrieves max value of property from vault.
Include deleted objectsIntegerInclude deleted objects when searching in Vault.
Rules > Versioning rule [n] > Actions [n] > Versioning action [n] > Version settings > Grouping > Grouping [n]
Group byOne of the following:
• Property
• PropertyCondition
• StatusField
• StatusFieldCondition
Group by conditions for numbering.
PropertyPropertyDisplayed only if Property is selected as Group by.
Rules > Versioning rule [n] > Actions [n] > Versioning action [n] > Version settings > Value > Grouping > Grouping [n] > Property condition
PropertyPropertyProperty whose value condition will be checked.
OperatorOne of the following:
• =
• !=
• >
• <
• >=
• <=
• Contains
• DoesNotContain
• StartsWith
• DoesNotStartWith
Operator to apply in comparison of actual and expected property value.
Rules > Versioning rule [n] > Actions [n] > Versioning action [n] > Version settings > Value > Grouping > Grouping [n] > Status field
FieldOne of the following:
• ID
• Type
• Version
Status field.
Rules > Versioning rule [n] > Actions [n] > Snapshot settings > Snapshot collection
Object typeObject typeObject type
ClassObject classObject class
NameTextCollection name. If not set using source object’s name.
Rules > Versioning rule [n] > Actions [n] > Snapshot settings > Snapshot collection > Properties > Property setter [n]
PropertyObject typeObject type
ClassObject classObject class
Value typeOne of the following:
• Value
• Function
Displayed only if SetValue is selected as Property mode.
Rules > Versioning rule [n] > Actions [n] > Snapshot settings > Snapshot collection > Properties > Property setter [n] > Value
ModeOne of the following:
• No action • Dynamic value
• Static value
• Empty value
Displayed only if SetValue is selected as Property mode. Dynamic value. If this option is selected, comparison value will be created dynamically from source properties.
Static value. If this option is selected, comparison value will be created statically i.e. constant value.
Empty value. If this option is selected, comparison value will be empty.
No action. If this option is selected, no action will be performed. This is an invalid state.
MultiSelectLookupBehaviourOne of the following:
• Overwrite
• Append
• Remove
Displayed only when Value Type is Value. If property is multi-select lookup, this setting controls how the selected value will be added: overwriting existing ones, or appending.
Dynamic valuePlaceholder editorDisplayed only if Dynamic value is selected as a mode. Specifies search comparison value using properties from source object.
Static valueTextDisplayed only if Static value is selected as a mode. Specifies constant search comparison value
Rules > Versioning rule [n] > Actions [n] > Snapshot settings > Snapshot object
NameTextSnapshot object name.
Rules > Rule [n] > Actions [n] > Snapshot settings > Snapshot object > Properties [n] > Property setter
PropertyPropertyProperty from source object that will be set on snapshot object.
ModeOne of the following:
• SetValue
• FromSource
Controls how the value of property will be calculated: directly by copying value from source or as function of selected property
values.
Rules > Rule [n] >Actions > Properties > Property value [n] > Function
Functions groupOne of the following:
• Text
• Date
• Numeric
• Regex
Type of function that will be used to calculate property value.
FunctionWhen Functions group is Text, one of the following:
• Concatenate
• ToLower
• ToUpper
• ToLowerInvariant
• ToUpperInvariant
When Functions group is Date, one of the following:
• Add Hours
• AddDays
• AddMonths
• AddYears
When Functions group is Numeric, one of the following:
• Sum
• Subtract
• Multiply
• Divide
• Average
• Percent
When Functions group is Regex, one of the following:
• Extract
Function that will be used to calculate property value.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function parameters
SeparatorTextDisplayed only when Functions group is Text. Separator to use when function concatenates multiple text values.
Regex expressionTextDisplayed only if Function group is Regex. Regex expression to match.
Match groupTextDisplayed only if Function group is Regex. Function will use the specified matched group (zero based).
StartTextDisplayed only if Function group is Regex. Function will start matching regex in parameter values at specified zero based index.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function parameters > Date
Date type• Property
• Constant
• Today
• Now
Date type to use in function.
DateProperty definitionDisplayed only if Property is selected as Date type. Define date for use in function.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function parameters > Value to add
Value type• Property
• Constant
Value type to add as property.
Value to addInteger/Property definitionDisplay Integer if value type is Constant. Display Property definition if value type is Property.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function > Parameters > Parameters > Parameter [n]
Parameter typeOne of the following:
• Property
• Constant
PropertyProperty definitionDisplayed only when Parameter type is Property.
Property whose value will be used in function.
ConstantConstant valueDisplayed only when Parameter type is Constant.
Constant value that will be used as parameter in function.
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function > Parameters > Parameters > Parameter [n]
Parameter typeOne of the following:
• Property
• Constant
Type of parameter to use in function.
PropertyProperty definitionDisplayed only when Parameter type is Property. Property whose value will be used in function.
ConstantConstant valueDisplayed only when Parameter type is Constant. Constant value that will be used as parameter in function.
Rules > Versioning rule [n] > Actions [n] > Snapshot settings > Source object
Collection reference propertyPropertyProperty on source that will reference snapshot collection.
Rules > Versioning rule [n] > Actions [n] > Snapshot settings > Source object > Remove properties
PropertyNumber of retriesProperties to remove from source.
Advanced Settings
Time to wait (milliseconds)IntegerNumber of milliseconds to wait before executing any rule in background.
Number of retriesIntegerMaximum number of times COM errors are retried.

Use cases

Customer is using M-Files to manage document versions

Customer is using M – Files for creating and managing the documents. All documents goes through Document Approval Workflow (Picture 1). On creation of the document, document enter the state Draft and with Extended Versioning customer can add new version (eg. 1.0) to them. They wanted the possibility of creating a new editable version of documents when a contract is expired.

Picture 1. Document Workflow

With Extended Versioning, customer solved their case by automatically adding a new version numbers to the document.

Configuration of Extended Versioning

When Customer creates new Document, version 1.0 will be added to the document.

When documents enter the state Expired, customer may want to have possibility of creating new version.

When document entered state Create New Version, new version number (eg. 2.0, 3.0) will be
added to document.

Table of Contents
FREE WEBINAR

Unlock the full potential of M-Files

No coding, faster configuration and better quality for your clients. See Extension Kit in action!