UN/CEFACT Unified Context Methodology Technical

UCM Draft A26
26 January 2010
3
UN/CEFACT
Unified Context Methodology
Technical Specification
4
Working Draft
5
Revision [A28]
6
[27 January 2010]
1
2
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 1 of 38
UCM Draft A26
7
ABSTRACT
8
Insert Abstract Here
26 January 2010
9
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 2 of 38
UCM Draft A26
10
26 January 2010
Table of Contents
11
12
1
STATUS OF THIS DOCUMENT ........................................................................... 6
13
14
2 UN/CEFACT UNIFIED CONTEXT METHODOLOGY TECHNICAL
SPECIFICATION PROJECT TEAM PARTICIPANTS ............................................. 7
15
2.1
Disclaimer ........................................................................................................... 7
16
2.2
Contact Information ............................................................................................ 7
17
3
INTRODUCTION..................................................................................................... 8
18
3.1
Summary of Contents of Document ................................................................... 8
19
3.2
Audience ............................................................................................................. 8
20
3.3
Related Documents ............................................................................................. 8
21
3.3.1
Documents: ..................................................................................................... 8
22
3.3.2
Normative References:.................................................................................... 8
23
4
OBJECTIVES ........................................................................................................... 9
24
4.1
Goals of the UCM Technical Specification ........................................................ 9
25
4.2
Requirements ...................................................................................................... 9
26
4.3
Caveats and Assumptions ................................................................................. 10
27
4.4
Guiding Principles ............................................................................................ 10
28
4.5
Conformance ..................................................................................................... 10
29
5
OVERVIEW ............................................................................................................ 12
30
5.1
Core Components and Business Information Entities ...................................... 12
31
5.2
Graph Theory .................................................................................................... 13
32
5.2.1
Mathematical Directed Acyclic Graph ......................................................... 13
33
5.2.2
Notations ....................................................................................................... 13
34
5.2.3
Key DAG Concepts ...................................................................................... 14
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 3 of 38
UCM Draft A6
01 October 2009
35
5.3
CCTS Classic Context ......................................................................................... 15
36
5.4
Context DAGs .................................................................................................... 15
37
5.5
Business Context............................................................................................... 15
38
5.6
Classification Models........................................................................................ 15
39
5.7
Expressing Context Using a Mathematical Graph ............................................ 16
40
6
CONTEXT GRAPHS ............................................................................................. 17
41
6.1
ContextGraph Information ................................................................................ 18
42
6.2
ContextNode ..................................................................................................... 20
43
Figure 6.3. ContextNode ........................................................................................... 20
44
6.2.1
ContextValue ................................................................................................ 21
45
6.2.2
ContextNode Scheme or List ........................................................................ 21
46
6.3
ContextRootNode ............................................................................................. 22
................................................................................................................................... 22
47
48
6.4
ContextEdge ...................................................................................................... 22
49
7
LINKING CONTEXTGRAPHS ........................................................................... 24
50
8
CONTEXT EXPRESSIONS AND LOGIC .......................................................... 25
51
8.1
Context Clauses ................................................................................................ 25
52
8.1.1
Predicates ...................................................................................................... 26
53
8.1.2
Operands ....................................................................................................... 27
54
8.2
Assigned Context and Contextualized ........................................................ 28
55
8.2.1
Predicates ...................................................................................................... 29
56
8.2.2
Operands ....................................................................................................... 30
57
8.3
Applying Context ............................................................................................ 31
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 4 of 38
UCM Draft A6
01 October 2009
58
8.3.1
Predicates ...................................................................................................... 31
59
8.3.2
Operands ....................................................................................................... 32
8.4
60
Example Implementation .................................................................................. 32
61
9
UCM METAMODEL ............................................................................................. 34
62
10 GLOSSARY............................................................................................................. 36
63
COPYRIGHT STATEMENT ........................................................................................ 38
64
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 5 of 38
UCM Draft A6
01 October 2009
65
66
1 Status of this Document
67
68
69
This Technical Specification is being developed in accordance with the UN/CEFACT
Trade R650R4 Open Development Process for Technical Specifications. The Unified
Context Methodology Project Team is developing it for internal review.
70
This document contains information to guide in interpretation or implementation.
71
Distribution of this document is limited to UCM Project teams.
72
73
This version: Unified Context Methodology Technical Specification, Version 1.0 Draft
A14 of 01 October 2009.
74
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 6 of 38
UCM Draft A26
26 January 2010
77
2 UN/CEFACT Unified Context Methodology
Technical Specification Project Team
Participants
78
79
We would like to recognize the following for their significant participation to the
development of this document.
80
Project Team Leader:
Scott Hinkelman, Oracle
81
Editors:
Pat O’Connor, Infor
75
76
82
Anthony Coates, Londata
83
Mark Crawford, SAP
84
Contributors:
85
Oyvind Assave, Nortella (at time of participation)
86
David Connelly, OAGi
87
Mark Crawford, SAP AG
88
Michael Rowell, Oracle
89
Gunther Stuhec, SAP AG
90
Nikola Stojanovic, RosettaNet
91
Jim Wilson, KCX
92
2.1 Disclaimer
93
94
95
96
The views and specification expressed in this document are those of the authors and are
not necessarily those of their employers. The authors and their employers specifically
disclaim responsibility for any problems arising from correct or incorrect implementation
or use of this technical specification.
97
2.2
98
99
CCWG Chair: Mark Crawford, SAP, mark.crawford@sap.com
UCM Chair: Scott Hinkelman, Oracle, scott.hinkelman@oracle.com
Contact Information
100
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 7 of 38
UCM Draft A6
01 October 2009
101
3 Introduction
102
3.1 Summary of Contents of Document
103
104
3.2 Audience
105
106
107

