Specification_UNCEFACTUCMVersion1p0DraftA27

UCM Draft A26
26 January 2010
3
UN/CEFACT
Unified Context Methodology
Technical Specification
4
Working Draft
5
Revision [A26]
6
[26 January 2010]
1
2
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 1 of 36
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 36
UCM Draft A26
10
26 January 2010
Table of Contents
11
12
1
STATUS OF THIS DOCUMENT ........................................................................... 5
13
14
2 UN/CEFACT UNIFIED CONTEXT METHODOLOGY TECHNICAL
SPECIFICATION PROJECT TEAM PARTICIPANTS ............................................. 6
15
2.1
Disclaimer ........................................................................................................... 6
16
2.2
Contact Information ............................................................................................ 6
17
3
INTRODUCTION..................................................................................................... 7
18
3.1
Summary of Contents of Document ................................................................... 7
19
3.2
Audience ............................................................................................................. 7
20
3.3
Related Documents ............................................................................................. 7
21
3.3.1
Documents: ................................................................................................. 7
22
3.3.2
Normative References:................................................................................ 7
23
4
OBJECTIVES ........................................................................................................... 8
24
4.1
Goals of the UCM Technical Specification ........................................................ 8
25
4.2
Requirements ...................................................................................................... 8
26
4.3
Caveats and Assumptions ................................................................................... 9
27
4.4
Guiding Principles .............................................................................................. 9
28
4.5
Conformance ....................................................................................................... 9
29
30
31
4.5.1
5
Conformance ..............................................Error! Bookmark not defined.
OVERVIEW ............................................................................................................ 11
5.1
Graph Theory .................................................................................................... 12
32
5.1.1
Mathematical Directed Acyclic Graph ..................................................... 12
33
5.1.2
Notations ................................................................................................... 12
34
5.1.3
Key DAG Concepts .................................................................................. 13
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 3 of 36
UCM Draft A6
01 October 2009
35
5.2
Context and Directed Acyclic Graphs .............................................................. 14
36
5.3
Defining Context ................................................Error! Bookmark not defined.
37
5.4
Using Context ................................................................................................... 14
38
39
5.5
Message Assembly and Business Process Customisation Error! Bookmark not
defined.
40
5.6
Run Time Use of Context ..................................Error! Bookmark not defined.
41
5.7
How Users Understand Context.........................Error! Bookmark not defined.
42
5.8
Classification Models........................................................................................ 14
43
5.9
Compound Contexts.......................................................................................... 15
44
5.10
Temporal Aspects ..............................................Error! Bookmark not defined.
45
6
CONTEXTUALIZABLES ...................... ERROR! BOOKMARK NOT DEFINED.
46
7
CONTEXT GRAPHS ............................................................................................. 16
47
7.1
ContextGraphInformation ................................................................................. 17
48
7.2
ContextValue .................................................................................................... 18
49
50
7.2.1
7.3
ContextValueInformation ......................................................................... 18
ContextNode and ContextEdge......................................................................... 18
51
7.3.1
ContextNode ............................................................................................. 18
52
7.3.2
RootContextNode ..................................................................................... 21
53
7.3.3
LeafContextNode .......................................Error! Bookmark not defined.
54
7.3.4
ContextEdge .............................................................................................. 21
55
7.4
Context Path .......................................................Error! Bookmark not defined.
56
7.5
Contextualizables .............................................................................................. 22
57
58
7.5.1
7.6
ContextPath and Contextualizable .............Error! Bookmark not defined.
Parking Lot –......................................................Error! Bookmark not defined.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 4 of 36
UCM Draft A6
59
8
01 October 2009
UCM METAMODEL ............................................................................................. 32
60
8.1
Context Classification ........................................Error! Bookmark not defined.
61
8.2
Context Operands...............................................Error! Bookmark not defined.
62
8.3
USING Exclusions .............................................Error! Bookmark not defined.
63
64
9 CONTEXT GRAPH APPLICATION THROUGH SETSERROR! BOOKMARK
NOT DEFINED.
65
10
66
67
11
ASSIGNMENT OF CONTEXT TO BIES AND BDTS ERROR! BOOKMARK
NOT DEFINED.
68
69
12
IMPLEMENTATIONS AND OPEN ISSUES...... ERROR! BOOKMARK NOT
DEFINED.
70
13
71
COPYRIGHT STATEMENT ........................................................................................ 36
72
1 Status of this Document
73
74
75
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.
76
This document contains information to guide in interpretation or implementation.
77
Distribution of this document is limited to UCM Project teams.
78
79
This version: Unified Context Methodology Technical Specification, Version 1.0 Draft
A14 of 01 October 2009.
NOTATION .......................................... ERROR! BOOKMARK NOT DEFINED.
GLOSSARY......................................................................................................... 34
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 5 of 36
UCM Draft A26
26 January 2010
82
2 UN/CEFACT Unified Context Methodology
Technical Specification Project Team
Participants
83
84
We would like to recognize the following for their significant participation to the
development of this document.
85
Project Team Leader:
Scott Hinkelman, Oracle
86
Editors:
Pat O’Connor, Infor
80
81
87
Anthony Coates, Londata
88
Mark Crawford, SAP
89
Contributors:
90
Oyvind Assave, Nortella (at time of participation)
91
David Connelly, OAGi
92
Mark Crawford, SAP AG
93
Michael Rowell, Oracle
94
Gunther Stuhec, SAP AG
95
Nikola Stojanovic, RosettaNet
96
Jim Wilson, KCX
97
2.1 Disclaimer
98
99
100
101
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.
102
2.2
103
104
CCWG Chair: Mark Crawford, SAP, mark.crawford@sap.com
UCM Chair: Scott Hinkelman, Oracle, scott.hinkelman@oracle.com
Contact Information
105
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 6 of 36
UCM Draft A6
01 October 2009
106
3 Introduction
107
3.1 Summary of Contents of Document
108
109
3.2 Audience
110
111
112

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.
113

