12.07.2015 Views

Enterprise Integration Using the IEC CIM - CIMug - UCAIug

Enterprise Integration Using the IEC CIM - CIMug - UCAIug

Enterprise Integration Using the IEC CIM - CIMug - UCAIug

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Enterprise</strong><strong>Integration</strong> <strong>Using</strong><strong>the</strong> <strong>IEC</strong> <strong>CIM</strong>Scott Neumann, UISOLMargaret Goodrich, SISCOLucas Malesku, BC HydroFrank Wilhoit, AEP


Introduction• The purpose of this presentation is todescribe a process for using <strong>the</strong> <strong>CIM</strong> forenterprise integration• This process is reflective of <strong>IEC</strong>standards efforts, best practices andintegration experiences at major utilitiesincluding AEP and BC Hydro• This is an attempt to provide an overviewof key topics given time constraintsProprietary and Confidential


What are we integrating?• Above is a common example for distribution• O<strong>the</strong>r examples are transmission or market systems• Can not assume one size fits allProprietary and Confidential


People and Process• <strong>Integration</strong> success involves people and process as much astechnology• It is necessary to have people from different ‘silos’ work,recognizing that not everyone has <strong>the</strong> same knowledge,responsibility, focus or skill set• The architecture and processes need to be well documented,where opportunities for training and discussion are provided to besupportive of ‘buy in’• A strong governance process is needed to insure architectureconformance, but…• Processes are also needed to address cases where exceptions areneeded• Time and budget are factors that must be recognized, and mayfactor into specific integration priorities and decisionsProprietary and Confidential


Documentation• Documentation is key for design, governance, development, testing,deployment and support… avoiding dependencies upon ‘tribal’ knowledge• Documentation must be useful and provide value to a given audience, usinga set of standard templates and avoiding replication of information• Use of industry standards helps avoid reinventing wheels• The architecture should be documented in a manner that provides guidanceall those doing modeling, design and development• Things that need to be documented to support integration include:• Use Cases• Functional requirements• Non-functional requirements• System Interaction Specification• Interface designs for source and target(s)• Models and mappings• <strong>Integration</strong> patterns• In general, if something isn’t documented, take <strong>the</strong> view that it doesn’t exist!Proprietary and Confidential


Uses Cases• Everything needs to start with use cases… as <strong>the</strong>y help definerequirements and are supportive of testing• In <strong>the</strong> simplest terms, a use case answers <strong>the</strong> question: ‘WHOdoes WHAT to WHO, WHEN, and WHY do <strong>the</strong>y do it?’• The ‘WHO’ are called actors, which may be persons with specificroles or systems• A sequence diagram should be defined to describe <strong>the</strong> informationflows between actors, describing <strong>the</strong> WHAT and <strong>the</strong> WHEN• Each WHAT is typically viewed as a potential message• The WHY should be provided as background information• The use case does NOT say HOW!• Uses cases can be first defined at a business level, which<strong>the</strong>n can guide <strong>the</strong> development of more detailed technicaluse cases as needed for implementationProprietary and Confidential


Modeling Levels7Proprietary and Confidential


Conceptual Models• Very important that it can be readily understood by business stakeholders• Provides <strong>the</strong> needed vocabulary for business-level use cases• Can be readily mapped to a logical model where a more detailed technicalview is providedProprietary and Confidential


Logical Models• The <strong>IEC</strong> <strong>CIM</strong> is <strong>the</strong> primary logical model ofinterest for this audience• However, <strong>the</strong>re are o<strong>the</strong>r logical models that maybe leveraged for integration purposes, especiallywhen we get outside of <strong>the</strong> core electrical domain• Logical models are usually, but not alwaysexpressed as UML (e.g. OAGIS defined usingXSDs)• Sometimes logical models are derived fromlegacy XML schemas, entity-relationship models,etc.Proprietary and Confidential


Logical Models• <strong>CIM</strong> fragment with classes, inheritance, associations,attributes and data typesProprietary and Confidential