Software architects, information architects, standards organizations, governments,
private sector and non profit organizations who desire to design, build, implement
or use a context driven solution for their business information.
108

UN/CEFACT Forum participants.
109
110
111
112

Internal UN/CEFACT and external private and public sector users of the Core
Components Technical Specification, Data Type Catalogue, UML Profile for
Core Components, Core Components Message Assembly, and XML Naming and
Design Rules.
113
114
3.3 Related Documents
3.3.1 Documents:
115

UML 2.x.x
116

UMM Base Module 2.0
117

UMM Foundation Module 2.0
118

CCTS 3.0
119

DTC 3.0
120

UPCC 3.0
121
3.3.2 Normative References:
122

Chartand, Gary. Introductory Graph Theory, 1985
123
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 8 of 38
UCM Draft A26
26 January 2010
124
4 Objectives
125
4.1 Goals of the UCM Technical Specification
126
127
128
129
130
The goal of this specification is to deliver a unified methodology for developing,
registering, and using context to support UN/CEFACT Core Components Technical
Specification, Data Type Catalogue, UML Profile for Core Components, Core
Components Message Assembly, and XML Naming and Design Rules; and similar
standards for defining and using business information.
131
132
Enable widespread software tooling to realize the promise of the UN/CEFACT common
methodology standards stack.
133
4.2 Requirements
134
135
To ensure this specification meets its intended audience’s needs, it satisfies the following
requirements:
136

Defines context concepts in terms of CCTS artifacts
137

Supports migration of existing CCTS based context methodologies
138

Defines a usable metamodel
139
140

Defines a methodology for defining, extending, restricting and managing context
values
141
142

Defines a methodology for defining, extending, restricting and managing
groupings of context values
143
144

Defines a methodology for defining, extending, restricting and managing
relationships between context values
145

Defines a methodology for managing and applying context values at design time
146
147

Defines the relationships between context values and lists and schemes of context
values
148

Defines rules for creating and using lists and schemes of context values
149

Supports multi-parent hierarchies
150

Support multiple context values in groupings of business information
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 9 of 38
UCM Draft A6
01 October 2009
151
4.3 Caveats and Assumptions
152
153
154
155
Even though this specification is intended for use by a broad constituency to include
those that do not use UN/CEFACT standards, we assume that the reader has a general
understanding of the UN/CEFACT common methodology standards stack – CCTS, CCL,
DT Catalogue, UMM etc.
156

We assume the reader has a familiarity with the OMG UML.
157
158

We assume the reader has a familiarity with mathematical graph theory,
especially Directed Acyclic Graphs.
159

We assume the reader has a familiarity with set theory
160
4.4 Guiding Principles
161
162
In order to maximize the usefulness of this specification, the following guiding principles
have been adhered to:
163
164

UCM will minimize dependencies on specific implementation technologies and
other specifications.
165

UCM will be cohesive with related UN/CEFACT standards.
166

UCM will not limit the sources and uses of context.
167
168