UN/CEFACT Forum participants.
114
115
116
117

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.
118
119
3.3 Related Documents
3.3.1 Documents:
120

UML 2.x.x
121

UMM Base Module 2.0
122

UMM Foundation Module 2.0
123

CCTS 3.0
124

DTC 3.0
125

UPCC 3.0
126
3.3.2 Normative References:
127

Chartand, Gary. Introductory Graph Theory, 1985
128
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 7 of 36
UCM Draft A26
26 January 2010
129
4 Objectives
130
4.1 Goals of the UCM Technical Specification
131
132
133
134
135
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.
136
137
Enable widespread software tooling to realize the promise of the UN/CEFACT common
methodology standards stack.
138
4.2 Requirements
139
140
To ensure this specification meets its intended audience’s needs, it satisfies the following
requirements:
141

Defines context concepts in terms of CCTS artifacts
142

Supports migration of existing CCTS based context methodologies
143

Defines a usable metamodel
144
145

Defines a methodology for defining, extending, restricting and managing context
values
146
147

Defines a methodology for defining, extending, restricting and managing
groupings of context values
148
149

Defines a methodology for defining, extending, restricting and managing
relationships between context values
150

Defines a methodology for managing and applying context values at design time
151
152

Defines the relationships between context values and lists and schemes of context
values
153

Defines rules for creating and using lists and schemes of context values
154

Supports multi-parent hierarchies
155

Support multiple context values in groupings of business information
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 8 of 36
UCM Draft A6
01 October 2009
156
4.3 Caveats and Assumptions
157
158
159
160
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.
161

We assume the reader has a familiarity with the OMG UML.
162
163

We assume the reader has a familiarity with mathematical graph theory,
especially Directed Acyclic Graphs.
164

We assume the reader has a familiarity with set theory
165
4.4 Guiding Principles
166
167
In order to maximize the usefulness of this specification, the following guiding principles
have been adhered to:
168
169

UCM will minimize dependencies on specific implementation technologies and
other specifications.
170

UCM will be cohesive with related UN/CEFACT standards.
171

