EKGF Ontologies / Lifecycle Ontology

EKGF Editor's Draft

Lifecycle Ontology

EKGF Editor's Draft

1. Lifecycle Ontology§

1.1 Overview§

Lifecycle Ontology

IdentifierValue
Ontology IRI / Namespacehttps://ekgf.org/ontology/lifecycle#
Prefixekg-lifecycle

Everything has a lifecycle: use cases, stories, concepts, personas, outcomes, data products and datasets. This ontology says what a lifecycle is, which lifecycle a thing follows and which state the thing is in. It depends on none of the ontologies that describe those things.

A lifecycle has a name, states and permitted transitions, optionally grouped into phases. Its states and transitions form a directed graph; it does not require a separate RDF named graph. Multiple lifecycles can share an RDF graph, with inLifecycle expressing membership independently of graph placement. State order controls presentation, not which moves are permitted. There can be any number of lifecycles. This ontology defines none: the well-known lifecycles are a dataset (dataset/well-known-lifecycles.ttl), and anyone can define more. The registry uses a separate namespace for each lifecycle to distinguish shared state names such as Draft and Deprecated. This is an IRI naming convention, not a graph-storage requirement; custom lifecycles can use another IRI naming convention.

Which lifecycles a thing follows is decided in this order:

  1. The complete set of lifecycles the thing names itself, with followsLifecycle. 2. Otherwise, the union of lifecycles that apply to its classes (including superclasses), with appliesTo.

A thing has one inState history head per effective lifecycle. Each head is a StateTransition occurrence whose currentState belongs to that lifecycle. priorStateTransition links earlier occurrences; the lifecycle is derived from each state, and optional provenance is recorded on the occurrence.

1.2 Classes§

1.2.1 Lifecycle§

A lifecycle with a name, states and permitted transitions, optionally grouped into phases. Membership is expressed with inLifecycle and does not require a separate RDF named graph.

ekg-lifecycle:Lifecycle
https://ekgf.org/ontology/lifecycle#Lifecycle
RDF predicateValue
rdf:typeowl:Class
rdfs:labelLifecycle
UML class diagram for Lifecycle. Diagram labels: Phase or State or; Transition; «Resource»; rdfs:; Class; «owl:Class»; Lifecycle; rdfs:Resource; follows lifecycle; applies to; in lifecycle; The dotted rdfs:Resource source is a presentation placeholder: no specific domain is declared in the selected inputs. It is not an asserted domain or a claim that no more specific domain can be entailed. applies to rdfs:domain Lifecycle. applies to rdfs:range rdfs:Class. follows lifecycle rdfs:range Lifecycle. in lifecycle rdfs:domain Anonymous OWL expression 1. in lifecycle rdfs:range Lifecycle. Anonymous OWL expression 1 owl:unionOf member Phase. Anonymous OWL expression 1 owl:unionOf member State. Anonymous OWL expression 1 owl:unionOf member Transition.Phase or State orTransition«Resource»rdfs:Class«owl:Class»Lifecyclerdfs:Resourcefollows lifecycleapplies toin lifecycle
Class neighborhood: Lifecycle [1]

1.2.2 Phase§

A high-level part of a lifecycle that groups states.

ekg-lifecycle:Phase
https://ekgf.org/ontology/lifecycle#Phase
RDF predicateValue
rdf:typeowl:Class
rdfs:labelPhase
UML class diagram for Phase. Diagram labels: «owl:Class»; Phase; «owl:Class»; State; phase; phase rdfs:domain State. phase rdfs:range Phase.«owl:Class»Phase«owl:Class»Statephase
Class neighborhood: Phase [1]

1.2.3 State§

One state of a lifecycle.

