Warning:
This wiki has been archived and is now read-only.
OMM Event Logging Draft
Contents
Proposal: OMM Event Logging
(Author: DFKI)
Event and access logging proposal for OMM. Event description is based on the ideas of Common Event Expression (CEE). The CEEspecification contains of a log syntax (CLS) that describes how an event and its data are represented. The collection of possible event fields and value types of event records are described via a CEE Dictionary and the CEE Taxonomy defines a collection of tags that can be used to categorise events. In OMM we adopt this approach. You can find a generic OMM XML-based log syntax example below. In addition we provide several examples, each with the log template and the example instance.
<log> <event id="[ID]"> <action></action> <!-- event type --> <subject></subject> <!-- optional/event action dependent: event subject --> <object></object> <!-- optional/event action dependent: event object --> <status></status> <!-- optional/event action dependent: event status --> <time></time> <!-- event time (event beginning if endTime is given) --> <endTime></endTime> <!-- optional: event ending --> <logger></logger> <!-- event observer --> (...) <!-- action dependent additional tags --> <!-- predefined for each action --> <!-- QUESTION: allow additional proprietary tags? --> </event> </log>
Tag Specification
<action>
Indicates the event type. The content of <action> determines the following structure of the event syntax. This tag should be always the first child of <event>.
<subject> / <object>
Indicate addtitional arguments to <action>. Read <subject> <action> <object> (e.g. "package123"(subject) was "stored_in"(action) "truck456"(object). Supports two attributes: "class" and "type".
"class" indicates the concept of this subject or object. Possible values are:
- "id": the subject/object is refrenced by an ID (the ID type is given by the attribute "type" and the value is the tag's inner text)
- "omm": the subject/object is another OM (the OM refernce type is given by the attribute "type" and the value is the tag's inner text)
- "this": the subject/object is this OM itself
<status>
Indicates the result of an action (e.g. action "quality_check": <status>OK</status>).
Indicates the timestamp this event occurs. If an timespan is known <time> is the beginning and <endTime> is the end of this event.
<logger>
Indicates the entity that monitored this event. Details are given by "class" and "type" attribute und inner text (see <subject>/<object>).
Logistics scenario: product loaded to truck: 'stored_in' event
<!-- TEMPLATE --> <event> <action>stored_in</action> <subject /> <object /> <time /> <endTime /> <logger /> <!-- action dependent additional tags --> </event> <!-- EXAMPLE --> <log> <event id="123"> <action>stored_in</action> <!-- event 'status' not applicable (event does not need status) --> <subject class="this" /> <!-- subject is product itself; can be omitted; no subject tag == subject with class 'this' --> <object class="omm" type="uri">http://we.have.to/determine/an/unique/omm/id/method/truck123</object> <!-- object can be id or other product memory --> <time>2011-01-30T18:30:00+02:00</time> <endTime>2011-01-30T18:40:00+02:00</endTime> <logger class="id" type="uri">http://company.com/loadingRamps/0021</logger> <!-- observer indicated by unique id--> <!-- action dependent additional tags --> </event> </log>
Production scenario: 'quality_check' event
<!-- TEMPLATE --> <event> <action>quality_check</action> <subject /> <object /> <status /> <time /> <endTime /> <logger /> </event> <!-- EXAMPLE --> <log> <event id="456"> <action>quality_check</action> <subject class="omm" type="uri">http://we.have.to/determine/an/unique/omm/id/method/qualityChecker1</object> <object class="this" /> <!-- object is product itself; can be omitted; no object tag == object with class 'this' --> <status>OK</status> <time>2011-01-30T19:00:00+02:00</time> <endTime>2011-01-30T19:01:00+02:00</endTime> <logger class="this" /> <!-- product detected event itself --> <!-- action dependent additional tags --> </event> </log>
Object memory access logging template
Access logging is based on the same concept as event logging. The sample template "omm_write_access" contains additional information such as "affectedBlock" (indicates the id of the affected block) and "blockSizeBeforeWrite" (indicates the size of the affected block before write operation) xor "blockContentBeforeWrite" (indicates the content of the affected block before the write operation = last version before write).
<!-- TEMPLATE --> <event> <action>omm_write_access</action> <subject /> <object /> <status /> <time /> <endTime /> <logger /> <affectedBlock /> <blockSizeBeforeWrite /> <!-- or --> <blockContentBeforeWrite /> </event> <!-- EXAMPLE --> <log> <event id="789"> <action>omm_write_access</action> <subject class="id" type="duns">19-550-5177</object> <object class="this" /> <status>OK</status> <time>2011-01-30T20:00:00+02:00</time> <endTime>2011-01-30T20:00:05+02:00</endTime> <logger class="this" /> <affectedBlock>_BLOCK_123_</affectedBlock> <blockSizeBeforeWrite>236</blockSizeBeforeWrite> <!-- or --> <blockContentBeforeWrite>(...)</blockContentBeforeWrite> </event> </log>