UCM will not limit the sources and uses of context.
172
173

UCM will be based on existing standards and scientific and mathematical
principles.
Conformance
174
4.5
175
176
177
178
179
180
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.
181
182
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 9 of 36
UCM Draft A6
183
184
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 10 of 36
UCM Draft A26
26 January 2010
185
5 Overview
186
187
188
189
190
191
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.
192
193
194
195
196
197
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.
198
199
200
201
202
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.
203
5.1 Core Components and Business Information Entities
204
205
206
207
208
209
210
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.
211
212
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 11 of 36
UCM Draft A6
01 October 2009
213
214
215
216
217
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.
218
219
220
221
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.
222
5.2 Graph Theory
223
224
225
226
227
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.
228
229
230
231
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.
232
5.2.1 Mathematical Directed Acyclic Graph
233
234
235
236
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.
237
238
239
240
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.
241
242
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).
243
Throughout the rest of this document the term node will be used for a vertex.
244
5.2.2 Notations
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 12 of 36
UCM Draft A6
01 October 2009
245
246
247
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.
248
Notations for a mathematical DAG are the primary notations used in this specification.
249
A node is represented by ellipse:
250
251
252
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.
253
254
255
256
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
257
258
5.2.3 Key DAG Concepts
2
1
3
4
5
6
7
8
259
260
261
262
263
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 13 of 36
UCM Draft A6
01 October 2009
264
265
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.
266
267
268
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.
269
5.3 CCTS Classic Context
270
271
272
273
274
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.
275
5.4 Context DAGs
276
277
278
279
280
281
282
283
284
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).
285
5.5 Business Context
286
Definition – Business Context
287
Business Context is an organized collection of context values.
288
289
290
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.
291
5.6 Classification Models
292
293
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 14 of 36
UCM Draft A6
01 October 2009
294
295
296
297
298
299
300
301
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.
302
5.7 Expressing Context Using a Mathematical Graph
303
304
305
306
307
308
309
310
311
312
313
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.
314
The foundation of this specification is a mathematical graph.
315
316
317
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.
318
319
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 15 of 36
UCM Draft A26
26 January 2010
320
6 Context Graphs
321
322
323
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.
324
Definition – ContextGraph
325
326
A ContextGraph is the organization of possible values used to identify specific
business circumstances. A ContextGraph is a Directed Acyclic Graph.
ContextEdge
1
*
*
ContextGraph
2
1
ContextNode
1..*
ContextValue
1
RootContextNode
1
Code
Identifier
327
328
Figure 6-1. ContextNode
329
Note –
330
331
This specification utilizes UML to sketch the concepts where useful to facilitate
the discussion. Unless otherwise specified, these sketches are informative.
332
333
334
335
[Ed Note – Add Graph Metadata class that consists of – ContextGraphAgencyIdentifier
(1..1), ContextGraphVersionIdentifier (1..1), ContextGraphIdentifier (1..1),
ContextGraphName (0..1), ContextGraphAgencyName (0..1), ContextGraphDescription
(0..1).
336
337
A ContextGraph consists of ContextGraphInformation, ContextNodes, and possibly
ContextEdges.
[R XXX]

A ContextGraph MUST have one ContextGraphInformation
1
[R XXX]

A ContextGraph MUST have one or more ContextGraphNode
1
[R XXX]

A ContextGraph MUST have zero or more ContextGraphEdge
1
338
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 16 of 36
UCM Draft A6
01 October 2009
339
6.1 ContextGraph Information
340
ContextGraph information provides unique information about the entire graph.
341
Definition – ContextGraphIdentifier
342
A ContextGraphIdentifier uniquely identifies a ContextGraph.
343
[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
344
345
The ContextGraph Identifier URN scheme MUST use the following pattern:
URN:
urn:<organization>:<org hierarchy>[:<org
hierarchy level>]*:context:<major>:<status>
Where:
[R 8E2D]

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.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
3
Page 17 of 36
UCM Draft A6
01 October 2009
[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
ContextGraphVersionDates
[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
[R XXX]
The ContextGraphInformation MUST have zero or one
ContextGraphAgencyName
1
[R XXX]
The ContextGraphInformation MUST have zero or one
ContextGraphDescription
1
1
1
346
347
348
349
350
351
352
6.2 ContextNode
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 18 of 36
UCM Draft A6
01 October 2009
ContextValue
ContextNode
+ContextNodeIdentifier
1
1
+Value
+Name
+Definition
*
1
Scheme Or List
+Agency Identifier
+Identifier
+Modification Allowed Indicator
+Version Identifier
354
355
Figure 6.3. ContextNode
356
[Ed. Note – update figure to reflect correct names and attributes]
357
358
ContextNodes contain the ContextValues in a ContextGraph. ContextNodes are
organized through the use of ContextEdges.
359
[Ed. Note – Insert link for ContextEdge to Section 6.3]
360
Definition – ContextNode
361
A ContextNode is a node in a ContextGraph
362
363
A ContextGraph uses globally unique identifiers for each node. Globally unique
identifier schemes include:
364

UUID
365

URI
[R XXX]
366
367
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
368
369
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 19 of 36
UCM Draft A6
01 October 2009
372
6.2.1 ContextNodeInformation
373
374
375
376
Each ContextNode in a ContextGraph will be uniquely identifiable within that
ContextGraph through an assigned ContextNodeIdentifier. The ContextNodeIdentifier
must be consistent with the identifier scheme identified in the ContextGraph.
[R XXX]
Each ContextNode MUST have a ContextNodeIdentifier.
377
6.2.2 ContextValue
378
Definition – ContextValue
379
380
A ContextValue contains a value taken from a scheme or list and it includes the
identifier of its source scheme or list.
381
Each ContextNode has a ContextValue
[R XXX]
The ContextNode MUST have exactly one ContextValue
1
1
The ContextValue MUST have the following properties:
[R XXX]

Value (1..1) – Value taken from a scheme or list

Name (0..1) – Semantically meaningful name for the value

Definition(0..1) – Explanation of the meaning of the value
1
Stopping point on 1/26/10
[R XXX]
[R XXX]
382
A ContextValue MUST occur at most once as a child of its parents and
ancestors.
A scheme or list MUST only provide values to ContextNodes with the same
ContextRootNode in any given ContextGraph.
1
1
6.2.3 ContextValueInformation
383
[R XXX]
A ContextValue MUST identify its source scheme or list using an ID,
AgencyID and VersionID.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
1
Page 20 of 36
UCM Draft A6
01 October 2009
384
6.3 ContextRootNode
385
386
A ContextNode may have multiple parent ContextNodes. However, a ContextNode at
any level in the graph will only have at most one ancestor ContextRootNode.
387
Definition – ContextRootNode
388
389
A ContextRootNode is a ContextNode that is not a target ContextNode of any
ContextEdge.
390
391
A ContextNode is either a ContextRootNode or directly or indirectly connected to a
ContextRootNode.
[R XXX]
A ContextNode which is not a ContextRootNode MUST only be connected
1
to one ancestor ContextRootNode.
392
393
394
A RootContextNode ContextValue provides the least precise level of semantics
within a ContextGraph.
395
Definition – RootContextNode
396
A ContextNode with zero incoming ContextEdges
397
[R XXX]
A ContextGraph MUST contain one or more RootContextNodes.
1
398
399
400
401
RootContextNodes are intended as separate concepts. Two RootContextNodes in any
given ContextGraph will never be a generic expression of, an instance of, or a whole/part
relation of, each other.
402
[R XXX]
403
A RootContextNode MUST be orthogonal to all other RootContextNodes in
any given ContextGraph.
1
6.3.1 ContextEdge
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 21 of 36
UCM Draft A6
01 October 2009
404
Definition – ContextEdge
405
A ContextEdge is an ordered pair of ContextNodes.
406
407
A ContextEdge includes of a Source ContextNode information and a Target ContextNode
information.
[R XXX]
The ContextNode information must include the ID of the ContextGraph and
the ID of the ContextNode.
1
408
409
410
411
412
413
414
The order semantics are defined by the nature of the relationship between the
ContextNode pair. Possible relationship types include, but are not limited to, type of and
aggregation/composition (i.e., part of). In UCM, a Source ContextNode is the
ContextNode in a ContextEdge that is reached earlier in the directed collection of
ContextNodes. In UCM, a Target ContextNode is the ContextNode in a ContextEdge that
is accessed through the Source ContextNode
415
416
A ContextGraph may or may not contain all possible context values used to express a
given business context.
417
418
419
Where necessary a ContextGraph may be associated with another ContextGraph to
express the complete set of values necessary for a given context. When implemented, the
ContextGraphs will be linked using one or more ContextEdges.
420
421
422
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]
A ContextEdge must contain at least one ContextNode that is in the same
ContextGraph as the ContextEdge itself.
[R XXX]
All rules that apply to a ContextGraph must be observed by all ContextEdges
1
when graphs are linked.
1
423
424
Child ContextNodes are those ContextNodes that are not ContextRootNodes.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 22 of 36
UCM Draft A6
01 October 2009
425
426
A child ContextNode represents a hierarchical relationship to its parent ContextNode and
ancestor ContextNode.
427
428
429
The child ContextNode ContextValue represents a narrowed relationship – a generic
expression of, an instance of, or a whole/part relation of – the parent ContextNode’s
ContextValue.
[R XXX]
All child ContextNodes of a ContextRootNode MUST represent a
hierarchical relationship between the ContextNodes wherein the child
ContextNode’s ContextValue represents a generic expression of, an instance
of, or a whole/part relation of, the parent ContextNode’s ContextValue.
2
430
431
432
7 Linking ContextGraphs
433
In certain circumstances, an
434
435
436
437
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.
438
8 Context Expressions and Logic
439
8.1 Context Clauses
440
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
441
442
Figure 7-1. Context Expression UML.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 23 of 36
UCM Draft A6
01 October 2009
443
Definition – ContextClause
444
445
A ContextClause is an expression that can be resolved to a set of
ContextNodes within a ContextGraph or multiple linked ContextGraphs.
446
447
There are two concrete types of ContextClauses – SimpleContextClause and
CompoundContextClause.
448
Defintition – SimpleContextClause
449
450
451
A SimpleContextClause is a ContextClause with one predicate and one
ContextNodeIdentifier that resolves to a set of ContextValues which may be an
empty set.
452
[R XXX]
A SimpleContextClause MUST have the following lexical notation:
<predicate><ContextNode ID>.
1
453
454
Definition – CompoundContextClause
455
456
457
A CompoundContextClause is a ContextClause with two (referred to as “left” and
“right”) ContextClauses (either SimpleContextClause or
CompoundContextClause) and one operand.
458
[R XXX]
A CompoundContextClause MUST have the following lexical notation:
(<ContextClause>)<operand>(<ContextClause>).
1
459
460
461
A ContextExpression contains a single ContextClause. A ContextExpression also
contains the ID and version of the ContextGraph to which it refers.
462
Definition – ContextExpression
463
464
A ContextExpression associates a single ContextClause to a specific version of
a ContextGraph.
465
[R XXX]
A ContextExpression MUST contain a single ContextClause and the ID and
version of the ContextGraph it references.
1
466
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 24 of 36
UCM Draft A6
01 October 2009
A ContextExpression MUST have the following lexical notation:
[R XXX]
[<ContextGraph URI>”,”<ContextGraph version>”,”<ContextClause>]
1
467
468
8.1.1 Predicates
469
Allowed predicates and their meaning (with notation):
470
471
472

= (Equal to) – used to return the set of ContextValues where the
ContextNodeIdentifierof the ContextNode in the ContextGraph is the
ContextNodeIdentifierin the clause.
473
474
475

!= (Not equal to) – returns the set of ContextValues for all ContextNodes
where the ContextNodeIdentifieris not the ContextNodeIdentifierfrom the
clause.
476
477
478

> (Greater than) – returns the set of ContextValues for all ContextNodes
that are ancestors of the ContextNode identified by the
ContextNodeIdentifierfrom the clause.
479
480
481

< (Less than) - returns the set of ContextValues for all ContextNodes that
are descendants of the ContextNode identified by the
ContextNodeIdentifierfrom the clause.
482
483

>= (Greater than or equal to) – returns the set of ContextValues return by
both the ‘Greater than’ and ‘Equal to’ predicates.
484
485

<= (Less than or equal to) – returns the set of ContextValues return by
both the ‘Less than’ and ‘Equal to’ predicates.
486
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
487
488
8.1.2 Operands
489
Allowed operands and their meaning (with notation):
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 25 of 36
UCM Draft A6
01 October 2009
490
491

&& (Intersection) – returns the set of ContextValues that are common to
the result sets from both of the component clauses.
492
493

|| (Union) – returns the set of ContextValues that are in either or both of
the result sets from the two component clauses.
494
495
496

! (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).
497
[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
498
499
8.2 Assigned Context and Contextualized
500
Definition – Contextualizable
501
502
A contextualizable is an object whose properties can be modified to meet a
particular business circumstance.
503
504
505
506
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.
507
508
509
510
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.
511
Definition - Contextualized
512
513
A contextualized is a Contextualizable which has had context assigned through
association with a ContextExpression
514
A Contextualized is the result of applying a classification scheme to a contextualizable
515
516
Assigning context is accomplished by defining a ContextExpression who’s
ContextClause can be resolved to zero or more ContextValues as a set through
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 26 of 36
UCM Draft A6
517
518
01 October 2009
processing, and specifying (assigning) the ContextExpression as an intrinsic part of the
Contextualized.
Contextualized
+ContextExpression
«BIE»
519
Figure 7-2. Contextualized UML
520
[R XXX]
Contextualized MUST contain one or more ContextExpressions.
1
521
D
B
E
C
F
A
I
H
G
J
522
523
524
Figure 7-3. DAG example identified by urn:un:unece:uncefact:context:draft:20091001682ba7e31f26
version 1.0
525
Note -
526
527
528
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.
529
8.2.1 Predicates
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 27 of 36
UCM Draft A6
530
531
532
533
01 October 2009
The allowed predicates and their definitions within a SimpleContextClause when
assigning context using the Context Graph in Figure 8-3:

= (Equal to) - The Contextualized is associated with the ContecxtValue of the
ContextNode with the ContextNode ID.
534
535
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNodeIdentifier C:
536
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(=,C)]
537
538

> (Greater than) - The Contextualized is associated with all ContextValues of all
ancestor ContextNodes of the ContextNode with the ContextNode ID.
539
540
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs A,B,G:
541
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(>,H)]
542
543

< (Less than) - The Contextualized is associated with all ContextValues of all
descendants ContextNodes of the ContextNode with the ContextNode ID.
544
545
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs I,J:
546
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(<,H)]
547
548
549

>= (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.
550
551
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs A,B,G,H:
552
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(>=,H)]
553
554
555

<= (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.
556
557
The following ContextExpression with a SimpleContextClause indicates that the
Contextualized is assigned with the ContextValues of ContextNode IDs H,I,J:
558
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,(<=,H)]
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 28 of 36
UCM Draft A6
01 October 2009
559
8.2.2 Operands
560
561
The allowed operands of a CompoundContextClause when assigning context using the
Context Graph in Figure 8-3:
562
563

&& (Intersection) - The Contextualized is associated with all of the
ContextValues which are common to the two ContextClauses.
564
565
The following ContextExpression with a CompoundContextClause indicates that
the Contextualized is assigned with the ContextValues of ContextNode IDs H:
566
567
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,
((=,H)&&(<=,B))]
568
569

