UCM Draft A41 3 November 2010 3 UN/CEFACT UN/CEFACT Context Methodology Technical Specification 4 Working Draft 5 Revision [A41] 6 [3 November 2010] 1 2 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2010 . All Rights Reserved. Page 1 of 49 UCM Draft A41 7 3 November 2010 ABSTRACT 8 9 10 11 12 13 The UN/CEFACT Context Methodology is based on the unique design of organized metadata from authoritative sources, placing the organizational aspects of information into its metadata -metadata is what is organized. The methodology recognizes that establish and authoritative values already exist in industry which are well understood, such as codes and identifiers, and organizing such values from multiple sources results in contextual metadata. 14 15 16 17 Assignment of specific parts of the organization to information results in specifying its context, or its relevancy, within the organized metadata structure of values. A collection of information with assigned context as metadata, can be filtered by specifying parts of the organization, resulting in the exact information needed for a given usage. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2010 . All Rights Reserved. Page 2 of 49 UCM Draft A41 18 3 November 2010 Table of Contents 19 20 1 STATUS OF THIS DOCUMENT ........................................................................... 6 21 22 2 UN/CEFACT CONTEXT METHODOLOGY TECHNICAL SPECIFICATION PROJECT TEAM PARTICIPANTS ............................................. 7 23 2.1 Disclaimer ........................................................................................................... 7 24 2.2 Contact Information ............................................................................................ 7 25 3 INTRODUCTION..................................................................................................... 8 26 3.1 Summary of Contents of Document ................................................................... 8 27 3.2 Audience ............................................................................................................. 8 28 3.3 Related Documents ............................................................................................. 8 29 3.3.1 Documents: ................................................................................................. 8 30 3.3.2 Normative References:................................................................................ 8 31 4 OBJECTIVES ........................................................................................................... 9 32 4.1 Goals of the UCM Technical Specification ........................................................ 9 33 4.2 Requirements ...................................................................................................... 9 34 4.3 Caveats and Assumptions ................................................................................... 9 35 4.4 Guiding Principles ............................................................................................ 10 36 4.5 Conformance ..................................................................................................... 10 37 5 OVERVIEW ............................................................................................................ 12 38 5.1 Core Components and Business Information Entities ...................................... 12 39 40 41 42 43 5.2 It is the BIE layer of CCTS which leverages context to define the specific business circumstances for each BIE definition. In doing so, it is possible to determine which BIEs are exactly relevant for a given business circumstance (such as a message for a specific industry in a specific geopolitical region). UCM is intended to provide the robust methodology supporting CCTS. .................................................................. 13 44 5.3 UCM ................................................................................................................. 13 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2010 . All Rights Reserved. Page 3 of 49 UCM Draft A6 45 5.3.1 46 5.4 01 October 2009 Expressing Context Using a Mathematical Graph ........................................ 13 Graph Theory .................................................................................................... 14 47 5.4.1 Directed Acyclic Graph ............................................................................ 14 48 5.4.2 Notations ................................................................................................... 14 49 5.4.3 Key DAG Concepts .................................................................................. 15 50 5.5 ContextGraphs .................................................................................................. 15 51 5.6 Business Context............................................................................................... 16 52 6 53 CONTEXT GRAPHS ............................................................................................. 16 6.1 ContextNode ..................................................................................................... 19 ContextNode + + + + Scheme Or List ContextNodeIdentifier: String ContextValue: String 0..* ContextValueName: String [0..1] ContextValueDefinition: String [0..1] +Source + 1 + + Identifier: String VersionIdentifier: String AgencyIdentifier: String 54 55 ....................................................................................................................................... 19 56 Figure 6.3. ContextNode ........................................................................................... 19 57 6.1.1 ContextValue ............................................................................................ 19 58 7.1.1 ContextNode Scheme or List .................................................................... 20 59 60 The ContextValue will be taken from a code list or identifier scheme and must be clearly identified as to its owning agency, version, and unique identifier. ............... 20 61 7.2 ContextRootNode ............................................................................................. 21 62 7.3 ContextEdge ...................................................................................................... 21 63 8 CONTEXT EXPRESSION .................................................................................... 23 64 8.1 Context Expression ........................................................................................... 23 65 8.2 Context Clause .................................................................................................. 24 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 4 of 49 UCM Draft A6 01 October 2009 66 8.2.1 Predicates .................................................................................................. 25 67 8.2.2 Operand ..................................................................................................... 26 68 9 BUSINESS CONTEXT FRAMEWORK .............................................................. 28 69 9.1 Contextualized Hierarchy ................................................................................. 29 70 9.2 Definition - UnionContextualized..................................................................... 30 71 9.3 Contextualized Hierarchy Applied to CCTS BIEs ........................................... 30 72 73 74 75 9.3.1 9.4 Application of Context.............................................................................. 31 Example Implementation .................................................................................. 31 USING CCTS WITH THE BUSINESS CONTEXT FRAMEWORK – EXAMPLE ........................................................................................................................................... 34 76 1.1 Set-up ................................................................................................................ 34 77 1.2 Example using CCTS ........................................................................................ 36 78 1.2.1 Applying a Message Context .................................................................... 45 79 80 81 82 83 84 85 The example so far has shown context as it is assigned and calculated within a BIE library, such an UN/CEFACT’s Core Component Library (CCL). BIEs from a library are assembled to produce message payloads. However, the message payloads may be more general-purpose that are required by a particular community of users. For example, a message payload designed for use through the European Union might contain more fields than are required (or appropriate) when that message payload is used within a single country, e.g. Austria. ................................ 45 86 87 88 89 90 91 92 A general purpose message payload may be customised for a specific usage context by applying a message context to it. An “applied context” is a context expression that is intersected with the context of every BIE in a message payload. For every BIE, the “resultant context” of the BIE is the intersection of the BIEs overall context and the applied context. If the resultant context of any BIE is null, that BIE is excluded from the customised message, i.e. it is not used in the customised message. ................................................................................................................................... 45 93 94 95 Suppose that the above ABIE is to be used in a message payload that is only for Austria, i.e. the applied context is “<=AT”. Intersecting this context with the above example gives............................................................................................................ 45 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 5 of 49 UCM Draft A6 01 October 2009 96 97 When the BIEs with a null resultant context are removed, what is left is the relevant part of the ABIE, with only the BIEs that are relevant for the applied context. ....... 48 98 COPYRIGHT STATEMENT ........................................................................................ 49 99 1 Status of this Document 100 101 102 This Technical Specification is being developed in accordance with the UN/CEFACT Trade R650R4 Open Development Process for Technical Specifications. The Context Methodology Project Team is developing it for internal review. 103 This document contains information to guide in interpretation or implementation. 104 Distribution of this document is limited to UCM Project teams. 105 106 This version: Context Methodology Technical Specification, Version 1.0 Draft A14 of 01 October 2009. 107 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 6 of 49 UCM Draft A41 3 November 2010 109 2 UN/CEFACT Context Methodology Technical Specification Project Team Participants 110 The following individuals contributed to this document's development. 111 Project Team Leader: Scott Hinkelman, Oracle 112 Editors: Pat O’Connor, Infor 108 113 114 Anthony Coates, Londata Contributors: 115 Oyvind Assave, Nortella 116 David Connelly, OAGi 117 Michael Rowell, Oracle 118 Nikola Stojanovic, RosettaNet 119 Jim Wilson, KCX 120 2.1 Disclaimer 121 122 123 124 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. 125 2.2 126 127 CCWG Chair: Mark Crawford, SAP, mark.crawford@sap.com UCM Chair: Scott Hinkelman, Oracle, scott.hinkelman@oracle.com Contact Information 128 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2010 . All Rights Reserved. Page 7 of 49 UCM Draft A6 01 October 2009 129 3 Introduction 130 3.1 Summary of Contents of Document 131 132 3.2 Audience 133 134 135 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. 136 137 138 139 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. 140 141 3.3 Related Documents 3.3.1 Documents: 142 UML 2.x.x 143 UMM Base Module 2.0 144 UMM Foundation Module 2.0 145 NDR 146 CCTS 3.0 147 DTC 3.0 148 UPCC 3.0 149 3.3.2 Normative References: 150 Chartand, Gary. Introductory Graph Theory, 1985 151 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 8 of 49 UCM Draft A41 3 November 2010 152 4 Objectives 153 4.1 Goals of the UCM Technical Specification 154 155 156 157 The goal of this specification is to deliver a methodology for developing and using business context to support UN/CEFACT Core Components Technical Specification, Data Type Catalogue, UML Profile for Core Components, and XML Naming and Design Rules; and similar standards for defining and using business information. 158 159 Enable widespread software tooling to realize the promise of the UN/CEFACT common methodology standards stack. 160 4.2 Requirements 161 162 To ensure this specification meets its intended audience’s needs, it satisfies the following requirements: 163 Defines the application of context concepts in terms of CCTS artifacts 164 Supports migration of existing CCTS based context methodologies 165 Defines a context methodology metamodel 166 167 Defines a methodology for defining, extending, restricting and managing context values 168 169 Defines a methodology for consistently identifying, organizing, expressing and assigning context values. 170 171 Defines rules for using code list codes and identifier scheme identifiers as authoritative sources of context values 172 173 Defines rules for creating an authoritative organization and expression of context values. 174 Supports multiple context categories 175 Supports different context value collections for a given entity 176 4.3 Caveats and Assumptions 177 178 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 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2010 . All Rights Reserved. Page 9 of 49 UCM Draft A6 179 180 01 October 2009 the UN/CEFACT common methodology standards stack – CCTS, CCL, DT Catalogue, UMM etc. 181 We assume the reader has a familiarity with the OMG UML. 182 183 We assume the reader has a familiarity with graph theory, especially Directed Acyclic Graphs. 184 We assume the reader has a familiarity with set theory 185 4.4 Guiding Principles 186 187 In order to maximize the usefulness of this specification, the following guiding principles have been adhered to: 188 189 UCM will minimize dependencies on specific implementation technologies and other specifications. 190 UCM will be cohesive with related UN/CEFACT standards. 191 UCM will not limit the sources and uses of context. 192 193 UCM will be based on existing standards and scientific and mathematical principles. 194 UCM will not specify authoritative sources or values. Conformance 195 4.5 196 197 198 199 200 201 Designers in governments, private sector, and other standards organizations external to the UN/CEFACT community have found this specification suitable for adoption. To promote 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. 202 203 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. 204 205 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. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 10 of 49 UCM Draft A6 01 October 2009 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 49 UCM Draft A41 3 November 2010 206 5 Overview 207 208 209 210 211 212 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. 213 214 215 216 217 218 219 In building a context model, it is necessary to have a common 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. For the purposes of this document, context is metadata that defines the 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. 220 221 222 223 224 225 226 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 using context values. A specific collection of context values can be thought of as a context category which can be used to express a specific business circumstance, such as geography or industry. A context category is a group of one or more unordered values used to express a characteristic of a business circumstance. 227 5.1 Core Components and Business Information Entities 228 229 230 231 232 233 234 The Core Components Technical Specification (CCTS) defines two key concepts – Core Components (CCs) and Business Information Entities (BIEs). Core Components 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 represent logical data model components in a given business context and can be used as business-specific message components. Each BIE is derived by restriction from a CC1. 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 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2010 . All Rights Reserved. Page 12 of 49 UCM Draft A6 235 236 237 238 239 01 October 2009 5.2 It is the BIE layer of CCTS which leverages context to define the specific business circumstances for each BIE definition. In doing so, it is possible to determine which BIEs are exactly relevant for a given business circumstance (such as a message for a specific industry in a specific geopolitical region). UCM is intended to provide the robust methodology supporting CCTS. 240 241 242 5.3 UCM UCM is comprised of a Context Graph, Context Grammar, and Context use. Context Value Organizations Context Expression ((~AT) || (~DE) || (~ZA)) && (~Banking) UCM Context Framework 243 244 5.3.1 Expressing Context Using a Mathematical Graph 245 246 247 248 249 250 251 252 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 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 13 of 49 UCM Draft A6 01 October 2009 253 254 255 context ‘Asia’ without ‘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’. 256 5.4 Graph Theory 257 258 259 260 261 UCM uses graph theory to define and express 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. 262 263 264 265 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. 266 5.4.1 Directed Acyclic Graph 267 268 269 270 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. This specification identifies and discusses the relevant base concepts of a DAG as its foundation. 271 272 273 274 A Directed Acyclic Graph is a specific form of a graph. In a DAG, vertices (or nodes) are directionally connected by edges 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. 275 276 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). 277 Throughout the rest of this document the term node will be used for a vertex. 278 5.4.2 Notations 279 This specification uses DAG notation. A node is represented by ellipse: 280 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 14 of 49 UCM Draft A6 281 282 283 01 October 2009 An edge is represented by an arrow which identifies the direction between nodes. The end of the arrow without the arrow head is the edge source and the end with the arrow head is the edge target. 284 285 286 287 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 288 289 5.4.3 Key DAG Concepts 2 1 3 4 5 6 7 8 290 291 292 293 294 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’. 295 296 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. 297 298 299 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. 300 5.5 ContextGraphs UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 15 of 49 UCM Draft A6 01 October 2009 301 302 303 304 305 306 307 308 A ContextGraph is an organized collection of values. A ContextGraph 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 target 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. Context is specified through a context expression that is associated with a context graph and specific context values within it. The context describes the specific circumstance for the use of an object. (refer to Chapter 7 for information on contextualizable). 309 5.6 Business Context 310 Definition – Business Context 311 Business Context is an organized collection of context values. 312 313 314 The business context is assigned to a contextualizable whose applicability in a specific business circumstance is determined by the comparing its business context to the context of the transaction. 315 6 Context Graphs 316 317 318 319 320 321 All of this section is normative. In any case of interpretation resulting in contention, the rules are the authoritative statements. Supportive text and diagrams are intended to more fully express the intent of the rules. 322 323 324 Definition – ContextGraph A ContextGraph is a Directed Acyclic Graph (DAG) with organized values to enable normative expressions of business context. 325 326 327 A ContextGraph may or may not contain all possible context values used to express a given business context. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 16 of 49 UCM Draft A6 01 October 2009 328 329 Figure 6-1. ContextGraph 330 331 This specification utilizes UML to diagram concepts. Unless otherwise specified, these diagrams are informative. 332 333 A ContextGraph consists of a ContextGraphID, ContextGraph Version ID, ContextGraph Agency ID, ContextNodes, and possibly ContextEdges. 334 [Ed Note – insert hyperlinks above to the relevant sections] 335 [R XXX] A ContextGraph MUST have one or more ContextNode 1 [R XXX] A ContextGraph MUST have zero or more ContextEdge 1 A ContextGraphID uniquely identifies a ContextGraph. 336 [R XXX] The ContextGraph MUST have a ContextGraphID. 1 [R XXX] Once assigned, a ContextGraphID MUST never be changed or assigned to a 1 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 17 of 49 UCM Draft A6 01 October 2009 different ContextGraph. [R XXX] The ContextGraphID MUST be a URN as defined by IETF RFC 2141. 1 The ContextGraphID URN scheme MUST use the following pattern: URN: urn:<organization>:<org hierarchy>[:<org hierarchy level>]*:context:[UID] urn:un:unece:uncefact:context:adslfksadf 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. 3 [Ed Note – take NDR example and insert here] [R XXX] The ContextGraph MUST have a ContextGraphVersionID. 1 [R XXX] The ContextGraph Version ID MUST consist of a major and minor version number (add language from NDR regarding allowed values). 1 [R XXX] The ContextGraph MUST have a ContextGraph Agency ID (add language from NDR/CCTS about using the UN/CEFACT AID or when an agency doesn’t have an agency id.) 1 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 18 of 49 UCM Draft A6 337 01 October 2009 [R XXX] The ContextGraph MUST have zero or one ContextGraph Name 1 [R XXX] The ContextGraph MUST have zero or one ContextGraph Description 1 6.1 ContextNode ContextNode + + + + Scheme Or List ContextNodeIdentifier: String ContextValue: String 0..* ContextValueName: String [0..1] ContextValueDefinition: String [0..1] +Source + 1 + + Identifier: String VersionIdentifier: String AgencyIdentifier: String 338 339 Figure 6.3. ContextNode 340 341 342 ContextNodes identify a positional relationship in a ContextGraph between one context value and all other context values. Definition – ContextNode 343 344 A ContextNode is an indivisible object in a ContextGraph that is used to represent context values. 345 Each ContextNode is assigned a globally unique identifier. [R XXX] 346 347 348 A ContextNode MUST have one ContextNodeID 1 UN/CEFACT will use UUIDs. Other organizations are free to choose URI or any other scheme that guarantees global uniqueness. [R XXX] A ContextNodeID MUST be globally unique 1 [R XXX] A ContextNodeID MUST be a UUID 3 [R XXX] A ContextNode ID MUST be devoid of white space 1 6.1.1 ContextValue UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 19 of 49 UCM Draft A6 349 350 351 352 7 01 October 2009 As explained in Section 5, context defines the surroundings, circumstances, environment, background or settings that differentiate one object from another. A ContextValue is an atomic piece of knowledge from an authoritative source that represents one aspect of context. 353 354 Definition – ContextValue 355 356 357 A ContextValue is an atomic piece of knowledge from an authoritative source that represents surroundings, circumstances, environment, background or settings. 358 359 360 Each ContextNode contains metadata that points to a specific value from an authoritative source. The metadata will consist of a mandatory context value, and optional name and definition. 361 362 363 364 [R XXX] A ContextNode MUST have exactly one ContextValue 1 [R XXX] The ContextValues of all ContextNodes sharing the same ContextRootNode must be unique. 1 [R XXX] The ContextNode MUST have zero or one ContextValue Name 1 [R XXX] The ContextNode MUST have zero or one ContextValue Definition 1 7.1.1 ContextNode Scheme or List The ContextValue will be taken from a code list or identifier scheme and must be clearly identified as to its owning agency, version, and unique identifier. [R XXX] [R XXX] The ContextNode MUST have one Scheme or List The Scheme or List MUST have the following properties: ID (1..1) – UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. 1 1 Page 20 of 49 UCM Draft A6 [R XXX] 01 October 2009 VersionID (1..1) AgencyID (1..1) The ContextValue will be taken from a code list or identifier scheme and must be clearly identified as to its owning agency, version, and unique identifier. 365 7.2 ContextRootNode 366 367 A ContextRootNode is a special type of ContextNode. The ContextRootNode represents the categorization of a set of ContextNodes with related ContextValues. 368 Definition – ContextRootNode 369 370 A ContextRootNode is a ContextNode that is not a target ContextNode of any ContextEdge. 1 371 [R XXX] 372 373 374 A ContextRootNode must have zero parent ContextNodes. ?? [ED Note – we agreed on 6/24 that we would use ancestor, parent, child for node discussions that are not related to edges, and source and target for edge discussions. The model talks about the edge points being source and target as possible roles for the node. [R XXX] A ContextGraph MUST contain one or more ContextRootNodes. 375 7.3 ContextEdge 376 377 378 379 380 381 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 starting ContextNode of a ContextEdge. A target ContextNode is the finishing ContextNode of a ContextEdge. 382 383 A ContextNode can be a source or target ContextNode. A source ContextNode can be either a ContextRootNode or a target ContextNode of another source ContextNode. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. 1 Page 21 of 49 UCM Draft A6 01 October 2009 384 Definition – ContextEdge 385 386 A ContextEdge is a directed relationship between a source ContextNode and target ContextNode. 387 388 389 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. 390 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 22 of 49 UCM Draft A6 01 October 2009 391 8 Context Expression 392 393 394 395 A ContextExpression is used to identify particular sets of ContextNodes in a ContextGraph. The ContextExpression represents a business context. A ContextExpression is defined using the UCM Context Expression Grammar (CEG). The CEG consists of defined predicates and operands. 396 8.1 Context Expression 397 398 Figure 7-1 is a UML representation of a Context Expression. ContextExpression 0..* + + 1 «abstract» ContextClause SimpleContextClause ContextExpressionID: String ContextExpressionVersionID: String + Predicate: PredicateKind 0..* 2 {ordered} 0..* 1 0..* 1 ContextGraph «enumeration» OperatorKind CompoundContextClause + «enumeration» PredicateKind = != > < >= <= ContextNode Operator: OperatorKind && || ! 399 400 Figure 7-1. ContextExpression 401 Definition – ContextExpression 402 403 404 A ContextExpression is the identification of a set of context nodes that can be resolved to ContextValues that together represent a specific context. 405 The ContextExpression will point to the ContextGraph to which it applies. 406 407 [R XXX] A ContextExpression MUST contain the ID of the ContextGraph to which it applies. 1 [R XXX] A ContextExpression MUST contain the version of the ContextGraph to which it applies. 1 A ContextExpression contains a globally unique identifier that distinguishes it from all other ContextExpressions UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 23 of 49 UCM Draft A6 408 [R XXX] A ContextExpressionID MUST be globally unique 1 [R XXX] A ContextExpressionID MUST be a UUID 3 A ContextExpression has a version number. [R XXX] 409 A ContextExpression MUST have a VersionID. 1 A ContextExpression has a single ContextClause. [R XXX] 410 411 01 October 2009 A ContextExpression MUST have a single ContextClause 1 The ContextExpression lexical notation contains the ContextGraphID, ContextGraph VersionID, and ContextClause in that order with a space character between each. A ContextExpression MUST have the following lexical notation: [R XXX] <ContextExpressionID><spacecharacter><ContextGraphID 1 ><spacecharacter><ContextGraphversion><spacecharacter><Contex tClause> 412 8.2 Context Clause 413 414 415 A ContextClause is the normative expression of a specific set of ContextNodeIDs that represent ContextValues. The set of ContextValues represented by a ContextClause define a unique business context. 416 Definition – ContextClause 417 418 419 A ContextClause is the part of a ContextExpression that can be resolved into a set of one or more ContextNodes, each of which has a ContextValue. 420 421 422 There are two types of ContextClauses – SimpleContextClause and CompoundContextClause. [R XXX] A ContextClause Must be a SimpleContextClause or a CompoundContextClause UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. 1 Page 24 of 49 UCM Draft A6 01 October 2009 423 Definition – SimpleContextClause 424 425 A SimpleContextClause is a ContextClause with one predicate and one ContextNodeID. A SimpleContextClause MUST have the following lexical notation: <predicate><spacecharacter><ContextNodeID> [R XXX] 426 Definition – CompoundContextClause 427 428 A CompoundContextClause is a ContextClause with two ordered ContextClauses and one operand. A CompoundContextClause MUST have the following lexical notation: (<SimpleContextClause|CompoundContextClause>)<operator>(<SimpleCon textClause|CompoundContextClause>) [R XXX] 429 8.2.1 Predicates 430 431 432 433 434 435 Predicates are used within SimpleContextClauses to define matching of ContextNodes. A SimpleContextClause contains a ContextNodeID, referred to hereafter as “the specified ContextNodeID”. The ContextNode whose (unique) ContextNodeID is contained in the SimpleContextClause is referred to hereafter as “the specified ContextNode”. A predicate is a function that compares some given ContextNode to the specified ContextNode and returns a boolean result. 436 Allowed predicates and their meaning (with notation): Predicate Short Name Meaning = Equal to True if the given ContextNode has the same ContextNodeID as the specified ContextNode. False otherwise. != Not equal to True if the given ContextNode does not have the same ContextNodeID as the specified ContextNode. False otherwise. > Greater than True if the given ContextNode is an ancestor of, but not equal to, the specified ContextNode. False otherwise. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. 1 1 Page 25 of 49 UCM Draft A6 01 October 2009 Predicate Short Name Meaning < Less than >= Greater than or equal to True if the given ContextNode is an ancestor of, or equal to, the specified ContextNode. False otherwise False otherwise. <= Less than or equal to True if the given ContextNode is a descendant of, or equal to, the specified ContextNode. False otherwise. ~ Less than, greater than, or equal to True if the given ContextNode is an ancestor of, descendant of, or equal to the specified ContextNode. False otherwise. True if the given ContextNode is a descendant of, but not equal to, the specified ContextNode. False otherwise. 437 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 to, <= is Less than or equal to, and ~ is Less than, greater than or equal to. 438 8.2.2 Operand 439 440 441 442 An operator is used within a CompoundContextClause to combine the results of a pair of ContextClauses. An operandr is a function that matches a given ContextNode using two ContextClauses. The individual boolean results from the two ContextClauses are combined to produce a single boolean result. 443 Allowed operands and their meaning (with notation): UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. 1 Page 26 of 49 UCM Draft A6 01 October 2009 Operator Short Name Meaning && Intersection True if both ContextClauses return true for the given ContextNode. False otherwise. || Union True if either ContextClause returns true for the given ContextNode. False otherwise. !! Exclusion True if the first ContextClause returns true and the second ContextClause returns false for the given ContextNode. False otherwise. 444 [R XXX] The operands MUST be represented as: (&&, ||, !!) where && is Intersection, || is Union, !! is Exclusion. 1 445 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 27 of 49 UCM Draft A6 01 October 2009 446 447 9 Business Context Framework 448 [Ed. Note] - Insert revised figure here 449 Figure 8-1 UCM Metamodel 450 451 452 453 454 Using context may take the form of assigning, calculating, or applying context information to an object, process or other artifact to fully define its business meaning and usage. A Contextualized is any artifact which has assigned context and exists at design time, such as component library creation and syntax binding. A Contextualized is subject to further contextualization at run time. 455 Definition - Contextualized 456 A contextualized is an object whose context can be expressed as a ContextExpression 457 458 The context of a Contextualized is sometimes referred to as the “overall context” of the Contextualized, to distinguish it from other contexts (as described below). [R XXX] 459 460 461 462 A Contextualized MUST have a context that can be expressed as a ContextExpression. 1 [Example] – Contextualized - Aggregate Business Information Entities (ABIEs), Association Business Information Entities (ASBIEs), Basic Business Information Entities (BBIEs) and Business Data Types (BDTs) are examples of a Contextualized. Other types of objects also may be contextualized. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 28 of 49 UCM Draft A6 463 01 October 2009 9.1 Contextualized Hierarchy «interface» Contextualized + +dependency getContext() : ContextExpression 1..* 0..* «interface» AssignedContextualized + «interface» IndependentContextualized setAssignedContext(ContextExpression) : void «interface» DependentContextualized + calculateContext() : void Mutually exclusive BBIE Version «interface» UnionContextualized «interface» IntersectionContextualized Mutually exclusive ABIE Version 1 0..* ASBIE Version 464 465 Figure 8-2 Contextualized Hierarchy 466 467 There is a hierarchy of Contextualized. They differ in how context has been assigned to them or calculated for them. 468 Definition - AssignedContextualized 469 470 An AssignedContextualized is an object to which a business context has been assigned, using a UCM context expression. 471 472 473 The context that is assigned to an AssignedContextualized is sometime the same as its overall context, but sometimes the assigned context is only one of the contexts that contribute to the overall context. 474 Definition - IndependentContextualized 475 476 An IndependentContextualized is an object for which the overall context is independent of the overall context of any other object. 477 478 The overall context of an IndependentContextualized cannot be changed by a change to the overall context of some other object. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 29 of 49 UCM Draft A6 01 October 2009 479 Definition - DependentContextualized 480 481 482 A DependentContextualized is an object for which the overall context is calculated, and the calculation depends of the overall context of at least one other object. 483 484 The overall context of a DependentContextualized can be changed by a change to the overall context of an object on which it has a context dependency. 485 9.2 Definition - UnionContextualized 486 487 A UnionContextualized is an object for which the overall context is calculated as the union of a set of ContextExpressions. 488 489 Definition - IntersectionContextualized 490 491 492 An IntersectionContextualized is an object for which the overall context is calculated as the intersection of a set of ContextExpressions. 493 9.3 Contextualized Hierarchy Applied to CCTS BIEs 494 495 This table refers to BIE versions, rather than to BIEs. This is to emphasize that each published version of a BIE can have a different context. CCTS Item Contextualizable Interfaces Comment BBIE Version AssignedContextualized, IndependentContextualized Each version of a BBIE has a context assigned to it, and the overall context of the BBIE version is just that assigned context, independent of the context of any other BIE version. ABIE Version UnionContextualized A version of an ABIE does not have a context assigned to it. The overall context of the ABIE version is the union of the overall contexts of the BBIE versions and ASBIE versions within the ABIE version. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 30 of 49 UCM Draft A6 01 October 2009 CCTS Item Contextualizable Interfaces Comment ASBIE Version AssignedContextualized, IntersectionContextualized Each version of an ASBIE has a context assigned to it. The ASBIE version is associated with an ABIE version. The overall context of the ASBIE version is the intersection of the context assigned to it and the overall context of the ABIE version it is associated with. 496 [Ed Note – how does context apply to BDTs?] 497 9.3.1 Application of Context 498 499 500 501 Apply Context is refining the context expression of a modeled business payload. This 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. 502 503 504 505 506 The application of context is accomplished by evaluating the simple context clauses to return a set of Contextualized. The ContextClause is first evaluated against the ContextGraph to return a set of ContextNodes. The set of ContextNodes 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. 507 9.4 Example Implementation D B E C F A I H G J 508 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 31 of 49 UCM Draft A6 509 510 Figure 9-2. DAG example identified by urn:un:unece:uncefact:context:draft:20091001682ba7e31f26 version 1.0 Contextualized 511 01 October 2009 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 9-1. 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, ContextNode Contextualized7 Create a set of all Contextualized Contextualized1 Contextualized that have ‘A’ assigned as a ContextNode and then Exclude all Contextualized from the set that have ‘B’ assigned as a ContextNode. Create a set of all Contextualized Contextualized3, Contextualized that have ‘A’ assigned as a Contextualized7 ContextNode then create a set of all Contextualized that have ‘B’ assigned as a ContextNode and then perform an intersection of the two sets. Create a set of all Contextualized Contextualized2, Contextualized that have ‘I’ assigned as a Contextualized3, ContextNode then create a set of all Contextualized4, Contextualized that have ‘J’ assigned as a Contextualized6 ContextNode and then perform a union of the two sets. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 32 of 49 UCM Draft A6 512 01 October 2009 Table 9-2. Results of Applying Context UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 33 of 49 UCM Draft A41 3 November 2010 514 Using CCTS with the Business Context Framework – Example 515 1.1 Set-up 516 This example is based on the following context library, illustrated in UML. 513 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2010 . All Rights Reserved. Page 34 of 49 UCM Draft A6 01 October 2009 Example Graph 1 Info :ContextGraphInformation ContextGraphID = urn:londata.com:context:graph:example:1:draft ContextGraphVersionID = 1.0 ContextGraphVersionDate = 2010-02-04 ContextGraphAgencyID = ZZZ ContextGraphName = Example1 ContextGraphDescription = Context Example No. 1 ContextGraphAgencyName = Londata Example Graph 1 : ContextGraph Geo-Political :ContextRootNode Business Sector :ContextRootNode ContextNodeID = f49c53f8-11d0-11df-ab0f-000c29efa2b4 ContextValue = GeoPolitical ContextValueName = Geo-Political ContextNodeID = 53f69ae2-11d2-11df-bbc3-000c29efa2b4 ContextValue = BusinessSector ContextValueName = Business Sector +source ContextEdge ContextEdge Context Categories :Scheme Or List ContextEdge Identifier = ContextCategories VersionIdentifier = 1.0 AgencyIdentifier = ZZZ +target European Union :ContextNode Banking :ContextNode ContextNodeID = 18b0d068-11d4-11df-91ce-000c29efa2b4 ContextValue = EU ContextValueName = European Union ContextNodeID = 9c78e664-11d5-11df-9581-000c29efa2b4 ContextValue = Banking ContextValueName = Banking Sector African Union :ContextNode ContextEdge Countries :Scheme Or List ContextNodeID = 18b0d068-11d4-11df-91ce-000c29efa2b4 ContextValue = AU ContextValueName = African Union Austria :ContextNode Identifier = Countries VersionIdentifier = 1.0 AgencyIdentifier = ZZZ Cities :Scheme Or List ContextNodeID = 18b0d068-11d4-11df-91ce-000c29efa2b4 ContextValue = EU ContextValueName = Austria ContextEdge Identifier = Cities VersionIdentifier = 1.0 AgencyIdentifier = ZZZ South Africa :ContextNode ContextEdge ContextEdge ContextNodeID = e4f4319c-11d9-11df-bc31-000c29efa2b4 ContextValue = ZA ContextValueName = South Africa Germany :ContextNode ContextNodeID = cbb1d53e-11d6-11df-aa0f-000c29efa2b4 ContextValue = DE ContextValueName = Germany ContextEdge Vienna :ContextNode Pretoria :ContextNode ContextNodeID = 85f9bb1e-11d7-11df-8f6b-000c29efa2b4 ContextValue = Wien ContextValueName = Vienna ContextEdge ContextNodeID = 1c3966c2-11da-11df-a972-000c29efa2b4 ContextValue = Pretoria ContextValueName = Pretoria Berlin :ContextNode ContextNodeID = e62d42f8-11d7-11df-bd37-000c29efa2b4 ContextValue = Berlin ContextValueName = Berlin 517 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 35 of 49 UCM Draft A6 01 October 2009 518 1.2 Example using CCTS 519 520 In UCM, a Contextualized is anything which has a context. More specifically, a Contextualized has a ContextExpression in terms of ContextNodes from a ContextGraph. 521 522 523 524 A BBIE (i.e. a version of a BBIE) is both an ‘AssignedContextualized’ and an ‘IndependentContextualized’. It has an assigned context, and as its context is independent of the context of any other BIE, its overall context is just its assigned context. Some examples are: BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) 525 BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) 526 BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) 527 528 529 530 531 532 533 534 535 For each of these BBIEs, the context is the intersection (“&&”) of a country and a sector (“Banking”). The context is as assigned by a business specialist. Consider the 1st BBIE. We know it should be associated with Austria. It also applies within Austria, since Austrian bank numbers are used in every sub-region of Austria. However, it also applies in regions larger than Austria, e.g. the EU when considering cross-border payments. This means that the context combines the effects of all 3 predicates “=”, “<” and “>”. The predicate which combines all these 3 is “~”, which means “less then, greater than or equal to”. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 36 of 49 UCM Draft A6 536 01 October 2009 Consider now an ABIE that contains these 3 BBIEs. ABIE CI_ Creditor_ Financial Institution. Details BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) 537 538 539 540 An ABIE (i.e. a version on an ABIE) is a “UnionContextualized”. The context of the above ABIE is the union of the contexts of the 3 BBIEs, i.e. the context of the ABIE is ((~AT) || (~DE) || (~ZA)) && (~Banking) which is the union of the 3 BBIE contexts. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 37 of 49 UCM Draft A6 01 October 2009 ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) 541 542 543 544 There is one other important case. Suppose some ASBIEs are created using the ABIE. An ASBIE specializes the use of an ABIE. Two ASBIEs may be created using the same ABIE, and those two ASBIEs have a different meaning, which means they can have different contexts. So an ASBIE can modify the context of an ABIE. 545 546 547 548 An ASBIE (a version of an ABIE) is both an ‘AssignedContextualized’ and an ‘IntersectionContextualized’. The context of an ABIE is the intersection of its assigned context and the context of the ABIE it is associated with. For example, suppose a new ABIE contains two ASBIEs for the ABIE above, one with the context 549 (~EU) && (~Banking) 550 and the other with the context 551 552 (~AU) && (~Banking) (where “AU” is “African Union”). UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 38 of 49 UCM Draft A6 01 October 2009 ABIE EMEA_ CI_ Creditor_ Financial Institution. Details ASBIE Euro_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~EU) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) ASBIE Africa_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~AU) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 39 of 49 UCM Draft A6 01 October 2009 (assigned) context = (~AT) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) 553 The calculated context of the first ASBIE is the intersection (“&&”) of 554 555 (~EU) && (~Banking) and 556 557 ((~AT) || (~DE) || (~ZA)) && (~Banking) i.e. it is (since South Africa is not in the EU) 558 559 ((~AT) || (~DE)) && (~Banking) The calculated context of the second ASBIE is the intersection (“&&”) of 560 561 562 563 564 (~AU) && (~Banking) and ((~AT) || (~DE) || (~ZA)) && (~Banking) i.e. it is (since Austraia and Germany are not in the African Union) (~ZA) && (~Banking) UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 40 of 49 UCM Draft A6 01 October 2009 ABIE EMEA_ CI_ Creditor_ Financial Institution. Details ASBIE Euro_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~EU) && (~Banking) (calculated) context = ((~AT) || (~DE)) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) ASBIE Africa_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~AU) && (~Banking) (calculated) context = ((~ZA)) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 41 of 49 UCM Draft A6 01 October 2009 (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) 565 566 567 An ASBIE effectively narrows the context of the ABIE it is associated with. Equivalently, it effectively narrows the contexts of each of the BBIEs or ASBIEs that are contained within the ABIE. 568 569 570 571 In this example, the same (inner) ABIE is used twice, once by each ASBIE, but the effective contexts for the (inner) ABIE and its BBIEs are different in each case because the ASBIEs have different assigned contexts. With the effective (inner) ABIE and BBIE contexts added (after intersecting), the (outer) ABIE table becomes 572 UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 42 of 49 UCM Draft A6 01 October 2009 573 ABIE EMEA_ CI_ Creditor_ Financial Institution. Details ASBIE Euro_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~EU) && (~Banking) (calculated) context = ((~AT) || (~DE)) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) (effective) context = ((~AT) || (~DE)) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) (effective) context = (~AT) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) (effective) context = (~DE) && ( ~Banking) BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) (effective) context = NULL && ( ~Banking) = NULL ASBIE Africa_ CI_ Creditor_ Financial Institution. Details UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 43 of 49 UCM Draft A6 01 October 2009 (assigned) context = (~AU) && (~Banking) (calculated) context = ((~ZA)) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) (effective) context = ((~ZA)) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) (effective) context = NULL && ( ~Banking) = NULL BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) (effective) context = NULL && ( ~Banking) = NULL BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) (effective) context = (~AT) && ( ~Banking) 574 575 576 577 Note how that, although the same ABIE is used twice, the effective contexts of the ABIE and the BBIEs are different within the two different ASBIEs. For the BBIEs where the effective context is NULL, i.e. not in any context, the BBIE is out of context (and effectively disappears). 578 579 Note that the calculated context of the outer ABIE is the union of the calculated contexts of the two ASBIEs, i.e. it is the union (“&&”) of 580 ((~AT) || (~DE)) && (~Banking) UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 44 of 49 UCM Draft A6 581 582 583 584 01 October 2009 and ((~ZA)) && (~Banking) i.e. the context of the outer ABIE is ((~AT) || (~DE) || (~ZA)) && (~Banking) 585 586 Partly (but not completely) coincidentally, this is the union of the contexts of the 3 BBIEs used in the example. 587 1.2.1 Applying a Message Context 588 589 590 591 592 593 594 The example so far has shown context as it is assigned and calculated within a BIE library, such an UN/CEFACT’s Core Component Library (CCL). BIEs from a library are assembled to produce message payloads. However, the message payloads may be more general-purpose that are required by a particular community of users. For example, a message payload designed for use through the European Union might contain more fields than are required (or appropriate) when that message payload is used within a single country, e.g. Austria. 595 596 597 598 599 600 A general purpose message payload may be customised for a specific usage context by applying a message context to it. An “applied context” is a context expression that is intersected with the context of every BIE in a message payload. For every BIE, the “resultant context” of the BIE is the intersection of the BIEs overall context and the applied context. If the resultant context of any BIE is null, that BIE is excluded from the customised message, i.e. it is not used in the customised message. 601 602 603 Suppose that the above ABIE is to be used in a message payload that is only for Austria, i.e. the applied context is “<=AT”. Intersecting this context with the above example gives UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 45 of 49 UCM Draft A6 ABIE 01 October 2009 EMEA_ CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) (resultant) context = (<=AT) && (~Banking) ASBIE Euro_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~EU) && (~Banking) (calculated) context = ((~AT) || (~DE)) && (~Banking) (resultant) context = (<=AT) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) (effective) context = ((~AT) || (~DE)) && (~Banking) (resultant) context = (<=AT) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) (effective) context = (~AT) && ( ~Banking) (resultant) context = (<=AT) && (~Banking) BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier (assigned) context =(~DE) && ( ~Banking) (effective) context = (~DE) && ( ~Banking) UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 46 of 49 UCM Draft A6 01 October 2009 (resultant) context = NULL CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier BBIE (assigned) context =( ~ZA) && ( ~Banking) (effective) context = NULL && ( ~Banking) = NULL (resultant) context = NULL ASBIE Africa_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~AU) && (~Banking) (calculated) context = ((~ZA)) && (~Banking) (resultant) context = NULL ABIE CI_ Creditor_ Financial Institution. Details (calculated) context = ((~AT) || (~DE) || (~ZA)) && (~Banking) (effective) context = ((~ZA)) && (~Banking) (resultant) context = NULL BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (assigned) context = (~AT) && ( ~Banking) (effective) context = NULL && ( ~Banking) = NULL (resultant) context = NULL BBIE CI_ Creditor_ Financial Institution. German Bankleitzahl_ Identification. Identifier UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 47 of 49 UCM Draft A6 01 October 2009 (assigned) context =(~DE) && ( ~Banking) (effective) context = NULL && ( ~Banking) = NULL (resultant) context = NULL BBIE CI_ Creditor_ Financial Institution. South African NCC_ Identification. Identifier (assigned) context =( ~ZA) && ( ~Banking) (effective) context = (~AT) && ( ~Banking) (resultant) context = NULL 604 605 When the BIEs with a null resultant context are removed, what is left is the relevant part of the ABIE, with only the BIEs that are relevant for the applied context. ABIE EMEA_ CI_ Creditor_ Financial Institution. Details (resultant) context = (<=AT) && (~Banking) ASBIE Euro_ CI_ Creditor_ Financial Institution. Details (assigned) context = (~EU) && (~Banking) (resultant) context = (<=AT) && (~Banking) ABIE CI_ Creditor_ Financial Institution. Details (resultant) context = (<=AT) && (~Banking) BBIE CI_ Creditor_ Financial Institution. Austrian Bankleitzahl_ Identification. Identifier (resultant) context = (<=AT) && (~Banking) 606 This is how UCM context expressions are used with BIEs. UN/CEFACT Context Methodology Technical Specification Copyright © UN/CEFACT 2009 . All Rights Reserved. Page 48 of 49 UCM Draft A41 607 3 November 2010 Copyright Statement 608 Copyright © UN/CEFACT 2010. All Rights Reserved. 609 610 611 612 613 614 615 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. 616 617 The limited permissions granted above are perpetual and will not be revoked by UN/CEFACT or its successors or assigns. 618 619 620 621 622 623 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 2010 . All Rights Reserved. Page 49 of 49