How to determine changes made to Gen CSE models for a set period of time
search cancel

How to determine changes made to Gen CSE models for a set period of time

book

Article ID: 417591

calendar_today

Updated On:

Products

Gen Gen - Host Encyclopedia Gen - Run Time Distributed Gen - Workstation Toolset

Issue/Introduction

Have a need to run a query on a model in the Gen Client Server Encyclopedia (CSE) for objects changed because of the need to back out those changes.
Would like to find every object that has changed between a specific timeframe in the past.
The goal is to then perform an impact analysis of everything that changed before reverting the CSE to a previous back up date.
Is there a suggested method of getting this, or if a standard query exists that can be run.

Environment

Gen 8.6 Client Server Encyclopedia (CSE)

Resolution

It's important to clarify that the Client Server Encyclopedia (CSE) does not currently offer a dedicated "When Changed Report" functionality similar to what is found in the Host Encyclopedia (HE) for aggregate objects. The way CSE tracks changes is different, focusing on the last known activity on individual objects rather than a comprehensive history of all changes within a period.

While the CSE does not maintain a detailed log of all intermediate changes an object might undergo within a given timeframe (e.g., If an object is updated multiple times between two dates, only the most recent update timestamp will be visible), It can be determined to identify all objects that have been modified or newly created since a specific point in time.

To help understand how to query for such changes, here's how the CSE handles object timestamps:

CSE Object Timestamping Logic

On Object Creation:

The OBJ_DATE and OBJ_TIME fields capture the object's original creation date and time. These fields remain static.
The OBJ_PROP_DATE and OBJ_PROP_TIME fields are also initially set to this same creation timestamp.
On Object Update (Modification):

The OBJ_DATE and OBJ_TIME (creation timestamp) remain unchanged.
Only the OBJ_PROP_DATE and OBJ_PROP_TIME fields are updated to reflect the date and time of the latest modification.

This means:

OBJ_DATE / OBJ_TIME represent the original creation timestamp.
OBJ_PROP_DATE / OBJ_PROP_TIME always reflect the last activity timestamp (either creation or the most recent modification).

Identifying New or Updated Objects

To determine if an object has been truly updated (i.e., modified after its initial creation),  compare its OBJ_PROP_DATE and OBJ_PROP_TIME against its OBJ_DATE and OBJ_TIME. If there's a difference, the object has been updated. If they are identical, it means the object has not been modified since its creation (or was modified so quickly it fell within the same timestamp resolution).

Using this logic, queries can be constructed to identify objects that were either created or updated after a specific date.

Example Oracle SQL Query to Find Objects Modified/Created within a Date Range,

The following query identifies objects whose last activity (OBJ_PROP_DATE/OBJ_PROP_TIME) falls within a specified period (e.g., May 15th to June 15th, 2025). This will show objects that were either new or updated within this window.

SELECT
    OBJ_MODEL_ID,
    OBJ_ID,
    OBJ_TYPE_CODE,
    OBJ_NAME,
    OBJ_DATE,
    OBJ_TIME,
    OBJ_USER,
    OBJ_PROP_DATE,
    OBJ_PROP_TIME
FROM
    DOBJ -- Please adjust schema if necessary, e.g., YOUR_SCHEMA.DOBJ 
WHERE
    -- Condition to identify if the object has been truly updated since creation,
    -- meaning its last modification timestamp is different from its creation timestamp.
    -- If you want ALL objects (newly created AND updated), remove this line:
    --(OBJ_PROP_DATE != OBJ_DATE OR OBJ_PROP_TIME != OBJ_TIME)  


    (OBJ_PROP_DATE != OBJ_DATE)

    -- And the last modification date falls within the desired range.
    -- This will include all objects modified within the specified period (inclusive).
AND OBJ_PROP_DATE BETWEEN TO_DATE('2025-05-15', 'YYYY-MM-DD') AND TO_DATE('2025-06-15 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
ORDER BY OBJ_ID;

It is crucial to reiterate that this method will only show the latest modification timestamp for an object within the specified period. If an object was modified multiple times within the date range you are querying, only the most recent OBJ_PROP_DATE/OBJ_PROP_TIME will be captured by this query. This means history won't be seen of all intermediate changes that might have occurred to that object within the reporting window.