ekg-lifecycle:State
https://ekgf.org/ontology/lifecycle#State
RDF predicateValue
rdf:typeowl:Class
rdfs:labelState
UML class diagram for State. Diagram labels: «owl:Class»; Lifecycle; «owl:Class»; Phase; «owl:Class»; State; is terminal : xsd:boolean; order : xsd:integer; «owl:Class»; State transition; «owl:Class»; Transition; trigger : rdf:langString; current state; 1; from state; 1; phase; prior state transition; 0..1; in lifecycle; 1; to state; 1; current state rdfs:domain State transition. current state rdfs:range State. from state rdfs:domain Transition. from state rdfs:range State. is terminal rdfs:domain State. is terminal rdfs:range xsd:boolean. order rdfs:domain State. order rdfs:range xsd:integer. phase rdfs:domain State. phase rdfs:range Phase.«owl:Class»Lifecycle«owl:Class»Phase«owl:Class»Stateis terminal : xsd:booleanorder : xsd:integer«owl:Class»State transition«owl:Class»Transitiontrigger : rdf:langStringcurrent state1from state1phaseprior state transition0..1in lifecycle1to state1
Class neighborhood: State [1]

1.2.4 State transition§

An actual state-entry occurrence for one thing in one lifecycle, distinct from a permitted Transition definition. It records exactly one currentState and optionally one priorStateTransition. The first occurrence records an initial state without a predecessor. Occurrences can carry optional PROV-O properties and can be identified by IRIs or blank nodes.

ekg-lifecycle:StateTransition
https://ekgf.org/ontology/lifecycle#StateTransition
RDF predicateValue
rdf:typeowl:Class
rdfs:labelState transition
owl:disjointWithekg-lifecycle:Transition
UML class diagram for State transition. Diagram labels: «owl:Class»; Lifecycle; «owl:Class»; State; «owl:Class»; State transition; «owl:Class»; Transition; trigger : rdf:langString; rdfs:Resource; in state; current state; 1; prior state transition; 0..1; from state; 1; in lifecycle; 1; to state; 1; owl:; disjointWith; The dotted rdfs:Resource source is a presentation placeholder: no specific domain is declared in the selected inputs. It is not an asserted domain or a claim that no more specific domain can be entailed. State transition owl:disjointWith Transition. current state rdfs:domain State transition. current state rdfs:range State. in state rdfs:range State transition. prior state transition rdfs:domain State transition. prior state transition rdfs:range State transition.«owl:Class»Lifecycle«owl:Class»State«owl:Class»State transition«owl:Class»Transitiontrigger : rdf:langStringrdfs:Resourcein statecurrent state1prior state transition0..1from state1in lifecycle1to state1owl:disjointWith
Class neighborhood: State transition [1]

1.2.5 Transition§

A permitted directed move between two states of one lifecycle. This describes a possible move, not an occurrence of a state change. Multiple transitions may have the same endpoints and different triggers; loops and branches are explicit.

ekg-lifecycle:Transition
https://ekgf.org/ontology/lifecycle#Transition
RDF predicateValue
rdf:typeowl:Class
rdfs:labelTransition
UML class diagram for Transition. Diagram labels: «owl:Class»; Lifecycle; «owl:Class»; State; «owl:Class»; State transition; «owl:Class»; Transition; trigger : rdf:langString; from state; 1; to state; 1; current state; 1; prior state transition; 0..1; in lifecycle; 1; owl:; disjointWith; State transition owl:disjointWith Transition. from state rdfs:domain Transition. from state rdfs:range State. to state rdfs:domain Transition. to state rdfs:range State. trigger rdfs:domain Transition. trigger rdfs:range rdf:langString.«owl:Class»Lifecycle«owl:Class»State«owl:Class»State transition«owl:Class»Transitiontrigger : rdf:langStringfrom state1to state1current state1prior state transition0..1in lifecycle1owl:disjointWith
Class neighborhood: Transition [1]

1.3 Properties§

1.3.1 applies to§

A class whose members follow this lifecycle unless they name another one. This is policy rather than vocabulary: an organization states it in its own data, and can state it differently. It is an annotation property because its values are classes, which are not individuals.

ekg-lifecycle:appliesTo
https://ekgf.org/ontology/lifecycle#appliesTo
RDF predicateValue
rdf:typeowl:AnnotationProperty
rdfs:domainekg-lifecycle:Lifecycle
rdfs:labelapplies to
rdfs:rangerdfs:Class

1.3.2 current state§

The state entered by this occurrence. Its inLifecycle identifies the lifecycle; the occurrence does not duplicate that assignment.