UCM will be based on existing standards and scientific and mathematical
principles.
Conformance
169
4.5
170
171
172
173
174
175
Designers in governments, private sector, and other standards organizations external to
the UN/CEFACT community have found this specification suitable for adoption. To
maximize reuse and interoperability across this wide user community, the rules in this
specification have been categorized to allow these other organizations to be conformant
while allowing for discretion or extensibility in areas that have minimal impact on overall
interoperability.
176
177
Accordingly, applications will be considered to be in full conformance with this technical
specification if they comply with the content of normative sections, rules and definitions.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 10 of 38
UCM Draft A6
178
179
01 October 2009
Rules in categories 1, 4 and 5 cannot be modified. Rules in categories 2, 3, 6, and 7 may
be tailored within the limits identified in the rule and the related normative text.
Conformance SHALL be determined through adherence to the
content of the normative sections and rules. Furthermore each
rule is categorized to indicate the intended audience for the rule
by the following:
Rule Categorization
ID Description
1 Rules which must not be violated by individual organizations
else conformance and interoperability is lost
2 Rules which may be modified by individual organizations
while still conformant to the overall intent.
[R XXX]
3 Rules which may be modified by individual organizations
while still conformant to agreed upon data models
1
4 Rules that if violated lose conformance with the
UN/CEFACT context model
5 Rules that relate to extension that are not used by
UN/CEFACT and have specific restrictions on their use by
other than UN/CEFACT organizations.
6 Rules that relate to extension that are determined by
specific organizations.
7 Rules that can be modified while not changing instance
validation capability.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 11 of 38
UCM Draft A26
26 January 2010
180
5 Overview
181
182
183
184
185
186
The UN/CEFACT Context Methodology is a methodology for managing the
representation and use of business context information, especially for UN/CEFACT
technologies. This includes representing the business contexts of Business Information
Entities (BIEs), using business context during message assembly to produce messages for
specific business contexts, and using business context to (semi-) automatically customise
generic business processes.
187
188
189
190
191
192
In building a context model, it is necessary to have an agreed definition of what context
is. Without agreement on what context is, it isn't possible to define an agreed
methodology for modelling context and for processing context models to drive
customisations. Context is metadata that defines circumstances in which particular data is
or is not relevant. That is to say, context information is information that is used to
identify the scope (relevance, applicability, business context) of some other information.
193
194
195
196
197
In order to create a workable context model and methodology, it is necessary to
understand what context information needs to be modelled and how it will be used. The
concept of context naturally leads to categorization of context values which can be
expressed as a context category. A context category is a group of one or more unordered
values used to express a characteristic of a business circumstance.
198
5.1 Core Components and Business Information Entities
199
200
201
202
203
204
205
The Core Components Technical Specification (CCTS) defines two key concepts – Core
Components and Business Information Entities. Core Components (CCs) are conceptual
data model components that are not specific to any particular business context. They
represent a superset from which business-specific data model components are created.
Business Information Entities (BIEs) represent logical data model components in a given
context and can be used as business-specific message components. Each BIE is derived
by restriction from a CC1.
206
207
In modelling approaches that do not have an equivalent of the CC layer, what typically
(and quickly) happens is that business message components are copied, truncated, and
1
Note that an ABIE (Aggregate Business Information Entity) can have more children (BBIEs and ASBIEs)
than the ACC (Aggregate Core Component) that it restricts, since the individual BCCs and ASCCs from
the ACC are allowed to be repeated in the ABIE with different business contexts (so there can be multiple
BIEs derived from a single BCC in an ABIE, etc.).
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 12 of 38
UCM Draft A6
01 October 2009
208
209
210
211
212
extended, so that soon there are many business components with similar fields, but no
way to be sure whether two fields in different components are the same or not. This leads
to an explosion of fields with similar but different definitions and information.
Mismatches between the definitions of similar fields make it difficult to move
information reliably and correctly between systems.
213
214
215
216
The CCTS approach requires all BIEs to be related back to the common CCs, so that
there is no confusion when two fields are the same. The introduction of new CCs, and
new fields (BCCs or ASCCs) into ACCs (Aggregate Core Components) is managed
through a harmonisation process that detects and removes duplicate field definitions.
217
5.2 Graph Theory
218
219
220
221
222
UCM uses graph theory to define and understand the concept of context, context
categories, context values and context operands. It is necessary to understand graph
theory and terms to properly understand and apply UCM. A graph is a set of nodes
(points) connected by edges. A root node is a starting point of a graph. An edge is an
ordered pair of vertices represented by a connection between two nodes.
223
224
225
226
UCM is predicated on Directed Acyclic Graphs (DAGs). A graph is directed if it defines
a direction between nodes, and does not allow for looping between nodes. A graph is
acyclic if it has no cycles. A DAG can contain one or more entry points/root nodes. UCM
supports DAGs with multiple entry points/root nodes.
227
5.2.1 Mathematical Directed Acyclic Graph
228
229
230
231
This section provides a terse explanation of key DAG concepts and base terminology. For
in depth discussion of graphs, much has been written. Refer to the reference section of
the specification. We identify and discuss the base concepts of a DAG which are relevant
to this specification, which uses a mathematical DAG as its foundation.
232
233
234
235
A Directed Acyclic Graph is a specific form of a graph. In a DAG, vertices (or nodes) are
directionally connected by edges (or lines) and following any edge along its direction,
from a given vertex, the same vertex can never be reached (no cycles, acyclic). Edges
directionally connect two vertices.
236
237
In graph theory, an edge is a pair of vertices (nodes). In a DAG, an edge is an ordered
pair of vertices (the order semantics are not specified).
238
Throughout the rest of this document the term node will be used for a vertex.
239
5.2.2 Notations
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 13 of 38
UCM Draft A6
01 October 2009
240
241
242
While there is no best drawing of a graph, they are usually represented using dots to
represent vertices and lines, or arcs, to represent edges. Arrows are usually used to show
orientation of directed edges.
243
Notations for a mathematical DAG are the primary notations used in this specification.
244
A node is represented by ellipse:
245
246
247
An edge is represented arrow, which identifies the direction. The end of the arrow
without the arrow head is the edge source and the end with the arrow is the edge target.
248
249
250
251
Technically, a DAG is purely mathematical, and vertices within a DAG do not require a
value, or label, of any sort. For the purpose of this specification, we will use a simple text
label within a node to exemplify a value of a node.
X
252
253
5.2.3 Key DAG Concepts
2
1
3
4
5
6
7
8
254
255
256
257
258
A root node is a node that is not the edge target of any edge (1, 2, 3, and 4). A leaf node
is a node that is not the edge source of any edge (4, 6, and 8). Note that (4) is both a root
node and a leaf node. Nodes which are neither a root node nor leaf node (5) have no
special term beyond just ‘node’.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 14 of 38
UCM Draft A6
01 October 2009
259
260
An edge that goes from a particular node is an outgoing edge of that node. An edge that
goes to a particular node is an incoming edge of that node.
261
262
263
Note that there is no requirement for a node to be connected by edges. A DAG may have
one or more source vertices and one or more sink vertices, but must have at least one
node.
264
5.3 CCTS Classic Context
265
266
267
268
269
CCTS defines Business Context as the formal description of a specific business
circumstance as identified by the values of a set of context categories, allowing different
business circumstances to be uniquely distinguished. Each context category consists of a
set of related context values. Each value is defined by a classification scheme which is
expressed as code list or identifier scheme.
270
5.4 Context DAGs
271
272
273
274
275
276
277
278
279
A Context DAG is an organized collection of values. A Context DAG has one or more
context root nodes. Each context root node is the equivalent of a classic CCTS context
category. Each context root node has zero or more child nodes, each of which
represents a related context value. Each context value is an identifier from an
identification scheme or a code from a code list. Business context is identified through a
context expression that is relevant to one or more context graphs and specific context
values within them. The business context describes the specific business circumstance
for the use of a given contextualizable (refer to Chapter 7 for information on
contextualizable).
280
5.5 Business Context
281
Definition – Business Context
282
Business Context is an organized collection of context values.
283
284
285
The business context is assigned to a contextualizable whose applicability in a specific
business transaction is determined by the comparing its business context to the context of
the transaction.
286
5.6 Classification Models
287
288
The context model that is presented in this document is a network classification model.
What does that mean? A network classification model is basically a collection of
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 15 of 38
UCM Draft A6
01 October 2009
289
290
291
292
293
294
295
296
classifications with associations (relationships) between those classifications. The
associations are not necessarily hierarchical (as they would be in, say, a strict taxonomy).
The way you control the structure of a classification model is by controlling the
associations that are allowed (or required) in the model. For the UCM context model,
where each classification is a context, the aim is to have just enough kinds of associations
to represent the necessary relationships between contexts, without having so many
different kinds of associations that it becomes difficult to process the model and produce
the information required by context-driven processes, e.g. message assembly.
297
5.7 Expressing Context Using a Mathematical Graph
298
299
300
301
302
303
304
305
306
307
308
A business context is commonly a combination of multiple separate contexts. Given the
context values of ‘Global’, ‘Automotive’, ‘Asia’, ‘Japan’ and ‘China’ the following
statements could be made. Global Automotive is a compound context that combines
the Global context with the Automotive context. The context model needs to be able
to combine contexts to produce narrower, or more specific, business contexts. It also
must be possible to combine context to produce broader business contexts, e.g. to
combine Japan and China to produce Japan and China. It is sometimes also
necessary to be able to remove some context. For example, if you need to express the
context Asia without the Japan, it is much simpler if you can express this
narrowing of the context directly, rather than by individually listing and combining the
contexts for all of the countries in Asia other than Japan.
309
The foundation of this specification is a mathematical graph.
310
311
312
Specifically, this specification is based on a Directed Acyclic Graph [DAG]. A DAG has
many applications in event processing, expression evaluation, game theory, sorting
algorithms, parser algorithms, etc.
313
314
While a DAG is a mathematical construct, it defines no semantics. This specification
imposes semantics on a DAG to realize Context Schemes.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 16 of 38
UCM Draft A26
26 January 2010
315
6 Context Graphs
316
317
318
A ContextGraph is the foundation of the UCM methodology. A context graph is a
mathematical DAG. A ContextGraph imposes semantics on a directed acyclic graph to
realize the expression of context.
319
Definition – ContextGraph
320
321
322
A ContextGraph is the organization of possible values used to identify
specific business circumstances. A ContextGraph is a Directed Acyclic
Graph.
323
324
A ContextGraph may or may not contain all possible context values used to express a
given business context.
ContextEdge
+edge 0..*
Should source and
target be renamed
parent and child?
constraints
{Target must be different to source}
{At least 1 node is from same graph}
+graph 1
0..*
Or should we talk about
indirect source and
indirect target rather
than ancestor and
descendant?
0..*
ContextGraph
+graph 1
+source 1
1
+node 1..*
1
ContextGraphInformation
+
+
+
+
+
+
+
ContextGraphIdentifier: String
ContextGraphName: String [0..1]
ContextGraphDescription: String [0..1]
ContextGraphVersionIdentifier: String
ContextGraphVersionDate: Date [0..1]
ContextGraphAgencyIdentifier: String
ContextGraphAgencyName: String [0..1]
1
+target
ContextNode
+
+
+
+
ContextNodeIdentifier: String
ContextValue: String
ContextValueName: String [0..1]
ContextValueDefinition: String [0..1]
constraints
{Is a ContextRootNode, or has exactly 1 ancestor ContextRootNode}
{(ContextValueSource,ContextValue) pair is unique within tree rooted at ContextRootNode}
0..*
ContextValueSource 1
ContextRootNode
constraints
{Not a target of any edge}
Scheme Or List
+
+
+
Identifier: String
VersionIdentifier: String
AgencyIdentifier: String
325
326
Figure 6-1. ContextGraph
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 17 of 38
UCM Draft A6
01 October 2009
327
Note –
328
329
330
This specification utilizes UML to sketch the concepts where useful to
facilitate the discussion. Unless otherwise specified, these sketches
are informative.
331
332
A ContextGraph consists of ContextGraphInformation, ContextNodes, and possibly
ContextEdges.
333
[Ed Note – insert hyperlinks above to the relevant sections]
[R XXX]

