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 .
1. Overview
This module defines the data model for recording actual user behavior as a causally ordered event chain within a bounded execution. Ordering is established by explicit linkage between events, not by timestamps. Runtime events also carry an explicit journey instance reference so the local state where an event occurred can be interpreted in nested journey contexts.
Runtime records observed execution facts. A Client does not need to receive or understand the whole UJG graph document in order to emit runtime events. Each event records enough local scope to make the observed state occurrence unambiguous, and Mapping can later resolve those facts against Graph intent.
2. Normative Artifacts
This module is published through the following artifacts:
runtime.ttl: ontology, published athttps://ujg.specs.openuji.org/tr/2026.06/ns/runtimeruntime.context.jsonld: JSON-LD term mappings, published athttps://ujg.specs.openuji.org/tr/2026.06/ns/runtime.context.jsonldruntime.shape.ttl: SHACL validation rules, published athttps://ujg.specs.openuji.org/tr/2026.06/ns/runtime.shape
Examples in this page use an explicit context array composed from the published module contexts. The same composition is also published as the convenience context https://ujg.specs.openuji.org/tr/2026.06/ns/context.jsonld.
3. Terminology
JourneyExecution: A bounded execution identifier for one logical trace.
RuntimeEvent: An atomic record of a single observed runtime moment.
JourneyInstance: A concrete runtime occurrence of a graph Journey.
Event Chain: A sequence where each event references its immediate predecessor via
previousId.Root Event: The event in a JourneyExecution whose
previousIdis omitted.
4. Runtime Model
4.1. Visual Model
graph TB
subgraph JourneyExecution [Execution]
direction LR
E1[RuntimeEvent A<br/>id e1]
E2[RuntimeEvent B<br/>e2 after e1]
E3[RuntimeEvent C<br/>e3 after e2]
E2 -->|previousId| E1
E3 -->|previousId| E2
end
E1 -->|journeyInstanceRef| J1[JourneyInstance<br/>checkout]
E2 -->|journeyInstanceRef| J2[JourneyInstance<br/>payment]
E3 -->|journeyInstanceRef| J2
J2 -->|parentInstanceRef| J1 A JourneyExecution identifies one logical trace. It is not required to enumerate its RuntimeEvents. Runtime events are associated with an execution by executionId, which supports append-only event streams.
A RuntimeEvent records one runtime moment and may reference its immediate predecessor via previousId; if previousId is omitted, the event is the Root Event.
A RuntimeEvent references exactly one JourneyInstance using journeyInstanceRef. The referenced JourneyInstance supplies the local graph Journey scope needed to interpret the event's stateRef, especially when the event occurred inside a subjourney reached through a CompositeState.
The core runtime-local address is the pair RuntimeEvent.stateRef plus RuntimeEvent.journeyInstanceRef. This pair identifies the concrete runtime-local occurrence of the referenced State or CompositeState.
5. Runtime Event
A RuntimeEvent MUST reference exactly one JourneyExecution using
executionId.A RuntimeEvent MUST reference exactly one graph State or CompositeState using
stateRef.A RuntimeEvent MUST reference exactly one JourneyInstance using
journeyInstanceRef.The pair
stateRefandjourneyInstanceRefMUST be sufficient to identify the runtime-local state occurrence.A RuntimeEvent MAY reference its immediate predecessor using
previousId.If
previousIdis omitted, the event is a Root Event in the execution chain.Runtime event order MUST be reconstructed using
previousIdlinks, not timestamps.The
payloadproperty, when present, is opaque runtime data and MUST NOT be required for resolving state or journey scope.
6. Journey Instance
A JourneyInstance is a concrete runtime occurrence of a graph Journey. It is a scope node: it describes journey instantiation and nesting, not membership in an event stream.
A JourneyInstance MUST reference exactly one graph Journey using
journeyRef.A JourneyInstance MAY reference a parent JourneyInstance using
parentInstanceRef.If a JourneyInstance represents a subjourney entered through a CompositeState, it SHOULD provide
viaStateRef.A JourneyInstance MUST NOT be required to reference a JourneyExecution.
The root JourneyInstance is the topmost ancestor reached by following
parentInstanceRefuntil no parent exists.The local graph Journey scope for a RuntimeEvent is the
journeyRefof the event'sjourneyInstanceRef.The derived journey instance stack for a RuntimeEvent is the ordered ancestor chain from the root JourneyInstance to the event's local JourneyInstance.
The core Runtime model intentionally does not put executionId, subjectRef, depth, or frameRefs on JourneyInstance. executionId belongs to RuntimeEvent because events form the append-only observed runtime chain. Domain subjects, cases, records, users, and data bindings are application data or module-specific data. Depth and stack order are derivable by walking parentInstanceRef.
7. Derived Journey Instance Stack
This section is non-normative.
A Consumer can derive a journey instance stack by following RuntimeEvent.journeyInstanceRef to its JourneyInstance, then following parentInstanceRef recursively until a root JourneyInstance is reached.
The derived stack order is root instance to local instance. The final derived stack entry is always the RuntimeEvent's journeyInstanceRef.
Implementations can materialize this derived stack for indexing, caching, frontend rendering, or Mapping performance, but the materialized stack is not the normative runtime address.
8. Ontology
The normative Runtime ontology is defined below and is published at https://ujg.specs.openuji.org/tr/2026.06/ns/runtime. It is the authoritative structural definition for JourneyExecution, RuntimeEvent, JourneyInstance, and the properties that connect them.
@prefix ujg: <https://ujg.specs.openuji.org/tr/2026.06/ns/core#> .
@prefix ujggraph: <https://ujg.specs.openuji.org/tr/2026.06/ns/graph#> .
@prefix ujgruntime: <https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dct: <http://purl.org/dc/terms/> .
<https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#> a owl:Ontology ;
rdfs:label "UJG Runtime Editor's Draft Vocabulary"@en ;
dct:description "UJG Runtime ontology declaration" .
### Classes
ujgruntime:JourneyExecution a owl:Class ;
rdfs:subClassOf ujg:Node .
ujgruntime:RuntimeEvent a owl:Class ;
rdfs:subClassOf ujg:Node .
ujgruntime:JourneyInstance a owl:Class ;
rdfs:subClassOf ujg:Node .
### Properties
ujgruntime:executionId a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujgruntime:JourneyExecution .
ujgruntime:previousId a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujgruntime:RuntimeEvent .
ujgruntime:stateRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujggraph:State .
ujgruntime:journeyInstanceRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujgruntime:JourneyInstance .
ujgruntime:journeyRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:JourneyInstance ;
rdfs:range ujggraph:Journey .
ujgruntime:parentInstanceRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:JourneyInstance ;
rdfs:range ujgruntime:JourneyInstance .
ujgruntime:viaStateRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:JourneyInstance ;
rdfs:range ujggraph:CompositeState .
ujgruntime:payload a owl:DatatypeProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range rdf:JSON . @prefix ujg: <https://ujg.specs.openuji.org/tr/2026.06/ns/core#> .
@prefix ujggraph: <https://ujg.specs.openuji.org/tr/2026.06/ns/graph#> .
@prefix ujgruntime: <https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dct: <http://purl.org/dc/terms/> .
<https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#> a owl:Ontology ;
rdfs:label "UJG Runtime Editor's Draft Vocabulary"@en ;
dct:description "UJG Runtime ontology declaration" .
### Classes
ujgruntime:JourneyExecution a owl:Class ;
rdfs:subClassOf ujg:Node .
ujgruntime:RuntimeEvent a owl:Class ;
rdfs:subClassOf ujg:Node .
ujgruntime:JourneyInstance a owl:Class ;
rdfs:subClassOf ujg:Node .
### Properties
ujgruntime:executionId a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujgruntime:JourneyExecution .
ujgruntime:previousId a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujgruntime:RuntimeEvent .
ujgruntime:stateRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujggraph:State .
ujgruntime:journeyInstanceRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range ujgruntime:JourneyInstance .
ujgruntime:journeyRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:JourneyInstance ;
rdfs:range ujggraph:Journey .
ujgruntime:parentInstanceRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:JourneyInstance ;
rdfs:range ujgruntime:JourneyInstance .
ujgruntime:viaStateRef a owl:ObjectProperty ;
rdfs:domain ujgruntime:JourneyInstance ;
rdfs:range ujggraph:CompositeState .
ujgruntime:payload a owl:DatatypeProperty ;
rdfs:domain ujgruntime:RuntimeEvent ;
rdfs:range rdf:JSON . 9. JSON-LD Context
The normative Runtime JSON-LD context is defined below and is published at https://ujg.specs.openuji.org/tr/2026.06/ns/runtime.context.jsonld. It provides the compact JSON-LD term mappings for Runtime examples, including IRI-valued references and opaque JSON payload values.
{
"@context": {
"@version": 1.1,
"ujgruntime": "https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#",
"JourneyExecution": "ujgruntime:JourneyExecution",
"RuntimeEvent": "ujgruntime:RuntimeEvent",
"JourneyInstance": "ujgruntime:JourneyInstance",
"executionId": {
"@id": "ujgruntime:executionId",
"@type": "@id"
},
"previousId": {
"@id": "ujgruntime:previousId",
"@type": "@id"
},
"stateRef": {
"@id": "ujgruntime:stateRef",
"@type": "@id"
},
"journeyInstanceRef": {
"@id": "ujgruntime:journeyInstanceRef",
"@type": "@id"
},
"journeyRef": {
"@id": "ujgruntime:journeyRef",
"@type": "@id"
},
"parentInstanceRef": {
"@id": "ujgruntime:parentInstanceRef",
"@type": "@id"
},
"viaStateRef": {
"@id": "ujgruntime:viaStateRef",
"@type": "@id"
},
"payload": {
"@id": "ujgruntime:payload",
"@type": "@json"
}
}
} {
"@context": {
"@version": 1.1,
"ujgruntime": "https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#",
"JourneyExecution": "ujgruntime:JourneyExecution",
"RuntimeEvent": "ujgruntime:RuntimeEvent",
"JourneyInstance": "ujgruntime:JourneyInstance",
"executionId": {
"@id": "ujgruntime:executionId",
"@type": "@id"
},
"previousId": {
"@id": "ujgruntime:previousId",
"@type": "@id"
},
"stateRef": {
"@id": "ujgruntime:stateRef",
"@type": "@id"
},
"journeyInstanceRef": {
"@id": "ujgruntime:journeyInstanceRef",
"@type": "@id"
},
"journeyRef": {
"@id": "ujgruntime:journeyRef",
"@type": "@id"
},
"parentInstanceRef": {
"@id": "ujgruntime:parentInstanceRef",
"@type": "@id"
},
"viaStateRef": {
"@id": "ujgruntime:viaStateRef",
"@type": "@id"
},
"payload": {
"@id": "ujgruntime:payload",
"@type": "@json"
}
}
} 10. Validation
The normative Runtime SHACL shape is defined below and is published at https://ujg.specs.openuji.org/tr/2026.06/ns/runtime.shape. It is the authoritative validation artifact for Runtime structural constraints.
@prefix ujggraph: <https://ujg.specs.openuji.org/tr/2026.06/ns/graph#> .
@prefix ujgruntime: <https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ujgruntimeshape: <https://ujg.specs.openuji.org/tr/2026.06/ns/runtime.shape#> .
ujgruntimeshape:StateLikeShape a sh:NodeShape ;
sh:nodeKind sh:IRI ;
sh:or (
[ sh:class ujggraph:State ]
[ sh:class ujggraph:CompositeState ]
) .
ujgruntimeshape:JourneyExecutionShape a sh:NodeShape ;
sh:targetClass ujgruntime:JourneyExecution ;
sh:nodeKind sh:IRI .
ujgruntimeshape:RuntimeEventShape a sh:NodeShape ;
sh:targetClass ujgruntime:RuntimeEvent ;
sh:nodeKind sh:IRI ;
sh:property [
sh:path ujgruntime:executionId ;
sh:class ujgruntime:JourneyExecution ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:previousId ;
sh:class ujgruntime:RuntimeEvent ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:stateRef ;
sh:node ujgruntimeshape:StateLikeShape ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:journeyInstanceRef ;
sh:class ujgruntime:JourneyInstance ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:payload ;
sh:datatype rdf:JSON ;
sh:maxCount 1 ;
] .
ujgruntimeshape:JourneyInstanceShape a sh:NodeShape ;
sh:targetClass ujgruntime:JourneyInstance ;
sh:nodeKind sh:IRI ;
sh:property [
sh:path ujgruntime:journeyRef ;
sh:class ujggraph:Journey ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:parentInstanceRef ;
sh:class ujgruntime:JourneyInstance ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:viaStateRef ;
sh:class ujggraph:CompositeState ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:executionId ;
sh:maxCount 0 ;
] . @prefix ujggraph: <https://ujg.specs.openuji.org/tr/2026.06/ns/graph#> .
@prefix ujgruntime: <https://ujg.specs.openuji.org/tr/2026.06/ns/runtime#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ujgruntimeshape: <https://ujg.specs.openuji.org/tr/2026.06/ns/runtime.shape#> .
ujgruntimeshape:StateLikeShape a sh:NodeShape ;
sh:nodeKind sh:IRI ;
sh:or (
[ sh:class ujggraph:State ]
[ sh:class ujggraph:CompositeState ]
) .
ujgruntimeshape:JourneyExecutionShape a sh:NodeShape ;
sh:targetClass ujgruntime:JourneyExecution ;
sh:nodeKind sh:IRI .
ujgruntimeshape:RuntimeEventShape a sh:NodeShape ;
sh:targetClass ujgruntime:RuntimeEvent ;
sh:nodeKind sh:IRI ;
sh:property [
sh:path ujgruntime:executionId ;
sh:class ujgruntime:JourneyExecution ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:previousId ;
sh:class ujgruntime:RuntimeEvent ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:stateRef ;
sh:node ujgruntimeshape:StateLikeShape ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:journeyInstanceRef ;
sh:class ujgruntime:JourneyInstance ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:payload ;
sh:datatype rdf:JSON ;
sh:maxCount 1 ;
] .
ujgruntimeshape:JourneyInstanceShape a sh:NodeShape ;
sh:targetClass ujgruntime:JourneyInstance ;
sh:nodeKind sh:IRI ;
sh:property [
sh:path ujgruntime:journeyRef ;
sh:class ujggraph:Journey ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:parentInstanceRef ;
sh:class ujgruntime:JourneyInstance ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:viaStateRef ;
sh:class ujggraph:CompositeState ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ujgruntime:executionId ;
sh:maxCount 0 ;
] . The rules below define additional causal constraints on event chains beyond the structural constraints captured by the SHACL shape.
Within a single execution (events where executionId equals the JourneyExecution @id):
Root: Exactly one event MUST be the Root Event.
Resolution: Every present
previousIdMUST match the@idof an event in the same execution.Single Successor: An event
@idMUST NOT be referenced aspreviousIdby 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.
11. Reconstruction
A Consumer reconstructing event order MUST:
Identify the Root Event.
Repeatedly select the unique event whose
previousIdequals the current event's@id.Continue until no successor exists.
A Consumer interpreting a runtime event's journey context MUST resolve the event's journeyInstanceRef to a JourneyInstance and use that instance's journeyRef as the local graph Journey scope.
12. Appendix: Combined JSON Example
{
"@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/context.jsonld",
"@id": "https://example.com/ujg/runtime/execution-12345.jsonld",
"@type": "UJGDocument",
"nodes": [
{
"@type": "JourneyExecution",
"@id": "urn:ujg:execution:12345"
},
{
"@type": "JourneyInstance",
"@id": "urn:ujg:journey-instance:checkout:12345",
"journeyRef": "urn:ujg:journey:checkout"
},
{
"@type": "JourneyInstance",
"@id": "urn:ujg:journey-instance:checkout:12345:payment",
"journeyRef": "urn:ujg:journey:payment",
"parentInstanceRef": "urn:ujg:journey-instance:checkout:12345",
"viaStateRef": "urn:ujg:state:checkout-payment"
},
{
"@type": "RuntimeEvent",
"@id": "urn:ujg:event:12345:100",
"executionId": "urn:ujg:execution:12345",
"stateRef": "urn:ujg:state:shipping-form",
"journeyInstanceRef": "urn:ujg:journey-instance:checkout:12345",
"payload": { "action": "surface.enter" }
},
{
"@type": "RuntimeEvent",
"@id": "urn:ujg:event:12345:200",
"executionId": "urn:ujg:execution:12345",
"previousId": "urn:ujg:event:12345:100",
"stateRef": "urn:ujg:state:payment-card",
"journeyInstanceRef": "urn:ujg:journey-instance:checkout:12345:payment",
"payload": { "action": "field.complete", "field": "card-number" }
}
]
} {
"@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/context.jsonld",
"@id": "https://example.com/ujg/runtime/execution-12345.jsonld",
"@type": "UJGDocument",
"nodes": [
{
"@type": "JourneyExecution",
"@id": "urn:ujg:execution:12345"
},
{
"@type": "JourneyInstance",
"@id": "urn:ujg:journey-instance:checkout:12345",
"journeyRef": "urn:ujg:journey:checkout"
},
{
"@type": "JourneyInstance",
"@id": "urn:ujg:journey-instance:checkout:12345:payment",
"journeyRef": "urn:ujg:journey:payment",
"parentInstanceRef": "urn:ujg:journey-instance:checkout:12345",
"viaStateRef": "urn:ujg:state:checkout-payment"
},
{
"@type": "RuntimeEvent",
"@id": "urn:ujg:event:12345:100",
"executionId": "urn:ujg:execution:12345",
"stateRef": "urn:ujg:state:shipping-form",
"journeyInstanceRef": "urn:ujg:journey-instance:checkout:12345",
"payload": { "action": "surface.enter" }
},
{
"@type": "RuntimeEvent",
"@id": "urn:ujg:event:12345:200",
"executionId": "urn:ujg:execution:12345",
"previousId": "urn:ujg:event:12345:100",
"stateRef": "urn:ujg:state:payment-card",
"journeyInstanceRef": "urn:ujg:journey-instance:checkout:12345:payment",
"payload": { "action": "field.complete", "field": "card-number" }
}
]
}