TEX Predefined Events
EDM Trigger Schema specification version 0.2 2017-11-30
Predefined events
Predefined events is events genarated by the EDM system if certain conditions apply.
Addressing such events from XPX is done via XPX pseudo-constants. An XPX pseudo-constant is for example model open modes like "XPXRW".
--------------------------------------------------------------------------- -- the system recognized events is proposed to define as INTEGER XPX pseudo constants -- then we can expand range of trigger events without enhancing grammar -- declaration can be assumed as something like: --------------------------------------------------------------------------- trigger_source = ENUMERATION OF( XPX_Create_Instance, -- raised after entity is created XPX_Delete_Instance, -- raised before an entity is deleted XPX_Read_Instance, -- any attribute is accessed XPX_Write_Instance, -- any attribute is modified XPX_Pre_Set_Attribute, -- raised before specified attribute is assigned (do we need PRE/POST?) XPX_Post_Set_Attribute, -- raised after specified attribute is assigned (do we need PRE/POST?) XPX_Pre_Unset_Attribute, -- raised before an attribute is set to UNSET XPX_Post_Unset_Attribute, -- raised after an attribute is set to UNSET XPX_Read_Attribute, -- any attribute is accessed XPX_Create_Model, -- raised after model is created XPX_Delete_Model, -- raised before model is deleted XPX_Read_Model, -- raised if any data in model accessed (pre) XPX_Write_Model, -- raised if any data in model written (pre) XPX_Commit_Write_Transaction, -- raised just before write transaction committed (what about tx levels?) XPX_Abort_Write_Transaction, -- raised just before write transaction aborted(what about tx levels?) );
Comments from Former user (Deleted):
(3) what is XPX_Read_Instance?
Only read any attribute in getAttr functions? What's about getAttrs? getAggr where the instance is element? To avoid ambiguity I think it should be defined a set of edmi functions that raised this and other events.
(4) XPX_Pre_Set_Attribute, XPX_Post_Set_Attribute, XPX_Pre_Unset_Attribute and XPX_Post_Unset_Attribute
xpx_change_attribute would be enough for me
It should be subtypes of XPXEVENT to specify different types of attribute changes (with old and new values, ref. to instance, for aggregates initialize/insert/add/delete element and its index,..)
(5) For tracking would be nice to have events like this:
xpx_event_user_logged_in, xpx_event_user_logged_out