Customization Points
Extendable classes
If classes used by the Windchill ESI renderers described in the Publishing Parts section of this document are extended, the extensions must be defined in certain Windchill ESI preferences or in the ESI service properties file as may be appropriate.
Following are classes that are typically defined in Windchill ESI preferences:
WTPart
Preference name: Part Class
Default value: wt.part.WTPart
WTPartMaster
Preference name: Part Master Class
Default value: wt.part.WTPartMaster
WTPartAlternateLink
Preference name: Part Alternate Link Class
Default value: wt.part.WTPartAlternateLink
The following renderer class is typically defined in the ESI service properties file:
ESIWTPartRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element: cardinality=“duplicate” requestor=”wt.part.WTPart” serviceClass=”com.ptc.windchill.esi.esipart.ESIWTPartRenderer”
The following classes are defined in the file as well, to account for the associated control characteristics, model items and quality links:
ESIControlCharacteristicRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element: cardinality=”duplicate” requestor=”java.lang.Object” selector=”CONTROLCHARACTERISTIC” serviceClass=”com.ptc.windchill.esi.mpml.pmi.ESIControlCharacteristic Renderer”
ESIQualityLinkRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element: cardinality=”duplicate” requestor=”java.lang.Object” selector=“QUALITYLINK” serviceClass=”com.ptc.windchill.esi.mpml.pmi.ESIQualityLinkRenderer”
All of the above classes are designed to permit extensions by customizers.
Configurable Options
Windchill ESI preferences control several configurable options for Windchill ESI part renderer support. The options are:
Defines the name of the Info*Engine task to invoke when obtaining part information from the Windchill Adapter.
Preference name: Query Part Task
Default value: com/ptc/windchill/esi/QueryPart.xml
Defines the name of the Info*Engine task to invoke when obtaining part alternate information from the Windchill Adapter.
Preference name: Query Alternates Task
Default value: com/ptc/windchill/esi/QueryObject.xml
Defines the value for the releaseClass attribute of a ReleaseActivity that identifies a part (as opposed to a BOM).
Preference name: Release Class for Part
Default value: com.ptc.windchill.esi.Part
Defines the life cycle state values in the form of a comma-separated list. Publication of a part is triggered when its life cycle state changes to any of the values specified for the preference. This happens only if the preference Launch ESI Workflow Automatically is set to Yes and the part is not associated with an implemented Change Notice.
Preference name: Configuration Specification State
Default value: RELEASED
* 
The Send To Distribution Target option may be used for triggering the publication of a part, regardless of its lifecycle state.
Specifies whether or not to publish ERP Material information for a part. If set to Yes, ESI services will fetch revision information, soft attributes and associated documents (if any) from the relevant ERP Material object and send them with the ESI response. If set to No, no such information will be sent with the ESI response.
Preference name: Publish ERP Material Information
Default value: No
Specifies whether or not to publish plant specific attributes for a part. If set to Yes, plant specific attributes for a part will be sent with the ESI response. If set to No, no plant specific attributes will be sent.
Preference name: Publish Plant Specific Attributes
Default value: No
There are a few configurable attributes on the distribution target that impact the contents of the ESI response message when publishing a part.
For more information, see Attributes Pertaining to a Part.
* 
With both the attributes, Publish Alternates When Publishing a Part and Publish Control Characteristics when Publishing a Part are set, control characteristics associated to part and alternate part (and the corresponding model items and quality links) are sent as well with the ESI response.
Configure Part rendering to render Enterprise Data object in separate element in ESI Response
Steps to configure:
1. Update ESI ResponseMetaInfo.xml for rendering Enterprise Data object separately. For more information on how to modify this file, see Modify the ESI Response Meta Information File .
2. The Out of the box code has two maps added for example Enterprise Data object types viz. ‘Common Enterprise Data’ and ‘View Specific Enterprise Data’ as ESICommonEnterpriseData and ESIPlantSpecificEnterpriseData. Users can create map objects for the types as required similar to other objects.
<!-- ESI Common Enterprise Data Mapping -->
<esi:Map id="ESICommonEnterpriseDataEx1">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.CommonEnterpriseData">Class</esi
:attributeMapping>
<esi:attributeMapping sourceAttribute="versionInfo.identifier.versionId">Version</esi:attr ibuteMapping>
<esi:attributeMapping sourceAttribute="iterationInfo.identifier.iterationId">Iteration</es i:attributeMapping>
<esi:attributeMapping sourceAttribute="PreviousVersion">PreviousVersion</esi:attributeMapp ing>
<esi:attributeMapping sourceAttribute="MaterialGroup">MaterialGroup</esi:attributeMapping>
</esi:Map>
<!-- ESI Plant Specific Enterprise Data Mapping -->
<esi:Map id="ESIPlantSpecificEnterpriseDataEx1">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx"
defaultValue="com.ptc.windchill.esi.PlantSpecificEnterpriseData">Class</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="view">View</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="StorageLocation">StorageLocation</esi:attributeMapp ing>
</esi:Map>
3. Modify MapInformation object to specify different ‘elementMetaName’ for example ‘CommonData’ and ‘ViewSpecificData’
<!-- ESI Enterprise Data Mapping Information -->
<esi:MapInformation id="ESICommonEnterpriseDataInfoEx01">

