Runtime
draftStatus of this Document
This report was published by the User Journal Graph Community Group . It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups .
Conformance
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MAY, MUST, MUST NOT, OPTIONAL, RECOMMENDED, REQUIRED, SHALL, SHALL NOT, SHOULD, and SHOULD NOT in this document are to be interpreted as described in [RFC2119] and [RFC8174] when, and only when, they appear in all capitals, as shown here.
1. Overview
This module defines the data model for recording actual user behavior as a causally ordered event chain. Ordering is established by explicit linkage between events, not by timestamps.
2. Terminology
JourneyExecution: A bounded container for events belonging to one logical trace.
RuntimeEvent: An atomic record of a single runtime moment.
Event Chain: A sequence where each event references its immediate predecessor via
previousId.
3. Event Chaining
3.1. Visual Model
graph LR
subgraph Execution [JourneyExecution]
direction LR
E1[Event A, id: e1<br/>previousId: null]
E2[Event B, id: e2<br/>previousId: e1]
E3[Event C, id: e3<br/>previousId: e2]
E1 -->|previousId| E2
E2 -->|previousId| E3
end 3.2. The JourneyExecution Object (The Container)
A JourneyExecution MUST include:
type:"JourneyExecution"id: required, MUST be a valid URI/URN, unique within resolution scope.eventRefs: array of RuntimeEvent IDs
3.3. The RuntimeEvent Object (The Atom)
A RuntimeEvent MUST include:
type:"RuntimeEvent"id: required, MUST be a valid URI/URN, unique within resolution scope.executionId: ID of the owning JourneyExecutionpreviousId: string or nullnullindicates the Root Eventotherwise MUST equal the
idof another event in the same JourneyExecution
stateRef: string (Graph State or CompositeStateid)
A RuntimeEvent MAY include:
payload: object (domain-specific data)
4. Chain Validity Rules
Within a single execution (events where executionId equals the JourneyExecution id):
Root: Exactly one event MUST be the Root Event.
Resolution: Every non-root previousId MUST match the id of an event in the same execution.
Single Successor: An event id MUST NOT be referenced as previousId by more than one event in the same execution.
Acyclic: The chain MUST NOT contain cycles.
If any rule above is violated, the JourneyExecution is invalid.
5. Reconstruction
A Consumer reconstructing event order MUST:
Identify the Root Event.
Repeatedly select the unique event whose
previousIdequals the current event’sid.Continue until no successor exists.
Appendix: Combined JSON Example
{
"@context": "https://ujg.specs.openuji.org/ed/context.jsonld",
"type": "UJGDocument",
"specVersion": "1.0",
"items": [
{
"type": "JourneyExecution",
"id": "urn:ujg:execution:12345",
"eventRefs": [
"urn:ujg:event:12345:100",
"urn:ujg:event:12345:200"
]
},
{
"type": "RuntimeEvent",
"id": "urn:ujg:event:12345:100",
"executionId": "urn:ujg:execution:12345",
"previousId": null,
"stateRef": "urn:ujg:state:product-page",
"payload": { "action": "view" }
},
{
"type": "RuntimeEvent",
"id": "urn:ujg:event:12345:200",
"executionId": "urn:ujg:execution:12345",
"previousId": "urn:ujg:event:12345:100",
"stateRef": "urn:ujg:state:cart",
"payload": { "item": "shoes" }
}
]
} {
"@context": "https://ujg.specs.openuji.org/ed/context.jsonld",
"type": "UJGDocument",
"specVersion": "1.0",
"items": [
{
"type": "JourneyExecution",
"id": "urn:ujg:execution:12345",
"eventRefs": [
"urn:ujg:event:12345:100",
"urn:ujg:event:12345:200"
]
},
{
"type": "RuntimeEvent",
"id": "urn:ujg:event:12345:100",
"executionId": "urn:ujg:execution:12345",
"previousId": null,
"stateRef": "urn:ujg:state:product-page",
"payload": { "action": "view" }
},
{
"type": "RuntimeEvent",
"id": "urn:ujg:event:12345:200",
"executionId": "urn:ujg:execution:12345",
"previousId": "urn:ujg:event:12345:100",
"stateRef": "urn:ujg:state:cart",
"payload": { "item": "shoes" }
}
]
} References
Normative References
- [RFC2119]
- Key words for use in RFCs to Indicate Requirement Levels. S. Bradner, March 1997, Best Current Practice. IETF. https://datatracker.ietf.org/doc/html/rfc2119
- [RFC8174]
- Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba, May 2017, Best Current Practice. IETF. https://datatracker.ietf.org/doc/html/rfc8174