A ContextGraph MUST have one ContextGraphInformation
1
[R XXX]

A ContextGraph MUST have one or more ContextNode
1
[R XXX]

A ContextGraph MUST have zero or more ContextEdge
1
334
6.1 ContextGraph Information
335
ContextGraph information provides unique information about the entire graph.
336
Definition – ContextGraphIdentifier
337
A ContextGraphIdentifier uniquely identifies a ContextGraph.
338
[R XXX]
The ContextGraphInformation MUST have a ContextGraphIdentifier.
1
[R XXX]
Once assigned, a ContextGraphIdentifier MUST never be changed or reused.
1
[R XXX]
The ContextGraphIdentifier MUST be a URN as defined by RFC 2141.
1
[R 8E2D]
The ContextGraphIdentifier URN scheme MUST use the following pattern:
3
339
340
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 18 of 38
UCM Draft A6
01 October 2009
URN:
urn:<organization>:<org hierarchy>[:<org
hierarchy level>]*:context:<major>:<status>
Where:

organization – An identifier of the organization providing the
standard.

org hierarchy – The first level of the hierarchy within the
organization providing the standard.

org hierarchy level – Zero to n level hierarchy of the organization
providing the standard.

data

package – the context graph name

major – The major version number.

status – The status of the schema as: draft|standard.
[Ed Note – take NDR example and insert here]
[R XXX]
The ContextGraphInformation MUST have a
ContextGraphVersionIdentifier.
[R XXX]
The ContrextGraphInformation MUST have zero or one
ContextGraphVersionDate
[R XXX]
The ContextGraphVersionIdentifier MUST consist of a major and minor
version number (add language from NDR regarding allowed values).
[R XXX]
A ContextGraph minor version MUST have the same ContextGraphIdentifier
1
as its major version.
[R XXX]
The ContextGraphInformation MUST have an
ContextGraphAgencyIdentifier (add language from NDR/CCTS about using
the UN/CEFACT AID or when an agency doesn’t have an agency id.)
1
[R XXX]
The ContextGraphInformation MUST have zero or one ContextGraphName
1
1
1
341
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 19 of 38
UCM Draft A6
01 October 2009
[R XXX]
The ContextGraphInformation MUST have zero or one
ContextGraphAgencyName
1
[R XXX]
The ContextGraphInformation MUST have zero or one
ContextGraphDescription
1
342
343
344
345
346
347
6.2 ContextNode
ContextNode
+
+
+
+
Scheme Or List
ContextNodeIdentifier: String
ContextValue: String
0..*
ContextValueName: String [0..1]
ContextValueDefinition: String [0..1]
ContextValueSource
+
1 +
+
Identifier: String
VersionIdentifier: String
AgencyIdentifier: String
348
349
Figure 6.3. ContextNode
350
351
ContextNodes contain the ContextValues in a ContextGraph. ContextNodes are
organized through the use of ContextEdges.
352
[Ed. Note – Insert link for ContextEdge to Section 6.3]
353
Definition – ContextNode
354
A ContextNode is a node in a ContextGraph
355
356
357
A ContextNode may have multiple parent ContextNodes. A ContextNode can be a
ContextRootNode. A ContextNode at any level in the graph will only have at most one
ancestor ContextRootNode.
358
359
A ContextGraph uses globally unique identifiers for each node. Globally unique
identifier schemes include:
360