<esi:typedef>com.ptc.windchill.enterprise.data.EnterpriseData|com.ptc.windc hill.enterprise.data.enterpriseData.CommonEnterpriseData</esi:typedef>
<esi:elementMetaName>CommonData</esi:elementMetaName>
<esi:keyAttribute>ObjectID</esi:keyAttribute>
<esi:keyAttribute>Version</esi:keyAttribute>
<esi:mapRef>ESICommonEnterpriseDataEx01</esi:mapRef>
</esi:MapInformation>
<!-- ESI Enterprise Data Mapping Information -->
<esi:MapInformation id="ESIPlantSpecificEnterpriseDataInfoEx01">
<esi:typedef>com.ptc.windchill.enterprise.data.EnterpriseData|com.ptc.windc hill.enterprise.data.enterpriseData.PlantSpecificEnterpriseData</esi:typedef>
<esi:elementMetaName>ViewSpecificData</esi:elementMetaName>
<esi:keyAttribute>ObjectID</esi:keyAttribute>
<esi:keyAttribute>Version</esi:keyAttribute>
<esi:mapRef>ESIPlantSpecificEnterpriseDataEx01</esi:mapRef>
</esi:MapInformation>
4. Modify MapInformation object for ESIPartInfo to specify ‘isEnterpriseDataMergeWithElement’ tag as false. This indicates the ESI renderer to render EnterpriseData as a saperate object. Default value of this attribute is ‘true’, that will merge EnterpriseData object attribute to Part element.
<!-- ESI Part Mapping Information-->
<esi:MapInformation id="ESIPartInfo">
<esi:typedef>wt.part.WTPart</esi:typedef>
<esi:elementMetaName>Part</esi:elementMetaName>
<esi:keyAttribute>Number</esi:keyAttribute>
<esi:keyAttribute>Version</esi:keyAttribute>
<esi:keyAttribute>PreviousVersion</esi:keyAttribute>
<esi:keyAttribute>View</esi:keyAttribute>
<esi:keyAttribute>StorageLocation</esi:keyAttribute>
<esi:mapRef>ESIPart</esi:mapRef>

<esi:isEnterpriseDataMergeWithElement>false</esi:isEnterpriseDataMergeW ithElement>
</esi:MapInformation>
5. Specify this new modified meta information file for new or existing target by using Edit Distribution Target or Create Distribution Target UI as required.
6. When Enterprise Data object is rendered as a separate object associated objects like WTDocument/ EPMDocuments and their links will also be rendered to refer to data from these new elements. Otherwise by default document links for and Enterprise Data will be rendered to describe association with part to which Enterprise Data is associated.
這是否有幫助?