|| (Union) - The Contextualized is associated with all ContextValues specified in
the two ContextClauses.
570
571
572
The following ContextExpression with a CompoundContextClause indicates that
the Contextualized is assigned with the ContextValues of ContextNode IDs
H,C,D,E,F:
573
[urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,((=,H)||(<=,C))]
574
575
576

! (Exclusion) - The Contextualized is associated with all ContextValues specified
in the first ContextClause minus the ContextValues specified in the second
ContextClause.
577
578
579
The following ContextExpression with a CompoundContextClause indicates that
the Contextualized is assigned with the ContextValues of ContextNode IDs
C,E,F:
580
[Urn:un:unece:uncefact:context:draft:20091001682ba7e31f26,1.0,((<=,C)!(=D))]
581
8.3 Applying Context
582
583
584
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.
585
586
587
588
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
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 29 of 36
UCM Draft A6
01 October 2009
589
590
Contextualized to return the set of all Contextualized that is assigned any of the returned
ContextValues.
591
8.3.1 Predicates
592
The allowed predicates of a SimpleContextClause when applying context:
593
594

= (Equal to) - The set of Contextualized which are associated with the
ContextValue of the ContextNode with the ContextNode ID.
595
596

!= (Not Equal to) - The set of Contextualized which are not associated with the
ContextValue of the ContextNode ID.
597
598

