カスタマイズポイント
拡張可能なクラス
このドキュメントの「部品のパブリッシング」のセクションで説明されている Windchill ESI レンダラーによって使用されるクラスを拡張した場合、その拡張を必要に応じていくつかの Windchill ESI プリファレンスまたは ESI サービスのプロパティファイルで定義する必要があります。
Windchill ESI プリファレンスで一般的に定義されているクラスを以下に示します。
WTPart
プリファレンス名: 部品クラス
デフォルト値: wt.part.WTPart
WTPartMaster
プリファレンス名: 部品マスタークラス
デフォルト値: wt.part.WTPartMaster
WTPartAlternateLink
プリファレンス名: 部品代替リンククラス
デフォルト値: wt.part.WTPartAlternateLink
以下のレンダラークラスは、通常は ESI サービスのプロパティファイルで定義されています。
ESIWTPartRenderer
サービスプロパティ名: com.ptc.windchill.esi.rnd.ESIRenderer
<Option> エレメントの属性のデフォルト値:
cardinality="duplicate"
requestor="wt.part.WTPart"
serviceClass="com.ptc.windchill.esi.esipart.ESIWTPartRenderer"
関連する管理特性、モデルアイテム、および品質リンクに対応するため、以下のクラスもこのファイルで定義されています。
ESIControlCharacteristicRenderer
サービスプロパティ名: com.ptc.windchill.esi.rnd.ESIRenderer
<Option> エレメントの属性のデフォルト値:
cardinality="duplicate"
requestor="java.lang.Object"
selector="CONTROLCHARACTERISTIC"
serviceClass="com.ptc.windchill.esi.mpml.pmi.ESIControlCharacteristicRe nderer"
ESIQualityLinkRenderer
サービスプロパティ名: com.ptc.windchill.esi.rnd.ESIRenderer
<Option> エレメントの属性のデフォルト値:
cardinality="duplicate"
requestor="java.lang.Object"
selector="QUALITYLINK"
serviceClass="com.ptc.windchill.esi.mpml.pmi.ESIQualityLinkRenderer"
上記のすべてのクラスはカスタマイズ担当者による拡張が許可されています。
コンフィギュレーション可能なオプション
Windchill ESI プリファレンスは、Windchill ESI 部品レンダラーをサポートするためのいくつかのコンフィギュレーション可能なオプションを制御します。以下のオプションがあります。
Windchill アダプタから部品情報を取得する際に呼び出す Info*Engine タスクの名前を定義します。
プリファレンス名: 部品照会タスク
デフォルト値: com/ptc/windchill/esi/QueryPart.xml
Windchill アダプタから部品代替情報を取得する際に呼び出す Info*Engine タスクの名前を定義します。
プリファレンス名: 代替部品照会タスク
デフォルト値: com/ptc/windchill/esi/QueryObject.xml
(BOM ではなく) 部品を識別する ReleaseActivity の releaseClass 属性の値を定義します。
プリファレンス名: 部品のリリースクラス
デフォルト値: com.ptc.windchill.esi.Part
ライフサイクル状態の値をコンマ区切りリストの形式で定義します。部品のライフサイクル状態がこのプリファレンスで指定されている値のいずれかに変わると、その部品のパブリッシングがトリガーされます。これは、「ESI ワークフローを自動的に開始」プリファレンスが「はい」に設定され、実装されている変更通知に部品が関連付けられていない場合にのみ発生します。
プリファレンス名: コンフィギュレーション仕様の状態
デフォルト値: リリース済み
* 
「配布ターゲットに送信」オプションを使用して、部品のライフサイクル状態に関係なく、部品のパブリッシングをトリガーできます。
部品の ERP 材料情報をパブリッシングするかどうかを指定します。「はい」に設定した場合、ESI サービスは関連する ERP 材料オブジェクトからリビジョン情報、ソフト属性、関連ドキュメント (存在する場合) をフェッチし、ESI 応答で送信します。「いいえ」に設定した場合、ESI 応答でこれらの情報は送信されません。
プリファレンス名: ERP 材料情報をパブリッシング
デフォルト値: いいえ
部品のプラント固有属性をパブリッシングするかどうかを指定します。「はい」に設定した場合、部品のプラント固有属性が ESI 応答で送信されます。「いいえ」に設定した場合、プラント固有属性は送信されません。
プリファレンス名: プラント特有情報をパブリッシング
デフォルト値: いいえ
配布ターゲットには、部品のパブリッシング時に ESI 応答メッセージのコンテンツに影響を与えるいくつかのコンフィギュレーション可能属性があります。
詳細については、Windchill ヘルプセンターの「配布ターゲット属性」のトピックにある Attributes Pertaining to a Part のセクションを参照してください。
* 
「部品のパブリッシング時に、代替部品をパブリッシング」属性と「部品のパブリッシング時に管理特性をパブリッシング」属性の両方が設定されている場合、部品と代替部品に関連付けられている管理特性 (および対応するモデルアイテムと品質リンク) が ESI 応答で送信されます。
ESI 応答でエンタープライズデータオブジェクトを別個のエレメントにレンダリングするための部品レンダリングの設定
設定する手順は以下のとおりです。
1. EnterpriseData オブジェクトを別個にレンダリングするために ESI ResponseMetaInfo.xml を更新します。このファイルの修正方法については、ESI 応答メタ情報ファイルの修正を参照してください。
2. 既成のコードには 2 つのマップが追加されています。たとえば、EnterpriseData オブジェクトタイプ「共通エンタープライズデータ」および「ビュー特有のエンタープライズデータ」が ESICommonEnterpriseData および ESIPlantSpecificEnterpriseData として追加されています。ほかのオブジェクトと同様に、必要に応じてこれらのタイプのマップオブジェクトを作成できます。
<!-- 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:attrib uteMapping>
<esi:attributeMapping sourceAttribute="iterationInfo.identifier.iterationId">Iteration</esi: attributeMapping>
<esi:attributeMapping sourceAttribute="PreviousVersion">PreviousVersion</esi:attributeMappin g>
<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:attributeMappin g>
</esi:Map>
3. MapInformation オブジェクトを修正して、CommonData や ViewSpecificData などの異なる elementMetaName を指定します。デフォルトのメタ情報ファイルでは、この値は Part に設定されています。これは Part として指定されているので、デフォルトのロジックにより、このオブジェクトは Part エレメントでレンダリングされた WTPart オブジェクト属性にマージされます。elementMetaName が Part 以外の値に指定されている場合、それぞれ CommonData および ViewSpecificData という名前で新規エレメントのレンダリングが開始されます。
<!-- ESI Enterprise Data Mapping Information -->
<esi:MapInformation id="ESICommonEnterpriseDataInfoEx01">
<esi:typedef>com.ptc.windchill.enterprise.data.EnterpriseData|com.ptc.windchi ll.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.windchi ll.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. 必要に応じて「配布ターゲットを作成」/「配布ターゲットを編集」 UI を使用して、新規または既存のターゲットにこの新しく修正されたメタ情報ファイルを指定します。
5. エンタープライズデータオブジェクトが別個のオブジェクトとしてレンダリングされる場合、WTDocument/EPMDocument などの関連オブジェクトのリンクも、これらの新規エレメントのデータを参照するようにレンダリングされます。そうでない場合、EnterpriseData のデフォルトのドキュメントリンクは、EnterpriseData が関連付けられている部品との関連付けの詳細を表すようにレンダリングされます。
ESI 応答でプラント機能データオブジェクトを別個のエレメントにレンダリングするための部品レンダリングの設定
設定する手順は以下のとおりです。
1. PlantFunctionalData オブジェクトを別個にレンダリングするために ESI ResponseMetaInfo.xml を更新します。
2. 既成のコードにはマップが 1 つ追加されています。たとえば、PlantFunctionalData オブジェクトタイプ「プラント機能データ」が ESIPlantFunctionalData として追加されています。プラント機能データオブジェクトに新規属性が追加された場合、そのソフトタイプを ESIPlantFunctionalData マップにエレメントとして追加し、
<esi:isEnterpriseDataMergeWithElement>false</esi:isEnterpriseDataMergeWi thElement> を ESIPartInfo に追加する必要があります。
または、ほかのオブジェクトと同様に、必要に応じてこれらのタイプのマップオブジェクトを作成できます。
<!-- ESI Plant Specific Enterprise Data Mapping -->
<esi:Map id="ESIPlantFuncationalDataEx1">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.PlantFunctionalData">Class</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="name">Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="number">Number</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="description">Description</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="versionInfo.identifier.versionId">Version</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="iterationInfo.identifier.iterationId">Iteration</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="PreviousVersion">PreviousVersion</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="view">View</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="alternate1">SupplyChain</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="alternate2">Location</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="category">Category</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="vsedObjID">AssociatedObjectID</esi:attributeMapping>
</esi:Map>
MapInformation オブジェクトを修正して、PlantFuncData などの異なる elementMetaName を指定します。デフォルトのメタ情報ファイルでは、この値は Part に設定されています。これは Part として指定されているので、デフォルトのロジックにより、このオブジェクトは Part エレメントでレンダリングされた WTPart オブジェクト属性にマージされます。elementMetaName が Part 以外の値に指定されている場合、PlantFuncData という名前で新規エレメントのレンダリングが開始されます。
<!-- ESI Plant Functional Data Mapping Information -->
<esi:MapInformation id=" ESIPlantFuncationalDataEx1">
<esi:typedef>com.ptc.windchill.enterprise.data.PlantFunctionalData</esi:typedef>
<esi:elementMetaName>PlantFuncData</esi:elementMetaName>
<esi:keyAttribute>ObjectID</esi:keyAttribute>
<esi:keyAttribute>Version</esi:keyAttribute>
<esi:mapRef>ESIPlantFuncationalDataEx1</esi:mapRef>
</esi:MapInformation>
必要に応じて「配布ターゲットを作成」/「配布ターゲットを編集」 UI を使用して、新規または既存のターゲットにこの新しく修正されたメタ情報ファイルを指定します。
ESI 応答でのプラント機能データオブジェクト属性のカスタマイズ (PFD 属性が部品とマージされる場合)
プラント機能データオブジェクトに新規属性が追加された場合、これを <Part> のエレメントとしてレンダリングするために、次の操作を行う必要があります。
ESIWTPartRenderer を拡張して adjustPFDElement() API をオーバーライドします。
以下の XML ドキュメントは、新しい部品レンダラークラスをアクティブ化する xconfmanager コマンドへの入力として機能します。
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Configuration SYSTEM "xconf.dtd"> <Configuration targetFile="codebase/service.properties"> <!-- The ESIRenderer entries for use by com.windchill.esi.rnd.ESIRendererFactory -->
<Service context="default" name="com.ptc.windchill.esi.rnd.ESIRenderer">
<Option cardinality="duplicate" requestor="wt.part.WTPart" serviceClass="com.ptc.windchill.esi.esipart.CustomPFDRenderer "/> </Service> </Configuration>
このファイルは以下の場所にあります。
<Windchill>/codebase/com/ptc/windchill/esi/examples/Example2.service.prop erties.xconf
以下のコマンドは、このファイルで指定された変更を以下のファイルに反映します。
<Windchill>/codebase/service.properties:
xconfmanager –i codebase/com/ptc/windchill/esi/examples/Example2.service.properties.xconf –p
ESI 応答で PFD 属性を description エレメントの属性としてレンダリングするように XSLT (EnterpriseData.xsl) を修正します。
これは役に立ちましたか?