What is EDM Trigger Schema?
The trigger schema adds event generation and catching capabilities for an existing EXPRESS Schema
- new reserved words:
- TRIGGER_SCHEMA
- TRIGGER_FUNCTION
- avoid introducing reserved words EVENT and TRIGGER as they will most likely collide with attribute names some time.
- Apart from specific extensions grammar in TRIGGER_SCHEMA is close to QUERY_SCHEMA apart from QUERY_FUNCTION
- Or, we might just add TRIGGER capabilities to QUERY_SCHEMA?
- The acronym is "TEX" from Trigger EXtension, and is also the file extension used for such files.
Current state of the EDM Trigger Schema
- Specification version 0.1 made, see TEX Specification
Subscribing to events from a client
The intention is that client applications can retrieve events from the EDM server. Proposal for a general approach:
- Events, here-under "trigger events" are generated
- from XPX code using xpxRaiseEvent(...)
- or from EDMI code (plugins,...) using edmiRaiseEvent(..). Note that no remote version of function is available, as events are always generated on server (TODO: is this correct?)
- A client can subscribe to events. Events can be pushed (sent) or pulled (polling a queue). In either case a subscription must be active.
- To initiate subscription use function edmiRemoteSubscribeToEvents(...)
- To read events from queue use edmiRemoteGetEvents(...)
- To enable event push use edmiRemoteSetEventHandler(...)
- Or variations of the above
Event handlers from client can for example be:
- A web "server" receiving HTTP(s) requests - typically REST calls
- An application like MSM providing a callback RPC function (hmm...)
Q&A:
What is aim to introduce the stuff?
Very short answer: users need to hook event handlers when certain things happen in the EDM.
Comments wanted!
Since we are about to enable TEX in the EDM it is importrant that any missing or non optimal functionality are noted and corrected. Comments can be posted here or sent to Arne T.