Canonicals• Canonical data models are used for informationexchanges to provide a common reference• Components convert to and from <strong>the</strong> canonical datamodel as needed to facilitate a given informationexchange• <strong>Using</strong> <strong>the</strong> <strong>CIM</strong>, canonicals are defined using ‘contextualprofiles’, where a subset of <strong>the</strong> <strong>CIM</strong> (and potentiallyo<strong>the</strong>r logical models) are leveraged• Each element of a profile/canonical can be traced backto a source element in a logical model• A canonical data model is a physical data model that isoften realized as an XSDProprietary and Confidential


Example Modeling ProcessProprietary and Confidential


Tools• Process needs to be supported by tools• Need to avoid any ‘unique’ modeling approaches thatcould potentially result in rework, lock-in or inability toleverage tools of choice• Should understand <strong>the</strong> consequences of <strong>the</strong> use ofany tool or any forced migration to ano<strong>the</strong>r tool• Must avoid models being a ‘dead end’, where <strong>the</strong>yare only useful as a reference instead of being usedfor <strong>the</strong> generation of useful design artifacts• Tools and approaches must minimize <strong>the</strong> impact ofdesign changes or normal evolution• Don’t use a hammer for everything, use <strong>the</strong> right toolfor <strong>the</strong> right jobProprietary and Confidential


<strong>Enterprise</strong> Architect• A.k.a. ‘EA’• The UML tool of choice for maintenance of <strong>the</strong><strong>IEC</strong> <strong>CIM</strong>, where <strong>CIM</strong> releases are now availableas ‘.eap’ files• Low cost, but extremely powerful commercialUML tool• Common uses are for development of classdiagrams and sequence diagrams• Can export models in a variety of formats,including many XMI options• Now <strong>the</strong> most widely used UML tool in <strong>the</strong> utilityindustry in large part because of <strong>the</strong> <strong>CIM</strong>Proprietary and Confidential


<strong>CIM</strong>Tool• Open source Eclipse plug-in that provides an IDE for profiledevelopment and management• Freely available from cimtool.org• Can import models from UML tools such as EA• Has model validation capabilities• Follows <strong>the</strong> draft TC57 XML NDR• Can also merge models toge<strong>the</strong>r, and is not limited to <strong>CIM</strong>• Can apply a variety of syntax rules to profile definitions,generating XSDs, RDFS, HTML, DDL, etc.• Agreements on an <strong>IEC</strong> TC57 XML Naming and DesignRules specification are both validating <strong>the</strong> use of <strong>CIM</strong>Toolnow and creating opportunities for o<strong>the</strong>r compliant tools (e.g.<strong>CIM</strong>Contextor)Proprietary and Confidential


<strong>CIM</strong>Tool IDEProprietary and Confidential


<strong>Using</strong> <strong>the</strong> <strong>CIM</strong>• The <strong>CIM</strong> can be used in many ways:1. Where it is <strong>the</strong> basis of a predefined, standardexchange profile or interface definition2. To extend an existing standard profile or interfaceto meet local requirements3. Where it is used to create new exchange profilesand interfaces where standards do not exist• For items 2 and 3 above, it is often necessary toextend <strong>the</strong> <strong>CIM</strong>• The way in which <strong>the</strong> <strong>CIM</strong> is extended andprofiles defined must be carefully consideredProprietary and Confidential


<strong>CIM</strong> Extension Methods• Extensions can be directly applied to a given<strong>CIM</strong> release, in terms of new classes,attributes and associations• There are two ways to identify <strong>the</strong> extensionswithin a UML model file:• Stereotyping• Tagged values• It is also possible to put <strong>the</strong> extensions into aseparate model file in conjunction with <strong>the</strong>above methodsProprietary and Confidential


<strong>CIM</strong> Extensions: Stereotypes• Use of Stereotyping Functions in EA• Use as <strong>the</strong> label for customtop-level package• Use as <strong>the</strong> label for each newclass or attribute added to an existing <strong>CIM</strong>package where name designates <strong>the</strong> entity orproject that needs <strong>the</strong> extension. Forexample - or <strong>the</strong> name of <strong>the</strong>entity.Proprietary and Confidential


