Service Pattern & Data Model
Jan 12, 2016
Service Pattern &
Data Model
Goals
• To create interoperable and sustainable message payloads and Web service definitions
• To support integration with or without an ESB
• To avoid unnecessary major code change
Key Architecture ConsiderationsKey Architecture Considerations
• Decoupling of end-point connections and business semantics• Guaranteed delivery• Managed integration• Process orchestration where necessary• End point compliance to common business semantics and
syntax for information exchange to the public (enterprise)• End point compliance to service patterns (interaction
patterns, naming and structure patterns, and message exchange patterns)
• Minimal business logic and transformation within the integration layer
• Map to IEC TC57 WG14 verbs
Service Naming PatternsService Naming Patterns• Send - to provide (send) information (business object) for public
(enterprise) consumption. To be invoked by the system of record for the business object and only when the state of the business object has changed.
• Receive – to consume (receive) information (business object) from an external source.
• Request – to request another party to perform a specific service • Execute – to run a service provided to the public, which may include
a state change request or a query request. • Reply – to reply with the result of the execution of a service (by the
Execute service) • Show - to provide (show) information (business object) for public
(enterprise) consumption, when the state of the business object is not changed, by the system of record or other system that has a copy of the same business object.
• Retrieve– to request specific data of a business object to be provided.
• Publish - to provide (send) information (business object) for public (enterprise) consumption. To be invoked by the system of record for the business object and only when the state of the business object has changed.
• Subscribe – to consume (receive) information (business object) from an external source.
Used
Not
Used
IEC 61968 Verb Usage RecommendationHere is a list of IEC 61989 verbs and where and how they are used in the service/operation patterns naming standards:
Create ------ operation: used in Request, Execute services
Change ------ operation: used in Request, Execute services
Cancel ------ operation: used in Request, Execute services
Close ------ operation: used in Request, Execute services
Delete ------ operation: used in Request, Execute services
Created ------ operation: used in Send, Receive, Reply services
Changed ------ operation: used in Send, Receive, Reply services
Closed ------ operation: used in Send, Receive, Reply services
Canceled ------ operation: used in Send, Receive, Reply services
Deleted ------ operation: used in Send, Receive, Reply services
Get ------ not used, equivalent to Retrieve service
Show ------ used as the service level pattern.
Reply ------ used as the service level pattern.
Subscribe ------ used as the service level pattern.
Unsubscribe ------ not used.
Overall Service Design Process
Business Process Analysis
Integration Requirements
Service & Information Object Identification and Harmonization
Semantic Information Model
Service Definition (Artifacts generation and validation)
Service & Operation Pattern
Reference Models (CIM, MultiSpeak,..)
Service Inventory Sheet
Integration Requirements
CreatedMeterReading(Send)
CreatedMeterReading(Receive)
System Integration
sd Integration Sequence Diagram - B1S1
AMI Head End
(from Actors - Set 2 )
Meter Data ManagementSystem (Secured)
(from Actors - Set 2 )
CreatedMeterReading()
Acknowledgement()
1) Integration without ESB or transparent ESB
WS
sd Integration Sequence Diagram - B1S1
AMI Head End
(from Actors - Set 2 )
Meter Data ManagementSystem (Secured)
(from Actors - Set 2 )
ESB
(from Actors - Set 2 )
CreatedMeterReading()
Acknowledgement()
CreatedMeterReading()
Ackonwledgement()
System Integration
2) Integration with ESB
WS
WS
Services Involved
Service & Operation Naming Convention
• Service name: follows <Information Object> name (such as MeterReading). However, if an ESB is involved such service can be deployed in pair such as “SendMeterReading”/”ReceiveMeterReading” following <Service pattern name>+<Information Object>
• Operation name: <Operation pattern name>+<Information Object> (such as CreatedMeterReading)
Application A Transparent ESB
ANativeAPI or Service
T S/C
Application B
BNativeAPI or Service
TS/PS/P S/C
SendMeterReading
CreatedMeterReading
ChangedMeterReading
CanceledMeterReading
Orchestration
ServiceService
OperationsOperations
Other interested parties……Guaranteed delivery within ESB, plus internal routing……
Send-Receive Services Interaction Pattern (With ESB)Send-Receive Services Interaction Pattern (With ESB)
ReceiveMeterReading
CreatedMeterReading
ChangedMeterReading
CanceledMeterReading
MeterReading
CreatedMeterReading
ChangedMeterReading
CanceledMeterReading
Application A
ANativeAPI or Service
T S/C
Application B
BNativeAPI or Service
TS/P
Send-Receive Services Interaction Pattern (Without ESB)Send-Receive Services Interaction Pattern (Without ESB)
Application A Transparent ESB
ANativeAPI or Service
T S/C
Application B
BNativeAPI or Service
TS/PS/P S/C
RequestMeterReading
CreateMeterReading
ChangeMeterReading
CancelMeterReading
Orchestration
Request-Reply Services Interaction Pattern (With ESB)Request-Reply Services Interaction Pattern (With ESB)
ExecuteMeterReading
CreateMeterReading
ChangeMeterReading
CancelMeterReading
S/P S/CS/CS/P
ReceiveMeterReading
CreatedMeterReading
ChangedMeterReading
CanceledMeterReading
ReplyMeterReading
CreatedMeterReading
ChangedMeterReading
CanceledMeterReading
Application A
ANativeAPI or Service
T S/C
Application B
BNativeAPI or Service
TS/P
Request-Reply Services Interaction Pattern (Without ESB)Request-Reply Services Interaction Pattern (Without ESB)
MeterReadingRequest
CreateMeterReading
ChangeMeterReading
CancelMeterReading
S/CS/P
MeterReading
CreatedMeterReading
ChangedMeterReading
CanceledMeterReading
XML Schema Definition
• Model driven processMD3i SB Context Diagram
AssetContainer
«md3i_SB_...Entities::
AMIDev iceAsset
ConductingEquipment
«md3i_SB_entity»Entities::
Serv iceDeliv eryPoint
«md3i_SB_...Entities::
MeterAsset
IdentifiedObject
«md3i_SB_...Entities::
MeterReading
IdentifiedObject
«md3i_SB_...Entities::
ReadingType
«md3i_SB_...Entities::
Interv alBlock
MeasurementValue
«md3i_SB_...Entities::Reading
«md3i_SB_...Entities::
ReadingQuality
MeasurementValue
«md3i_SB_...Entities::IReading
1.. *
0..*
0..* 1.. *
0..*
0..1
0..*
0..1
0..1
0..*
0..*
0..*
0..*
0..1
0..* 0..*
<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:m=http://ce.corp.com/ei/2008/06/MeterReadingRequest xmlns:prism="http://ce.corp.com/ei/2008/06" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ce.corp.com/ei/2008/06/MeterReadingRequest" version="1.0"> <xs:import namespace="http://ce.corp.com/ei/2008/06" schemaLocation="_prismEntities.xsd"/> <xs:complexType name="MeterReadingRequest_Type"> <xs:sequence>
<xs:element ref="prism:MeterReading"/></xs:sequence>
</xs:complexType> <xs:element name="MeterReadingRequest" type="m:MeterReadingRequest_Type"/></xs:schema>
ControlledVocabulary(i.e. wiki, data
dictionary, etc.)
XML Schema
ClassA
ClassB
ClassC
Existing Terminologyand Metadata
UML
Model Driven Process Based on a Enterprise Semantic Model (ESM)
• The Reference Base provides a common representation of multiple information sources at the semantic granularity required for an ESM.
BusinessTerminology
DatabaseMetadata
ApplicationInterfaces
ExistingModels
XBRL
CIM
MultiSpeak
GML
Enterprise Semantic Model(ESM)
Reference Base
Modeling the ESM – Reference Base
• The Semantic Base refines the Reference Base to create enterprise-wide semantic elements while adding enterprise standard data types.
BusinessTerminology
DatabaseMetadata
ApplicationInterfaces
ExistingModels
CIS
CIM
MultiSpeak
SAP
Semantic Base
Reference Base
Semantic Base Entity
Modeling the ESM – Semantic Base
BusinessTerminology
DatabaseMetadata
ApplicationInterfaces
ExistingModels
OAGi
XBRL
GML
CCL
Context
Reference Base
• Semantic Base Entities are refined for use within specific contexts.
Semantic Base
Modeling the ESM – Semantic Base Entities in Context
Context Specific Refinement
• A semantic network applied to the ESM provides explicit semantic correlation at the attribute level and facilitates semantically based traversal of the model.
Modeling the ESM – Semantic Traceability
Example Implementation Model
Requirement: Model information exchange as a message for application integration where XML Schema is the target implementation technology.
Implementation Model
Modeling the ESM – Implementation Models
Web Service Definition
• Web services defined using Web Service Description Language as part of integration governance.
• Web services can be defined following model driven technology such as the one provided by EA.
• Or Web services can be defined following a standard template
Web Service Definition Language<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions name="RequestMeterReading" targetNamespace="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl" xmlns:typeOrig="http://ce.corp.com/ei/2008/06/MeterReadingRequest" xmlns:typeIn="http://ce.corp.com/ei/2008/06/MeterReadingRequest.xsd" xmlns:typeOut="http://ce.corp.com/ei/2008/06/OutputData.xsd"><wsdl:documentation>A web service to send MeterReadingRequest</wsdl:documentation><!-- type elements define data types used in this wsdl document using xml schema --><wsdl:types>
<xs:schema targetNamespace="http://ce.corp.com/ei/2008/06/MeterReadingRequest.xsd"><xs:import namespace="http://ce.corp.com/ei/2008/06/MeterReadingRequest" schemaLocation="MeterReadingRequest.xsd"/><xs:element name="CreateMeterReading" type="typeOrig:MeterReadingRequest_Type"/>
</xs:schema><xs:schema>
<xs:import namespace="http://ce.corp.com/ei/2008/06/OutputData.xsd" schemaLocation="OutputData.xsd"/></xs:schema>
</wsdl:types><wsdl:message name="createMeterReadingInput">
<wsdl:part name="createMeterReading" element="typeIn:CreateMeterReading"/></wsdl:message><wsdl:message name="acknowledgement">
<wsdl:part name="outputData" element="typeOut:OutputData"/></wsdl:message><wsdl:message name="faultReturn">
<wsdl:part name="faultInfor" element="typeOut:OutputData"><wsdl:documentation>fault information</wsdl:documentation>
</wsdl:part></wsdl:message><wsdl:portType name="MeterReadingRequest">
<wsdl:operation name="CreateMeterReading_Request"><wsdl:documentation>Send create MeterReadingRequest</wsdl:documentation><wsdl:input name="createMeterReadingInput" message="tns:createMeterReadingInput"/><wsdl:output name="createMeterReadingOutput" message="tns:acknowledgement"/><wsdl:fault name="faultInfor" message="tns:faultReturn"/>
</wsdl:operation></wsdl:portType><wsdl:binding name="MeterReadingRequest_Binding" type="tns:MeterReadingRequest">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="CreateMeterReading_Request">
<wsdl:documentation>Send create MeterReadingRequest</wsdl:documentation><soap:operation soapAction="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl" style="document"/><wsdl:input name="createMeterReadingInput">
<soap:body use="literal"/></wsdl:input><wsdl:output name="createMeterReadingOutput">
<soap:body use="literal"/></wsdl:output><wsdl:fault name="faultInfor">
<soap:fault name="faultInfor" use="literal"/></wsdl:fault>
</wsdl:operation></wsdl:binding><wsdl:service name="RequestMeterReading">
<wsdl:port name="MeterReadingRequestPort" binding="tns:MeterReadingRequest_Binding"><soap:address location="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl"/>
</wsdl:port></wsdl:service>
</wsdl:definitions>
<wsdl:types> MeterReadingRequest.xsd
<wsdl:message>
<wsdl:operation>
<wsdl:binding>
<wsdl:service>
Web Service Modeling in EA
Web Service Defined following a CMS Standard Template
• _Service_Name_• Replaced with Service Name in CMS AMI Service Inventory Sheet such as
SendActivityRecord
• _Information_Object_Name_• Replaced with Information Object Name in CMS AMI Service Inventory Sheet such as
ActivityRecord
• _Operation1_Name_ (or 2)• Replaced with one Operation Name in CMS AMI Service Inventory Sheet such as
CreatedActivityRecord_Send
• _WSDL_Version_• Replaced with a WSDL version string such as 2008/11
• _Input_XSD_Version_• Replaced with a WSDL version string such as 2008/10
A standard WSDL template is provided with the following strings to be replaced according to the Service Inventory Sheet
High Level View of SOA Servicescmp SOA Serv ices Ov erv iew
Head End System
ReceiveMeterServiceOrder
ExecuteMeterReadingRequestExecuteMeterSystemEventRequest
Integration Layer: ESB (PI) + MDUS: E&CH
MDUS
ReceiveMeterReadingExecuteMeterReadingRequest
ShowAMIDeviceEvent
OMS
ReceiveAMIDeviceEvent
RequestOutageRecord
CIS
ReceiveMeterSystemEvent
AMI Management System
ReceiveMeterSystemEvent
ReceiveMeterReading
WMSRequestWorkOrder
RequestMeterReading
Note if a Web service is defined based on a template its WSDL should be reverse engineered into EA for deployment and governance.
Questions and Comments