ekg-lifecycle:currentState
https://ekgf.org/ontology/lifecycle#currentState
RDF predicateValue
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-lifecycle:StateTransition
rdfs:labelcurrent state
rdfs:rangeekg-lifecycle:State

1.3.3 follows lifecycle§

A lifecycle this thing follows. When explicit assignments exist, their complete set replaces the class defaults from appliesTo. A thing can follow several lifecycles.

ekg-lifecycle:followsLifecycle
https://ekgf.org/ontology/lifecycle#followsLifecycle
RDF predicateValue
rdf:typeowl:ObjectProperty
rdfs:labelfollows lifecycle
rdfs:rangeekg-lifecycle:Lifecycle

1.3.4 from state§

The source state of a permitted transition.

ekg-lifecycle:fromState
https://ekgf.org/ontology/lifecycle#fromState
RDF predicateValue
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-lifecycle:Transition
rdfs:labelfrom state
rdfs:rangeekg-lifecycle:State

1.3.5 in lifecycle§

The lifecycle that a phase, state or transition belongs to.

ekg-lifecycle:inLifecycle
https://ekgf.org/ontology/lifecycle#inLifecycle
RDF predicateValue
rdf:typeowl:ObjectProperty
rdfs:domain(rdf:type: owl:Class; owl:unionOf: (ekg-lifecycle:Phase, ekg-lifecycle:State, ekg-lifecycle:Transition))
rdfs:labelin lifecycle
rdfs:rangeekg-lifecycle:Lifecycle

1.3.6 in state§

Links a thing to its current state-entry occurrence, one per effective lifecycle. Earlier occurrences are reached through priorStateTransition. It has no domain because anything can follow lifecycles.

ekg-lifecycle:inState
https://ekgf.org/ontology/lifecycle#inState
RDF predicateValue
rdf:typeowl:ObjectProperty
rdfs:labelin state
rdfs:rangeekg-lifecycle:StateTransition

1.3.7 is terminal§

True for a state that nothing follows. A lifecycle can end in several ways, such as done, failed or cancelled; each of those is a terminal state, and their order is only the order in which they are listed.

ekg-lifecycle:isTerminal
https://ekgf.org/ontology/lifecycle#isTerminal
RDF predicateValue
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-lifecycle:State
rdfs:labelis terminal
rdfs:rangexsd:boolean

1.3.8 order§

Display position of a state within its lifecycle. Order does not imply a permitted transition.

ekg-lifecycle:order
https://ekgf.org/ontology/lifecycle#order
RDF predicateValue
rdf:typeowl:DatatypeProperty
rdf:typeowl:FunctionalProperty
rdfs:domainekg-lifecycle:State
rdfs:labelorder
rdfs:rangexsd:integer

1.3.9 phase§

The phase that a state belongs to.

ekg-lifecycle:phase
https://ekgf.org/ontology/lifecycle#phase
RDF predicateValue
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-lifecycle:State
rdfs:labelphase
rdfs:rangeekg-lifecycle:Phase

1.3.10 prior state transition§

The immediately preceding occurrence for the same thing and lifecycle. Absent for an initial recorded state. History chains must be acyclic even when permitted state routes contain loops.

ekg-lifecycle:priorStateTransition
https://ekgf.org/ontology/lifecycle#priorStateTransition
RDF predicateValue
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-lifecycle:StateTransition
rdfs:labelprior state transition
rdfs:rangeekg-lifecycle:StateTransition

1.3.11 to state§

The target state of a permitted transition.

ekg-lifecycle:toState
https://ekgf.org/ontology/lifecycle#toState
RDF predicateValue
rdf:typeowl:FunctionalProperty
rdf:typeowl:ObjectProperty
rdfs:domainekg-lifecycle:Transition
rdfs:labelto state
rdfs:rangeekg-lifecycle:State

1.3.12 trigger§

An optional human-readable description of the event that enables a transition. It is not an executable guard or an authorization rule. Omitting it leaves the trigger unspecified.