<strong>CIM</strong> Extensions: Tag Values• Use Tagged Value Function in EA• Tagged Values may be preferred overStereotype since EA allows simple viewingusing <strong>the</strong> “View | Tagged Values” feature• Tagged Values may be added to bothAttributes and Associations• Tagged Values is <strong>the</strong> method already usedby <strong>CIM</strong>Tool to manage namespaces in UMLProprietary and Confidential


<strong>CIM</strong> Extensions: Extension Models• Extensions can be put into a separate file• One option is to leverage <strong>CIM</strong>Tool merge capabilities, which<strong>the</strong>n makes it easier to take on new base <strong>CIM</strong> versions• <strong>CIM</strong>Tool will ‘merge’ where two models have classes thatmatch in namespace and class name.Proprietary and Confidential


Namespaces• Namespaces are used in models, XSDs, profile definitions and WSDLs• Changing namespaces can force significant levels of reimplementationeffort… that might o<strong>the</strong>rwise be avoided• Along <strong>the</strong> lines of OASIS recommendations, avoid changingnamespaces unless <strong>the</strong>re is an absolute need to do so to reflect aversion that would o<strong>the</strong>rwise be incompatible• Use <strong>the</strong> ‘version’ attribute to track version numbers, e.g.:version="1.0.0"• Each profile should/will have its own namespace, avoiding conflictswhere a <strong>CIM</strong> class might be used differently in different profiles, e.g.:targetNamespace="http://iec.ch/TC57/2011/EndDeviceControls#"Proprietary and Confidential


Traceability• Need to be able to trace from a canonical/physical modelback to a logical model• SAWSDL is a standard for semantic annotations• It is used to provide traceability within a contextual profile• This helps to avoid any semantic confusion• XML Schema fragment using SAWSDL:Proprietary and Confidential


<strong>Integration</strong> Choices• Depending upon <strong>the</strong> integration scenario, <strong>the</strong>re are many factorsthat may drive <strong>the</strong> implementation of an information flow• Some of <strong>the</strong> implementation options include:– Messages through an ESB that convey transactions to create, change or deleteof objects– Event notification messages through an ESB that indicate <strong>the</strong> create, changeor delete of objects– Messages through an ESB that support query requests, potentially withasynchronous replies– Web service requests for queries or transactions– Data set exchanges via <strong>CIM</strong>/XML files– Data set updates using incremental <strong>CIM</strong>/XML– Information transfer to a data warehouse using ETL mechanisms– HTTP requests• There are a variety of technical, performance, availability andsecurity considerations that would need to be factored/addressedfor any integration choiceProprietary and Confidential


<strong>CIM</strong>/XML• See <strong>IEC</strong> 61970-452/501/552• Used primarily for model exchanges in contrast toexchange of dynamic information, queries ortransactions• Uses RDF Schema to define <strong>the</strong> Profiles to exchange• Also supports model changes using incremental<strong>CIM</strong>/XML• While typically exchanged using a ‘Claim Check’pattern, can also be conveyed within messagepayloads• Does many things that are difficult to do using XMLSchema-based messagesProprietary and Confidential


Incremental <strong>CIM</strong>/XML Example


Common Message Envelope• <strong>IEC</strong> 61968-1 defines a general approach for transport independentmessages that minimally consist of a verb, noun and payload• Messages using a common message envelope (CME) can be wrapped byo<strong>the</strong>r wrappers (e.g. SOAP, WSDL, JMS)• Usage of different parts of <strong>the</strong> CME (e.g. Request, Reply Payload) aredependent upon messaging pattern and verb• Payload is defined using an XML Schema ‘any’Proprietary and Confidential


Message ExamplecreatedMyBusinessObjectSourceApp353371More stuff• This design wraps a CMEinside <strong>the</strong> SOAP body• This example shows whatwould be seen ‘on <strong>the</strong>wire’• You can’t tell if thismessage was generatedusing a WSDL or not!• The CME even allows forpayloads that do not havea corresponding XSDProprietary and Confidential


Basic <strong>Integration</strong> PatternsSynchronous Request/ReplyPoint-to-PointMulticastingAsynchronous Request/ReplyProprietary and Confidential