> (Greater than) - The set of Contextualized which are associated with all
ContextValues of all ancestor ContextNodes of the ContextNode ID.
599
600

< (Less than) - The set of Contextualized which are associated with all
ContextValues of all child ContextNodes of the ContextNode ID.
601
602
603

>= (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.
604
605
606

<= (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.
607
8.3.2 Operands
608
The allowed operands of a CompoundContextClause when applying context:
609
610

&& (Intersection) - The set of Contextualized which are members of both sets of
resolved Contextualized from the two ContextClauses.
611
612

|| (Union) - The set of Contextualized which are members of either set of resolved
Contextualized from the two ContextClauses.
613
614
615

! (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.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 30 of 36
UCM Draft A6
616
01 October 2009
8.4 Example Implementation
D
B
E
C
F
A
I
H
G
J
617
618
619
Figure 7-4. DAG example identified by urn:un:unece:uncefact:context:draft:20091001682ba7e31f26
version 1.0
620
621
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.
622
623
624
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
625
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
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 31 of 36
UCM Draft A6
Applied
ContextClause
(=,A)
((=,A)!(=,B))
((=,A)&&(=,B))
((=,I)||(=,J))
01 October 2009
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,
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.
626
Table 7-6. Results of Applying Context
627
9 UCM Metamodel
628
Figure 8-1 defines the Context Methodology Model.
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 32 of 36
UCM Draft A6
629
630
01 October 2009
Figure 8-1: Merged Context Methodology Metamodel
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 33 of 36
UCM Draft A26
26 January 2010
631
10 Glossary
632
Context Methodology – already in the document
633
634
Classification Scheme – TBD
635
636
Modeling dimension - TBD
637
638
Semantic Modeling – TBD
639
640
Type/Value-Domain – TBD
641
642
BIE/BDT Contextualized Profile – wait for Gunther
643
644
Classification - distinguish it from other more generic meanings of it, to be discussed in the con call
645
646
Payload – TBD
647
648
Contextual Instance Payload - TBD
649
650
651
652
Profile definitions:
653
654
655
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 34 of 36
UCM Draft A6
01 October 2009
656
657
658
ClassificationArea – space appropriate for classifying business information; change
to ContextCategory for now.
659
660
Classifiable – TBD
661
662
663
Merged Model definitions:
664
665
Business Context – use current definition from the CCTS spec
666
667
Context – use the definition from current Tony’s latest version of the UCM spec
668
669
Context Category – use current definition from the CCTS spec
UN/CEFACT Context Methodology Technical Specification
Copyright © UN/CEFACT 2009
. All Rights Reserved.
Page 35 of 36
UCM Draft A26
670
26 January 2010
Copyright Statement
671
Copyright © UN/CEFACT 2009. All Rights Reserved.
672
673
674
675
676
677
678
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.
679
680
The limited permissions granted above are perpetual and will not be revoked by
UN/CEFACT or its successors or assigns.
681
682
683
684
685
686
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 36 of 36