UUID
361

URI
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 20 of 38
UCM Draft A6
[R XXX]
362
363
01 October 2009
A ContextNode MUST have one ContextNodeIdentifier
1
UN/CEFACT will use UUIDs. Other organizations are free to choose URI or any other
scheme that guarantees global uniqueness.
[R XXX]
A ContextNodeIdentifier MUST be globally unique
1
[R XXX]
A ContextNodeIdentifier MUST be a UUID
3
364
365
366
367
368
369
6.2.1 ContextValue
370
Definition – ContextValue
371
A ContextValue is a value taken from an identified scheme or list
372
Each ContextNode has a ContextValue
373
[R XXX]
The ContextNode MUST have exactly one ContextValue
1
[R XXX]
Each ordered pair ContextValue and ContextValueSource MUST be unique
within the set of ContextNodes comprising a ContextRootNode and all of its
descendent ContextNodes.
1
[R XXX]
The ContextNode MUST have zero or one ContextValueName
1
[R XXX]
The ContextNode MUST have zero or one ContextValueDefinition
1
6.2.2 ContextNode Scheme or List
[R XXX]
[R XXX]
The ContextNode MUST have one Scheme or List
The Scheme or List MUST have the following properties:
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
1
1
Page 21 of 38
UCM Draft A6
01 October 2009

Identifier (1..1) – Take language from CCTS

VersionIdentifier (1..1) – Take language from CCTS