Patterns and Verbs• Queries are indicated by <strong>the</strong> use of a ‘get’ verb on <strong>the</strong>request in a request/reply pattern, where <strong>the</strong> payloadof <strong>the</strong> response message should return <strong>the</strong> requestedinformation• Transactions are indicated by <strong>the</strong> use of verbs suchas ‘create’, ‘change’, ‘close’, ‘cancel’, ‘delete’, andcould use request/reply or point-to-point patterns• Both queries and transactions may result in responses(verb=‘reply’), which may indicate success or errors• Events are indications that something has happenedof potential interest, using past tense verbs such as‘created’, ‘changed’, ‘closed’, ‘canceled’, ‘deleted’and typically use a multicast patternProprietary and Confidential


Transports• <strong>IEC</strong> 61968 is by definition transport independent, but <strong>the</strong> reality is thata wide range of messaging technologies have largely given way toJMS and HTTP• JMS provides a powerful messaging API, where <strong>the</strong> worst thing aboutJMS is <strong>the</strong> name, as it is not limited to use by Java applications• HTTP and JMS have some trade-offs:– JMS provides a reliable transport with <strong>the</strong> capability to queue andmulticast messages– HTTP provides a standard ‘on <strong>the</strong> wire’ protocol, but JMS does not• SOAP may be layered on both of <strong>the</strong>se transports, where <strong>the</strong> <strong>IEC</strong>61968 message envelope may be placed within <strong>the</strong> SOAP body• When SOAP is used, it can be possible to define a WSDL that alsoprovides a description of <strong>the</strong> interface• O<strong>the</strong>r transports can also be considered, such as AMQP and REST• ESBs support <strong>the</strong> use of intermediaries• <strong>IEC</strong> 61968-100 is being drafted to define specific, transport-dependentimplementation profiles and integration patternsProprietary and Confidential


Web Services• <strong>IEC</strong> 61968 messages can be ‘wrapped’ by a WSDL• Two basic approaches: Loose coupled (coarse grained) or tightlycoupled (strongly typed, fine grained)• For broadest compatibility, WSDL should be WS-I compliant anduse document-wrapped style• Remember that HTTP is not <strong>the</strong> only transport possible… as JMScan be used to provide delivery guarantees, multicasting and o<strong>the</strong>rfeatures not possible with HTTP• The use of a SOAP envelope enables <strong>the</strong> use of many security tools• WSDLs are sometimes less important than one might think,especially given <strong>the</strong> emergence of RESTProprietary and Confidential


Names• Object naming is an important aspect of integration that is oftenoverlooked especially where all systems do not use common mRIDs• Issues:– The same object may be known in different system by different names– Messages need to use an identified that is known by source and targets– Some systems may need to be aware of multiple identifiers for a single object(e.g. local ID and external ID)• Sources and targets MUST agree upon names to be used, or rely upon<strong>the</strong> use of bilateral mapping tables for object names• A naming service could be used for allocating and managing names• The performance implications of name lookups needs to be carefullyconsidered• Name class introduced in <strong>CIM</strong> v15 to help address <strong>the</strong>se issues, providinga more realistic and useful model of object naming• In <strong>the</strong>ory, an mRID is just ano<strong>the</strong>r type of name!Proprietary and Confidential


<strong>CIM</strong> Name Class• Identified Objects can have many Names• Each Name.name instance can be associated with a differentNameType• NameTypes can be associated with a NameTypeAuthoritythat can be responsible for allocating Name.name valueswithin a NameType• IdentifiedObject.name preserved for legacy reasonsProprietary and Confidential


Names in Messages• Common usage of Name class in a message XSD• NameType often option, but should be provided by source ifmore than one Name instance provided• Target process will map <strong>the</strong> object using one of <strong>the</strong> names, as<strong>the</strong> name is ei<strong>the</strong>r used locally or defined within a bilateralmapping tableProprietary and Confidential


Name Mapping Example• Source sends amessage related toobject ‘ABC’• Within messageName.name valueis set to ‘ABC’• Name.NameType.name can be usedto specificallyidentify <strong>the</strong> type ofnameExternalIDLocal IDABC 1XYZ 2RTY 345INB 67433MJG 222ECV 555GGG 225Note: This is one example, <strong>the</strong>re are many options• Target receives <strong>the</strong>message• Given that <strong>the</strong>Name.name value isunknown, a tablelookup is required toknown that objectnamed ‘ABC’ asprovided by <strong>the</strong>external system isequivalent to locallynamed object ‘1’• This is a bilateralagreement requiredfor integration whereall systems do notshare a globallyunique IDProprietary and Confidential


