cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger validation before saving an entity on composer?

aluna
1-Newbie

Trigger validation before saving an entity on composer?

Is there a way to create a trigger or some kind of validation at clicking save button or importing entities from file?

5 REPLIES 5

Every time you import/Save an entity it's restarted, hence you can bind your validation code at ThingStart.

In that case you will have to add that code to every entity you want to import/save, but what I am trying to accomplish is like a centrilized trigger or validator that can be run everytime you save or import things, is this possible?

Hello Armando, what is your outcome of using the "ThingStart" event ? Is Carles answer the correct one ?

I guess no,In that case you will have to add that code to every entity you want to import/save, but what I am trying to accomplish is like a centrilized trigger or validator that can be run everytime you save or import things, is this possible?

Hi Armando,

You can build a ThingShape which subscribes to ThingStart Event and add this ThingShape to all the Things that you want to supervise. The problem with this it's that one you do this you can't have any other subscription to ThingStart event as TW from 6.5 doesn't allows multiple subscriptions to the same event from the same thing.

Carles.

Announcements