AgencyIdentifier (1..1) – Take language from CCTS
374
6.3 ContextRootNode
375
376
ContextRootNodes are intended to reflect separate categories of organized values. It is a
special form of ContextNode.
377
Definition – ContextRootNode
378
379
A ContextRootNode is a ContextNode that is not a target ContextNode
of any ContextEdge.
[R XXX]
A ContextNode which is not a ContextRootNode MUST only be connected
1
to one ancestor ContextRootNode.
380
Note –
381
382
383
A ContextRootNode ContextValue provides the least precise level of semantics
within a ContextGraph.
[R XXX]
A ContextGraph MUST contain one or more RootContextNode.
384
6.4 . ContextEdge
385
386
387
388
389
390
391
A ContextEdge relates two ContextNodes, where one ContextNode is the source and the
other ContextNode is the target. The relationship is directional from the source
ContextNode to the target ContextNode. Possible relationship types include, but are not
limited to, type of and aggregation/composition (i.e., part of). A source ContextNode is
the ContextNode in a ContextEdge that is reached earlier in the directed collection of
ContextNodes. A target ContextNode is the ContextNode in a ContextEdge that is
accessed through the source ContextNode.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
1
Page 22 of 38
UCM Draft A6
01 October 2009
392
Definition – ContextEdge
393
394
A ContextEdge is a directed relationship between a source
ContextNode and target ContextNode.
[R XXX]
The set of ContextEdges in a ContextGraph MUST be acyclic.
1
395
396
397
398
399
400
The target ContextNode ContextValue represents a narrowed relationship to the source
ContextNode’s ContextValue such as a – generic expression of, kind of, whole/part
relation of.
401
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 23 of 38
UCM Draft A6
01 October 2009
402
7 Linking ContextGraphs
403
404
405
406
407
408
In certain circumstances, a ContextGraph may not contain all values necessary to
completely define BusinessContext. Where necessary, a ContextGraph may be associated
with another ContextGraph to express the complete set of values necessary for a given
BusinessContext. As shown in figure 7-1, this association is accomplished by linking one
target ContextNodes from the source ContextGraph to at least one target ContextNode
from the target ContextNode using ContextEdges.
409
[Insert figure here]
410
Figure 7-1 – Linking Two ContextGraphs
411
Can two nodes in a source graph link to a single node in a target graph?
412
Can two nodes in a target graph link to a single node in a source graph?
413
Can multiple edges exist between two graphs?
414
Can a source graph also be a target graph to the target graph?
415
416
417
A ContextEdge may be used to link two ContextGraphs. When used in this fashion, at
least one of the ContextNodes must be in the same ContextGraph as the ContextEdge.
[R XXX]
418
A ContextEdge must contain at least one ContextNode that is in the same
ContextGraph as the ContextEdge itself.
1
Linked ContextGraphs may include one, or more than one, ContextEdge.
[R XXX]
All rules that apply to a ContextGraph must be observed by all ContextEdges
1
when graphs are linked.
419
420
421
422
may only have one ContextRootNode parent in a single graph, but may have multiple
ContextRootNode parents across ContextGraphs, provided that each ContextRootNode
parent resides in a separate ContextGraph.
423
424
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 24 of 38
UCM Draft A6
01 October 2009
425
8 Context Expressions and Logic
426
8.1 Context Clauses
427
The Figure 8-1 is a UML logical sketch diagram of ContextExpressions:
ContextExpression
ContextClause
2
+contextgraphid
+contextgraphversion
1
1
1
SimpleContextClause
+predicate
+contextnodeid
CompoundContextClause
+operand
428
429
Figure 7-1. Context Expression UML.
430
Definition – ContextClause
431
432
433
A ContextClause is an expression that can be resolved to a set of
ContextNodes within a ContextGraph or multiple linked
ContextGraphs.
434
435
There are two concrete types of ContextClauses – SimpleContextClause and
CompoundContextClause.
436
Defintition – SimpleContextClause
437
438
439
A SimpleContextClause is a ContextClause with one predicate and one
ContextNodeIdentifier that resolves to a set of ContextValues which
may be an empty set.
440
[R XXX]
A SimpleContextClause MUST have the following lexical notation:
<predicate><ContextNode ID>.
1
441
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 25 of 38
UCM Draft A6
01 October 2009
442
Definition – CompoundContextClause
443
444
445
A CompoundContextClause is a ContextClause with two (referred to as
“left” and “right”) ContextClauses (either SimpleContextClause or
CompoundContextClause) and one operand.
446
[R XXX]
A CompoundContextClause MUST have the following lexical notation:
(<ContextClause>)<operand>(<ContextClause>).
1
447
448
449
A ContextExpression contains a single ContextClause. A ContextExpression also
contains the ID and version of the ContextGraph to which it refers.
450
Definition – ContextExpression
451
452
A ContextExpression associates a single ContextClause to a specific
version of a ContextGraph.
453
[R XXX]
A ContextExpression MUST contain a single ContextClause and the ID and
version of the ContextGraph it references.
1
454
A ContextExpression MUST have the following lexical notation:
[R XXX]
[<ContextGraph URI>”,”<ContextGraph version>”,”<ContextClause>]
1
455
456
8.1.1 Predicates
457
Allowed predicates and their meaning (with notation):
458
459
460

= (Equal to) – used to return the set of ContextValues where the
ContextNodeIdentifierof the ContextNode in the ContextGraph is the
ContextNodeIdentifierin the clause.
461
462
463

!= (Not equal to) – returns the set of ContextValues for all ContextNodes
where the ContextNodeIdentifieris not the ContextNodeIdentifierfrom the
clause.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 26 of 38
UCM Draft A6
01 October 2009
464
465
466

> (Greater than) – returns the set of ContextValues for all ContextNodes
that are ancestors of the ContextNode identified by the
ContextNodeIdentifierfrom the clause.
467
468
469

< (Less than) - returns the set of ContextValues for all ContextNodes that
are descendants of the ContextNode identified by the
ContextNodeIdentifierfrom the clause.
470
471

>= (Greater than or equal to) – returns the set of ContextValues return by
both the ‘Greater than’ and ‘Equal to’ predicates.
472
473

<= (Less than or equal to) – returns the set of ContextValues return by
both the ‘Less than’ and ‘Equal to’ predicates.
474
The predicates MUST be represented as: (=, !=, >, <, >=, <=) where:
[R XXX]
= is Equal, != is Not equal, > is Greater than, > is Less than, >= is
Greater than or equal , and <= is Less than or equal.
1
475
476
8.1.2 Operands
477
Allowed operands and their meaning (with notation):
478
479

&& (Intersection) – returns the set of ContextValues that are common to
the result sets from both of the component clauses.
480
481

|| (Union) – returns the set of ContextValues that are in either or both of
the result sets from the two component clauses.
482
483
484