Common Services• Common services are often implementedwithin an integration infrastructure to providecommon functionality that is supportive ofintegration• Common examples include:– Logging and Exceptions– Claim Check– Notifications– Identity Management– Large message handlingProprietary and Confidential


Claim Check Pattern• Commonly used for exchange of large files, such as thosecontaining <strong>CIM</strong>/XML• Functionality may wrapped within a serviceProprietary and Confidential


Security• Key terms: Au<strong>the</strong>ntication, Authorization, Confidentiality,Integrity, Non-Repudiation, Denial of Service, Trust, …• If properly planned and designed, <strong>the</strong> implementation of security canbe a last step (depending upon <strong>the</strong> implementation approach)• Different security policies will be needed in different situations, suchas in <strong>the</strong> cases of intra-enterprise, inter-enterprise or extra-enterpriseintegration or where data has sensitivity and/or confidentialityrequirements• Tools like TIBCO Policy Manager (as an example) make it verysimple to implement necessary security policies using agents, wheredevelopers need o<strong>the</strong>rwise not be concerned with security policy• If you are going to use SSL/TLS, how do you create and manage yourcertificates?• Does <strong>the</strong> integration impact critical infrastructure (e.g. as per NERC)?• One size does not fit all integrationsProprietary and Confidential


Validation• How is an XML message validated?• XML Schema validation is very limited and can only beused to validate <strong>the</strong> form of <strong>the</strong> XML and very little withrespect to content• Schematron (an ISO standard) provides for moresophisticated validation rules• For example, how do you validate an object identifierthrough simple rules?• Ultimately <strong>the</strong> target application will need to decidewhe<strong>the</strong>r from its perspective a message is validProprietary and Confidential


Error Handling• Error handling is dependent upon <strong>the</strong> integrationpattern• CME provides detailed structures for reporting errorsthat are both human and machine readable• In a request/reply pattern, <strong>the</strong> server can simply detectand report an exception back to <strong>the</strong> client• In a publish/subscribe or point-to-point pattern a meansto log and report exceptions is needed• A notification infrastructure may also be needed toreport errors to support staffProprietary and Confidential


<strong>Integration</strong> Beyond <strong>the</strong> ESBProprietary and Confidential


Data Warehouse Challenges• The <strong>IEC</strong> <strong>CIM</strong> defines a normalized logical data model• Data warehouses are typically denormalized• The <strong>CIM</strong> is complex:– Deep inheritance relationships– Many associations between classes• Objects within models need to be versioned as <strong>the</strong>ychange over time, and historical views are needed• Need many dimensions that allow facts to be analyzed inmany ways• Facts may involve summarization and aggregation ofsource data in order to be useful• Many sources of data need to be staged and correlatedProprietary and Confidential


ETL• Extract, Transform and Load (ETL) is used to movedata from sources to staging tables to tables within <strong>the</strong>data warehouse• ETL processes are typically defined for both bulk andincremental updates• Incremental updates are important so that history canbe preserved within <strong>the</strong> data warehouse• Microsoft SQL Server <strong>Integration</strong> Services is but onecommonly used tool to implement an ETL integrationProprietary and Confidential


ETL Pattern• Non-messaging integration used to populate a database, such as a datawarehouse• Data may undergo significant level of transformation and/or summarization• In <strong>the</strong> case of a data warehouse target <strong>the</strong>re may be a significant level ofdenormalizationProprietary and Confidential


More Information• <strong>IEC</strong> TC57 Sharepoint (for <strong>CIM</strong> UG and <strong>IEC</strong>TC57 members): http://iectc57.ucaiug.org• E-mails:‣ Scott: sneumann@uisol.com‣ Margaret: margaret@sisconet.com‣ Lucas: lucas.malesku@bchydro.com‣ Frank: fewilhoit@aep.com46Proprietary and Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!