Static entity with last modified date

Hello everyone, i would like to ask how can we use static entity by also having audit column such as last modified date?

The purpose is so that we can use this entity or table for checking delta change via ETL. And these delta changes are going to be used by other system

Thanks in advance.

Hi Albert,

Why do you think you need a static entity? If you have LastModified timestamp on the entity?

If you need to track deletions I suggest to include an IsActive attribute to indicate if a record is 'soft' deleted.

Regards,

Daniel

Hello Albert, 

Trying to best understand your requirement. 

Are you meaning you want to include a last update attribute in the static entity itself, for autit purposes? 

If so, this is not feasible, I think. Static Entities records are defined inside the development environment by the developer. He would have access to this attribute and could put there anything. 

A possibility would be to add a table directly into the database, to log changes in this static entity automatically (as it is also a table in database), through triggers. But everything would have to be done directly into the database. 

And probably this would be defeated if the developer just replaces the static entity. 

If this is not what you want, could you give an example to make it easier to understand your requirement? 

Cheers. 

Daniël Kuhlmann wrote:

Hi Daniel, 

At the moment, we dont have last modified timestamp on the static entities. That is perfectly fine within the application within outsystems. But recently we found out that other application needs to detect only delta changes such as modification of the code's description. And normally we use last modified as the identifier.

Therefore, i am exploring on what could be done at the application, that is using outsystems, to have this last modified identifier.


Hi Albert,

Why do you think you need a static entity? If you have LastModified timestamp on the entity?

If you need to track deletions I suggest to include an IsActive attribute to indicate if a record is 'soft' deleted.

Regards,

Daniel



Eduardo Jauch wrote:

Hello Eduardo,

Thanks for your advise.

May i ask what will happen to the database trigger if there is new addition / modification of the static entity? Should i recreate that because the static entity will physically have different name in the database?


Hello Albert, 

Trying to best understand your requirement. 

Are you meaning you want to include a last update attribute in the static entity itself, for autit purposes? 

If so, this is not feasible, I think. Static Entities records are defined inside the development environment by the developer. He would have access to this attribute and could put there anything. 

A possibility would be to add a table directly into the database, to log changes in this static entity automatically (as it is also a table in database), through triggers. But everything would have to be done directly into the database. 

And probably this would be defeated if the developer just replaces the static entity. 

If this is not what you want, could you give an example to make it easier to understand your requirement? 

Cheers. 



Hi,

What do yo mean with

But recently we found out that other application needs to detect only delta changes such as modification of the code's description. And normally we use last modified as the identifier.

What does this have to do with an OutSystems static entity? Why do you nedd the delta changes of a static entity, what do you actuall mean with that?

 A static entity is defined at design time. You cannot update it at runtime, so I fail to see why you would need an LastModified attribute on it.

The meta data of the static entity definition itself does have a Last modified by and timestamp.

Regards,

Daniel

Hi Albert

Sorry, I missed your question.

If the developer just creates a new entity to replace the old one, the trigger would not work anymore.

A possibility that came to my mind later was to create an application using BPT, and start the process when a new record is inserted in the appropriated system metadata entity, like the Entity entity, but it seems you are not able to expose Process Events on them, and so it is not possible to use them with BPT.

Again, you would be required to go directly to the database and create manually triggers to execute stored procedures to log any type of activity like the creation of new entities or changes in their attributes. 

Cheers.

Are there any Outsystems system tables with information on the creation or update of static entities?


Eduardo Jauch wrote:

Hi Albert

Sorry, I missed your question.

If the developer just creates a new entity to replace the old one, the trigger would not work anymore.

A possibility that came to my mind later was to create an application using BPT, and start the process when a new record is inserted in the appropriated system metadata entity, like the Entity entity, but it seems you are not able to expose Process Events on them, and so it is not possible to use them with BPT.

Again, you would be required to go directly to the database and create manually triggers to execute stored procedures to log any type of activity like the creation of new entities or changes in their attributes. 

Cheers.



Hi, yes. 

You have the 'Entity' entity and related entities that kkep information about entities and attributes. So, you can access this information, including on which modules they are, etc. 

You can't use them in BPT, unfortunately, to trigger events in case there are changes, so if you need this you would have to do it directly into the database with triggers and SPs, to be warned about changes. 

But you can create an application to inspect this information. 

And you can take a look into Forge to see applications that provide this information for you, like Discovery and OutDoc. 

Cheers