🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators objectTimeStamp
This page was created by Hans.karlsen on 2022-02-20. Last edited by Wikiadmin on 2026-07-29.

Use objectTimeStamp in a OCL expression when you work with Versioning and need the timestamp associated with the object currently being evaluated.

Purpose

When Versioning is in use, operators such as atTime expect a timestamp value. objectTimeStamp gives you the timestamp of the current object so that you can supply that value to a version-aware expression.

The current object is the object in the OCL evaluation context. For example, when an expression is evaluated for an individual object, objectTimeStamp refers to that individual object's timestamp.

When to use it

Use objectTimeStamp when all of the following apply:

  • Your model uses Versioning.
  • You are writing an OCL expression for an object.
  • A version-aware operator, such as atTime, requires a timestamp.

Example

If you need to evaluate a version-aware expression for the current object at that object's own timestamp, use objectTimeStamp as the timestamp input expected by the version-aware operator.

In this situation, the timestamp comes from the object being evaluated; you do not need to provide a separate timestamp value.

Related OCL operators

For an overview of available operators, open the OCL editor and begin with a class, as described in OCL General Operators. Use OCL Boolean Operators when your expression also needs to evaluate logical conditions.

See also