! (Exclusion) – returns the set of ContextValues that are returned from the
first clause (left clause) that are not in the set of ContextValues that are
returned from the second clause (right clause).
485
[R XXX]
The operands MUST be represented as: (&&, ||, !) where && is
Intersection, || is union, ! is Exclusion.Greater than or equal , and <=
is Less than or equal.
1
486
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 27 of 38
UCM Draft A6
01 October 2009
487
8.2 Assigned Context and Contextualized
488
Definition – Contextualizable
489
490
A contextualizable is an object whose properties can be modified to
meet a particular business circumstance.
491
492
493
494
A contextualizable is any object, process or other artifact which can be associated with a
context expression. When a contextualizable has had its context assigned through the
association with a ContextExpression, its properties have been specified to meet a
particular business circumstance.
495
496
497
498
Assigning context is the action of specifying a ContextExpression as part of an object.
This object is a Contextualized object, or simply, a “Contextualized”. A Business
Information Entity (BIE) and including Business Data Types (BDT) are Contextualized.
Other types of objects may be Contextualized.
499
Definition - Contextualized
500
501
A contextualized is a Contextualizable which has had context assigned
through association with a ContextExpression
502
A Contextualized is the result of applying a classification scheme to a contextualizable
503
504
505
506
Assigning context is accomplished by defining a ContextExpression who’s
ContextClause can be resolved to zero or more ContextValues as a set through
processing, and specifying (assigning) the ContextExpression as an intrinsic part of the
Contextualized.
Contextualized
+ContextExpression
«BIE»
507
Figure 7-2. Contextualized UML
508
[R XXX]
Contextualized MUST contain one or more ContextExpressions.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
1
Page 28 of 38
UCM Draft A6
01 October 2009
509
D
B
E
C
F
A
I
H
G
J
510
511
512
Figure 7-3. DAG example identified by urn:un:unece:uncefact:context:draft:20091001682ba7e31f26
version 1.0
513
Note -
514
515
516
The ContextValues and the ContextNodeIdentifiers, both of which are
assigned to a node, are represented with the same letters for the
purposes of the examples in this chapter.
517
8.2.1 Predicates
518
519
The allowed predicates and their definitions within a SimpleContextClause when
assigning context using the Context Graph in Figure 8-3:
520
521

= (Equal to) - The Contextualized is associated with the ContecxtValue of the
ContextNode with the ContextNode ID.
522
523
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNodeIdentifier C:
524
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(=,C)]
525
526

> (Greater than) - The Contextualized is associated with all ContextValues of all
ancestor ContextNodes of the ContextNode with the ContextNode ID.
527
528
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs A,B,G:
529
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(>,H)]
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 29 of 38
UCM Draft A6
530
531

01 October 2009
< (Less than) - The Contextualized is associated with all ContextValues of all
descendants ContextNodes of the ContextNode with the ContextNode ID.
532
533
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs I,J:
534
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(<,H)]
535
536
537

>= (Greater than or equal to) - The Contextualized is associated with the
ContextValues of all ancestor ContextNodes of the ContextNodeIdentifierand the
ContextValue of the ContextNode ID.
538
539
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs A,B,G,H:
540
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(>=,H)]
541
542
543

<= (Less than or equal to) - The Contextualized is associated with the
ContextValues of all child ContextNodes of the ContextNodeIdentifierand the
ContextValue of the ContextNode ID.
544
545
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs H,I,J:
546
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(<=,H)]
547
8.2.2 Operands
548
549
The allowed operands of a CompoundContextClause when assigning context using the
Context Graph in Figure 8-3:
550
551

&& (Intersection) - The Contextualized is associated with all of the
ContextValues which are common to the two ContextClauses.
552
553
The following ContextExpression with a CompoundContextClause indicates that
the Contextualized is assigned with the ContextValues of ContextNode IDs H:
554
555
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,
((=,H)&&(<=,B))]
556
557

|| (Union) - The Contextualized is associated with all ContextValues specified in
the two ContextClauses.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 30 of 38
UCM Draft A6
01 October 2009
558
559
560
The following ContextExpression with a CompoundContextClause indicates that
the Contextualized is assigned with the ContextValues of ContextNode IDs
H,C,D,E,F:
561
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,((=,H)||(<=,C))]
562
563
564

! (Exclusion) - The Contextualized is associated with all ContextValues specified
in the first ContextClause minus the ContextValues specified in the second
ContextClause.
565
566
567
The following ContextExpression with a CompoundContextClause indicates that
the Contextualized is assigned with the ContextValues of ContextNode IDs
C,E,F:
568
[Urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,((<=,C)!(=D))]
569
8.3 Applying Context
570
571
572
The application of context for a specific business situation is the action of resolving a set
of Contextualized objects by applying a ContextExpression against the global set of
Contextualized objects.
573
574
575
576
577
578
The application of context is accomplished by evaluating the simple context clauses to
return a set of Contextualized and applying the operand in a left to right sequence. The
ContextClause is first evaluated against the ContextGraph to return a set of
ContextValues. The set is ContextValues is then used to query the global set of
Contextualized to return the set of all Contextualized that is assigned any of the returned
ContextValues.
579
8.3.1 Predicates
580
The allowed predicates of a SimpleContextClause when applying context:
581
582

= (Equal to) - The set of Contextualized which are associated with the
ContextValue of the ContextNode with the ContextNode ID.
583
584

!= (Not Equal to) - The set of Contextualized which are not associated with the
ContextValue of the ContextNode ID.
585
586

> (Greater than) - The set of Contextualized which are associated with all
ContextValues of all ancestor ContextNodes of the ContextNode ID.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 31 of 38
UCM Draft A6
01 October 2009
587
588

