進階自訂 > Windchill ESI Customization > Windchill ESI Customization—SAP > Windchill ESI Services Customization Scenarios
Windchill ESI Services Customization Scenarios
Functional Overview
Windchill ESI services provide getXXX() APIs that allow enterprise applications access to CNs, BOMs, Parts, Promotion Requests, Process Plans, Resources, standalone Documents and Documents related to Parts, Process Plans, Sequences, Operations and Resources.The APIs are coded to extract data describing specific Windchill objects by reading the objects’ attributes and mapping them to XML. The XML format is described in the Windchill Enterprise Systems Integration Open Application Programming Interface Guide.
Object attribute types supported by Windchill ESI services include modeled attributes, instance based attributes (IBAs), and soft-typed attributes. Typically, a modeled attribute is local to the object and can be obtained by a "getter" method that is created by the Windchill code generation process. Sometimes, though, the API code must derive the attribute value by calculation or navigating object relationships. In those cases, the getter method is not provided by code generation. Relevant methods must be coded explicitly to navigate relationships and obtain the attribute value.
Generally, when custom attributes are modeled, they can be mapped in Windchill ESI by performing a configuration procedure. But for non-local custom attributes, a customization procedure is required (see Glossary for a definition of non-local custom attributes).
The following table describes how customized Windchill Objects are supported in ESI Services:
ESI Support of Customized Windchill Objects
Specific Use
RPC
Relevant Event
Windchill Objects4
Procedure Applied
Publish a WTPart
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
None, works as is
Publish a a with documents; documents requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
None, works as is
Publish a WTPart; documents modified, but documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
None, works as is
Publish a WTPart with custom additional modeled5 attributes not mapped6; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
None, works as is
Publish a WTPart with custom additional IBA or soft-typed attributes7 not mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
None, works as is
* 
WTDocument, WTDocumentMaster, and EPMDocument are only affected if the relevant Windchill ESI RPC supports documents and if the Windchill ESI RPC invocation requests that documents be included. Windchill ESI RPCs GetPart, GetBOM, GetECN, GetProcessPlan and GetResource do support documents.
Attributes described in the table as “modeled” attributes are presumed to have public getter methods.
Non-mapped attributes are not included in the Windchill ESI Open API RPC responses.
Windchill ESI uses the Windchill Adapter Query-Objects webject to obtain all the attributes of parts and part master objects. As long as the Query-Objects webject returns the attribute, that attribute is available to Windchill ESI mapping logic.
Specific Use
RPC
Relevant Event
Windchill Objects4
Procedure Applied
Publish a WTPart with custom additional modeled attributes on a part usage link, substitute link, reference designator link, and/or alternate link that are not mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
None, works as is
Publish a WTPart with custom additional modeled attributes that are mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify the response meta information file and associate to the relevant distribution targets
Modify XML schema8
Publish a WTPart with custom additional modeled attributes on a substitute, alternate, or reference designator links that are mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify the response meta information file and associate to the relevant distribution targets
Modify XML schema
* 
Although it is possible to change the XML schema by customization, it is safer to create a custom RPC so that future Windchill ESI maintenance will not overlay customizations.
Specific Use
RPC
Relevant Event
Windchill Objects4
Procedure Applied
Publish a WTPart with extensions of substitute, reference designator, or alternate links, additional modeled attributes on the extensions that are not mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify ESI preferences
Publish a WTPart with extensions of substitute, reference designator, or alternate links, additional modeled attributes on the extensions that are mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify the response meta information file and associate to the relevant distribution targets
Modify XML schema
Modify ESI preferences
Publish a WTPart with custom additional modeled attributes on a part usage link that are mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Customization:
Extend java code9
Modify the response meta information file and associate to the relevant distribution targets
Modify ESI preferences
* 
The Windchill BOM difference logic does not expose the part usage links directly. Instead it returns a set of wrapper objects of class, PartUsageInfo. If attributes are to be available to Windchill ESI mapping logic, PartUsageInfo must be modified. Otherwise, Windchill ESI java code must be modified to obtain the required attribute value(s).
Specific Use
RPC
Relevant Event
Windchill Objects4
Procedure Applied
Publish a WTPart after modifying the master relationship between WTPart and WTPartMaster10
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Extend ESI java code
Modify ESI preferences
Publish a custom object, MyPart, extended from WTPart and/or a custom object, MyPartMaster, extended from WTPartMaster with additional modeled or non-modeled attributes which are not mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify ESI preferences11
Modify the response meta information file and associate to the relevant distribution targets
* 
Windchill WTPart objects are related to WTPartMaster objects by a complex relationship that is defined by the Windchill code generation tool. The relationship is central to product structure navigation and to the release of parts by Windchill ESI. Changing the relationships will disrupt Windchill ESI logic. These are the kinds of modifications that require java coding to repair the disruption of Windchill ESI logic:
Replacing the existing relationship implementation with a link class
Creating a new object, extending WTPart, that disrupts the inherited relationship to WTPartMaster
Creating a new object, extending WTPartMaster, that disrupts the inherited relationship to WTPart
The preferences define the name of the part class and the part master class. If these property values are changed, then it will only be possible to release the extension objects identified by the values. The GetPart RPC will no longer support WTPart and/or WTPartMaster.
Specific Use
RPC
Relevant Event
Windchill Objects4
Procedure Applied
Publish a custom object, MyPart, extended from WTPart and/or a custom object, MyPartMaster, extended from WTPartMaster with additional modeled or non-modeled attributes which are mapped; documents not modified or documents not requested
GetPart
GetBOM
GetECN
Part or change ready to publish
MyPart and/or
MyPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify ESI preferences12
Modify the response meta information file and associate to the relevant distribution targets
Modify XML schema
Publish a WTPart with documents requested and modeled attributes, IBAs or soft-typed attributes have been added to WTDocument, WTDocumentMaster, and/or EPMDocument
GetPart
GetBOM
GetECN
Part or change ready to publish
MyPart and/or
MyPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify the response meta information file and associate to the relevant distribution targets
Modify ESI preferences13
Define XML schema
Publish a custom object, MyPart, extended from WTPart and/or a custom object, MyPartMaster, extended from WTPartMaster with additional modeled or non-modeled attributes which are mapped
Custom14
Part or change ready to publish
WTPart
Windchill ESI Customization:
Author a custom RPC
Define XML Schema
* 
The preferences define the name of the part class and the part master class. If these property values are changed, then it will only be possible to release the extension objects identified by the values. The GetPart RPC will no longer support WTPart and/or WTPartMaster.
Declare the document soft type.
Specific Use
RPC
Relevant Event
Windchill Objects4
Procedure Applied
Publish a WTPart with documents requested and:
Document class (es) extended15 or
Document links modified
Custom16
Part or change ready to publish
MyPart and/or
MyPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Customization:
Customize Document Difference API
Extend ESI java code
Author a custom RPC
Define XML Schema
Publish a WTPart with modified linkages to (or services supporting) non-local mapped attributes or modified services supporting non-local mapped attributes17
Custom
Part or change ready to publish
WTPart
Windchill ESI Customization:
Author a custom RPC
Modify XML Schema
Publish a WTPart with modified linkages (uses, substitute, or references)
Custom
Part or change ready to publish
WTPart
ESI Customization:
Author a custom RPC based on GetBOM and/or GetECN
Customize BOM Difference API
Modify XML Schema
Publish aWTChangeOrder2
GetECN
Change ready to publish
WTChangeOrder2
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
None, works as is
* 
The Windchill ESI GetPart RPC will still support WTPart and WTPartMaster in this case.
In this category extensions do not include soft types. Adding a new soft type document is a configuration option. See above.
GetPart, GetBOM and GetECN could be customized in this case, but such a customization would be vulnerable to future ESI maintenance. A custom RPC is a safer choice.
For example, modifying the part alternate relationship.
Specific Use
RPC
Relevant Event
Windchill Objects4
Procedure Applied
Publish a WTChangeOrder2 with additional attributes not mapped
GetECN
Change ready to publish
WTChangeOrder2
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
None, works as is
Publish a WTChangeOrder2 with additional attributes mapped
GetECN
Change ready to publish
WTChangeOrder2
WTPart
WTPartMaster
WTDocument
WTDocumentMaster
EPMDocument
Windchill ESI Configuration:
Modify the response meta information file and associate to the relevant distribution targets
Modify XML schema
Publish a custom object, MyObject, not extended from WTPart
Custom
MyObject ready to publish
MyObject
Windchill ESI Customization:
Author a custom RPC
Modify XML Schema
Modify ESITarget
Custom
Any
Any
See Distribution Targets for details.
For the current release, associated documents are only published if they are related to a Windchill part, operation or a resource (as noted in an earlier section of this document, documents related to process plans and sequences are processed by ESI services and sent with the ESI RPC response, but these are ignored by the middleware business logic). Documents published by Windchill ESI are obtained by Windchill ESI Services from the Windchill document-difference logic. See Document Attachment Differences for information about customizing the Windchill document- difference logic.
* 
Although the above table lists only use cases pertaining to parts, BOMs, change notices and associated documents, use cases on similar lines are also possible with standalone documents (in both object-centric and CN-centric modes), promotion requests and all of the MPMLink objects that are supported for this release - viz., process plans and resources such as tooling, process materials and skills. The relevant RPCs for these objects would be GetDocument, GetPromotionRequest, GetProcessPlan and GetResource, and the affected objects would be WTDocument, EPMDocument, PromotionNotice, MPMProcessPlan, MPMSequence, MPMOperation, MPMTooling, MPMProcessMaterial and MPMSkill among others.
By GetXXX PRC is meant the getXXX() API of the concrete implementation of ESIService (StandardESIService by default).
The contents of the Relevant Event column in the table simply refer to the user action that triggers the publication (for example, setting the lifecycle state of an object to Released). It is important to be aware that no event is emitted by ESI services and passed to the EAI software components upon triggering the publication of an object; instead, ESI services proceed to generate the ESI response directly and hand it over to the EAI software components.
Advantages
Provides greater solution flexibility without coding. This in turn reduces deployment cost and time.
Provides a supported customization path for situations not covered by OOTB code. This is an enhancement over RTP.
Constraints
Windchill ESI uses the Windchill Adapter Query-Objects webject to obtain all the attributes of parts and part master objects, as well as the attributes of supported documents types. If the Query-Objects webject does not return the attribute, that attribute is not available to the ESI mapping logic.
Windchill ESI BOM processing uses the Windchill Standard WTPart Service BOM difference calculation. BOM difference customizations are required if:
New object types are included on a BOM.
New relationships are relevant to a BOM structure.
Additional data elements are to be considered when determining whether a change has been made.
ESI document processing uses the Windchill Standard WTPart Service part document difference calculation. Part document difference customizations are required if:
New links are relevant to the part/document relationship.
Additional data elements are to be considered when determining whether a change has been made.
Changing the existing relationships (associations) between existing Windchill objects always requires customization of Windchill ESI.
Adding relationships between existing Windchill objects requires customization of ESI if the relationships, relationship attributes, or objects participating in the relationship are to be included in the data that is published by Windchill ESI.
這是否有幫助?