ekg-lifecycle:trigger
https://ekgf.org/ontology/lifecycle#trigger
RDF predicateValue
rdf:typeowl:DatatypeProperty
rdfs:domainekg-lifecycle:Transition
rdfs:labeltrigger
rdfs:rangerdf:langString

1.4 Shapes§

1.4.1 Current State Shape§

Validates effective lifecycle selection and current history-head assignments, including explicitly selected lifecycles and class defaults.

ekg-lifecycle:CurrentStateShape
https://ekgf.org/ontology/lifecycle#CurrentStateShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelCurrent State Shape
sh:property(sh:class: ekg-lifecycle:Lifecycle; sh:path: ekg-lifecycle:followsLifecycle)
sh:property(sh:class: ekg-lifecycle:StateTransition; sh:path: ekg-lifecycle:inState)
sh:sparql(sh:message: A current history head cannot have a recorded successor.; sh:select: SPARQL SELECT query 1)
sh:sparql(sh:message: A current history head must belong to an effective lifecycle.; sh:select: SPARQL SELECT query 2)
sh:sparql(sh:message: An object must have only one current history head per lifecycle.; sh:select: SPARQL SELECT query 3)
sh:sparql(sh:message: Each effective lifecycle requires a current history head.; sh:select: SPARQL SELECT query 4)
sh:targetSubjectsOfrdf:type
sh:targetSubjectsOfekg-lifecycle:followsLifecycle
sh:targetSubjectsOfekg-lifecycle:inState
1.4.1.1 SPARQL query 1§

A current history head cannot have a recorded successor.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
    $this lifecycle:inState ?head .
    ?successor lifecycle:priorStateTransition ?head .
}
1.4.1.2 SPARQL query 2§

A current history head must belong to an effective lifecycle.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT $this WHERE {
    $this lifecycle:inState/lifecycle:currentState/lifecycle:inLifecycle ?lc .
    FILTER NOT EXISTS { $this lifecycle:followsLifecycle ?lc }
    FILTER (
        EXISTS { $this lifecycle:followsLifecycle ?explicit }
        || NOT EXISTS {
            $this rdf:type/rdfs:subClassOf* ?class .
            ?lc lifecycle:appliesTo ?class .
        }
    )
}
1.4.1.3 SPARQL query 3§

An object must have only one current history head per lifecycle.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
    $this lifecycle:inState ?head , ?other .
    ?head lifecycle:currentState/lifecycle:inLifecycle ?lc .
    ?other lifecycle:currentState/lifecycle:inLifecycle ?lc .
    FILTER (?head != ?other)
}
1.4.1.4 SPARQL query 4§

Each effective lifecycle requires a current history head.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT $this WHERE {
    {
        $this lifecycle:followsLifecycle ?lc .
    } UNION {
        FILTER NOT EXISTS { $this lifecycle:followsLifecycle ?explicit }
        $this rdf:type/rdfs:subClassOf* ?class .
        ?lc lifecycle:appliesTo ?class .
    }
    FILTER NOT EXISTS {
        $this lifecycle:inState/lifecycle:currentState/lifecycle:inLifecycle ?lc .
    }
}

1.4.2 History State Shape§

Validates the State resources referenced by history occurrences, requiring each state to identify exactly one lifecycle.

ekg-lifecycle:HistoryStateShape
https://ekgf.org/ontology/lifecycle#HistoryStateShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelHistory State Shape
sh:classekg-lifecycle:State
sh:property(sh:class: ekg-lifecycle:Lifecycle; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:inLifecycle)
sh:targetObjectsOfekg-lifecycle:currentState

1.4.3 Legacy State Shape§

Rejects use of the removed hasState predicate. Current assignments use inState with StateTransition occurrences instead.

ekg-lifecycle:LegacyStateShape
https://ekgf.org/ontology/lifecycle#LegacyStateShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelLegacy State Shape
sh:property(sh:maxCount: 0; sh:message: hasState was removed. Use inState with a StateTransition occurrence.; sh:path: ekg-lifecycle:hasState)
sh:targetSubjectsOfekg-lifecycle:hasState

1.4.4 State Transition Shape§

Validates a recorded state-transition event, including its current state and predecessor transition where supplied.