< (Less than) - The set of Contextualized which are associated with all
ContextValues of all child ContextNodes of the ContextNode ID.
589
590
591

>= (Greater than or equal to) - The set of Contextualized which are associated
with all ContextValues of all ancestor ContextNodes and the ContextValue of the
ContextNode ID.
592
593
594

<= (Less than or equal to) - The set of Contextualized which are associated with
all ContextValues of all child ContextNodes and the ContextValue of the
ContextNode ID.
595
8.3.2 Operands
596
The allowed operands of a CompoundContextClause when applying context:
597
598

&& (Intersection) - The set of Contextualized which are members of both sets of
resolved Contextualized from the two ContextClauses.
599
600

|| (Union) - The set of Contextualized which are members of either set of resolved
Contextualized from the two ContextClauses.
601
602
603

! (Exclusion) - The set of Contextualized which are members of the set of resolved
Contextualized from the first ContextClause minus the members of the set of
resolved Contextualized from the second ContextClause.
604
8.4 Example Implementation
D
B
E
C
F
A
I
H
G
J
605
606
607
Figure 7-4. DAG example identified by urn:un:unece:uncefact:context:draft:20091001682ba7e31f26
version 1.0
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 32 of 38
UCM Draft A6
01 October 2009
608
609
Note: Figure 8-3 and 8-4 use the same ContextGraph. It is duplicated so the be more
accessible to the example tables Table 8-1 and 8-2.
610
611
612
Note: The ContextValues and the ContextNodeIdentifiers, both of which are assigned to
a node, are represented with the same letters for the purposes of the examples in this
chapter.
Contextualized
613
Assignment
ContextClause
Assigned Context
Contextualized1
(=,A)
A
Contextualized2
(<=,B)
B, C, D, E, F, H, I, J
Contextualized3
(<=,A)
A, B, C, D, E, F, G, H, I, J
Contextualized4
(((<,A)!(<=,H))||(=,I))
B, C, D, E, F, G, I
Contextualized5
(=,C)
C
Contextualized6
((<=,H)!(=,I))
H, J
Contextualized7
((>=,H)!(=,G))
A, B, H
Table 7-5. Assigning Context the Assignment ContextClause and the resulting Assigned Context
Applied
ContextClause
(=,A)
((=,A)!(=,B))
((=,A)&&(=,B))
((=,I)||(=,J))
Processing Description
Results
Create a set of all Contextualized
Contextualized1,
Contextualized that have ‘A’ assigned as a Contextualized3,
ContextValue
Contextualized7
Create a set of all Contextualized
Contextualized1
Contextualized that have ‘A’ assigned as a
ContextValue and then Exclude all
Contextualized from the set that have ‘B’
assigned as a ContextValue.
Create a set of all Contextualized
Contextualized3,
Contextualized that have ‘A’ assigned as a Contextualized7
ContextValue then create a set of all
Contextualized that have ‘B’ assigned as a
ContextValue and then perform an
intersection of the two sets.
Create a set of all Contextualized
Contextualized2,
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 33 of 38
UCM Draft A6
01 October 2009
Contextualized that have ‘I’ assigned as a Contextualized3,
ContextValue then create a set of all
Contextualized4,
Contextualized that have ‘J’ assigned as a Contextualized6
ContextValue and then perform a union of
the two sets.
614
Table 7-6. Results of Applying Context
615
9 UCM Metamodel
616
Figure 8-1 defines the Context Methodology Model.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 34 of 38
UCM Draft A6
617
618
01 October 2009
Figure 8-1: Merged Context Methodology Metamodel
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 35 of 38
UCM Draft A26
26 January 2010
619
10 Glossary
620
Context Methodology – already in the document
621
622
Classification Scheme – TBD
623
624
Modeling dimension - TBD
625
626
Semantic Modeling – TBD
627
628
Type/Value-Domain – TBD
629
630
BIE/BDT Contextualized Profile – wait for Gunther
631
632
Classification - distinguish it from other more generic meanings of it, to be discussed in the con call
633
634
Payload – TBD
635
636
Contextual Instance Payload - TBD
637
638
639
640
Profile definitions:
641
642
643
ClassificationScheme – it is in the CCTS spec and echoed in the UN/CEFACT
Glossary; maybe ClassificationMechanism is better?
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 36 of 38
UCM Draft A6
01 October 2009
644
645
646
ClassificationArea – space appropriate for classifying business information; change
to ContextCategory for now.
647
648
Classifiable – TBD
649
650
651
Merged Model definitions:
652
653
Business Context – use current definition from the CCTS spec
654
655
Context – use the definition from current Tony’s latest version of the UCM spec
656
657
Context Category – use current definition from the CCTS spec
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 37 of 38
UCM Draft A26
658
26 January 2010
Copyright Statement
659
Copyright © UN/CEFACT 2009. All Rights Reserved.
660
661
662
663
664
665
666
This document and translations of it may be copied and furnished to others, and
derivative works that comment on or otherwise explain it or assist in its implementation
may be prepared, copied, published and distributed, in whole or in part, without
restriction of any kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this document itself may not
be modified in any way, such as by removing the copyright notice or references to
UN/CEFACT except as required to translate it into languages other than English.
667
668
The limited permissions granted above are perpetual and will not be revoked by
UN/CEFACT or its successors or assigns.
669
670
671
672
673
674
This document and the information contained herein is provided on an "AS IS" basis and
UN/CEFACT DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 38 of 38