ekg-lifecycle:StateTransitionShape
https://ekgf.org/ontology/lifecycle#StateTransitionShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelState Transition Shape
sh:classekg-lifecycle:StateTransition
sh:not(sh:class: ekg-lifecycle:Transition)
sh:property(sh:class: ekg-lifecycle:State; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:currentState)
sh:property(sh:class: ekg-lifecycle:StateTransition; sh:maxCount: 1; sh:path: ekg-lifecycle:priorStateTransition)
sh:sparql(sh:message: A state-entry occurrence cannot belong to histories of different objects.; sh:select: SPARQL SELECT query 1)
sh:sparql(sh:message: State history must not contain predecessor cycles.; sh:select: SPARQL SELECT query 2)
sh:sparql(sh:message: Successive occurrences must follow a permitted transition within the same lifecycle.; sh:select: SPARQL SELECT query 3)
sh:targetClassekg-lifecycle:StateTransition
sh:targetObjectsOfekg-lifecycle:inState
sh:targetObjectsOfekg-lifecycle:priorStateTransition
sh:targetSubjectsOfekg-lifecycle:currentState
sh:targetSubjectsOfekg-lifecycle:priorStateTransition
1.4.4.1 SPARQL query 1§

A state-entry occurrence cannot belong to histories of different objects.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
    ?object lifecycle:inState/lifecycle:priorStateTransition* $this .
    ?other lifecycle:inState/lifecycle:priorStateTransition* $this .
    FILTER (?object != ?other)
}
1.4.4.2 SPARQL query 2§

State history must not contain predecessor cycles.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
    $this lifecycle:priorStateTransition+ $this .
}
1.4.4.3 SPARQL query 3§

Successive occurrences must follow a permitted transition within the same lifecycle.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT $this WHERE {
    $this lifecycle:currentState ?to ;
          lifecycle:priorStateTransition/lifecycle:currentState ?from .
    FILTER NOT EXISTS {
        ?from lifecycle:inLifecycle ?lc .
        ?to lifecycle:inLifecycle ?lc .
        ?route rdf:type lifecycle:Transition ;
               lifecycle:inLifecycle ?lc ;
               lifecycle:fromState ?from ;
               lifecycle:toState ?to .
    }
}

1.4.5 Transition Shape§

Validates a lifecycle transition's lifecycle, source state, destination state, and trigger.

ekg-lifecycle:TransitionShape
https://ekgf.org/ontology/lifecycle#TransitionShape
RDF predicateValue
rdf:typesh:NodeShape
rdfs:labelTransition Shape
sh:classekg-lifecycle:Transition
sh:property(sh:class: ekg-lifecycle:State; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:toState)
sh:property(sh:datatype: rdf:langString; sh:path: ekg-lifecycle:trigger)
sh:property(sh:class: ekg-lifecycle:State; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:fromState)
sh:property(sh:class: ekg-lifecycle:Lifecycle; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:inLifecycle)
sh:sparql(sh:message: A terminal state cannot be the source of a transition.; sh:select: SPARQL SELECT query 1)
sh:sparql(sh:message: Both endpoint states must belong only to the transition's lifecycle.; sh:select: SPARQL SELECT query 2)
sh:targetClassekg-lifecycle:Transition
sh:targetSubjectsOfekg-lifecycle:fromState
sh:targetSubjectsOfekg-lifecycle:toState
sh:targetSubjectsOfekg-lifecycle:trigger
1.4.5.1 SPARQL query 1§

A terminal state cannot be the source of a transition.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
    $this lifecycle:fromState ?state .
    ?state lifecycle:isTerminal true .
}
1.4.5.2 SPARQL query 2§

Both endpoint states must belong only to the transition's lifecycle.

PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
    $this lifecycle:inLifecycle ?lifecycle ;
          (lifecycle:fromState|lifecycle:toState) ?state .
    FILTER (
        NOT EXISTS { ?state lifecycle:inLifecycle ?lifecycle }
        || EXISTS {
            ?state lifecycle:inLifecycle ?other .
            FILTER (?other != ?lifecycle)
        }
    )
}

Document provenance

Search this specification