ESI 応答メタ情報ファイルの修正
バックグラウンド
指定した宛先に生成される ESI 応答メッセージの構造は、その宛先を表す配布ターゲットに関連付けられているいわゆる ESI 応答メタ情報ファイルのコンテンツによって決まります。このファイルのデフォルトバージョンは <Windchill>\codebase\com\ptc\windchill\esi にあり、ESIResponseMetaInfo.xml という名前が付いています。配布ターゲット (基本的には Windchill の ESI ターゲットオブジェクト) は、デフォルトで responseMetaInfoPath 属性を介してこのファイルを参照します。ユーザーは、そのターゲットに対する ESI 応答の生成に使用するファイルに応じて、この属性の値をほかの値に修正できます。
* 
ESI 応答メタ情報ファイルのコンテンツは、ESI XML フォーマットでメッセージを生成する場合 (つまり、配布ターゲット属性 ESI Response Output FormatESI XML に設定されている場合) にのみ、ESI 応答メッセージの構造に影響します。
大まかに言えば、ESI 応答メッセージには次の 4 つのタイプの XML エレメントが含まれています。
1. <AddedParts><ChangedBOMs> など、ビジネスオブジェクトのグループを表すもの。
2. <Part><BOMHeader> など、オブジェクト自体を表すもの。
3. <ObjectID><Class><LastChangedBy> など、オブジェクトの属性を表すもの。
応答メッセージ内のこれらの各タイプの構造は、ESI 応答メタ情報ファイルの <GroupInformation><MapInformation><Map> の各 XML エレメントによって決まります。
* 
ESI 応答の 4 つ目のエレメントには Release という名前が付いており、そのメッセージのリリース関連情報とトランザクション関連情報が格納されています。ESI 応答メタ情報ファイルのコンテンツはこのエレメントにまったく影響しないので、ここではこのエレメントについては説明しません。
<GroupInformation> エレメントには、メモリ内の ESIGroupInfo オブジェクトの属性を表す子エレメント logicalNamephysicalNamereleaseActivityNeededreleaseClass、および mapInfos が格納されます。これらの属性については、グループ情報クラスとマップ情報クラスのセクションを参照してください。デフォルトの応答メタ情報ファイルからのサンプル <GroupInformation> エレメントを以下に示します。
<esi:GroupInformation>
<esi:logicalName>AddedParts</esi:logicalName>
<esi:physicalName>AddedParts</esi:physicalName>
<esi:releaseClass>com.ptc.windchill.esi.Part</esi:releaseClass>
<esi:releaseActivityNeeded>true</esi:releaseActivityNeeded>
<esi:mapInformationRef>ESIPartInfo</esi:mapInformationRef>
</esi:GroupInformation>
* 
<GroupInformation> エレメントには、ブール値をとる isUnchanged という名前のオプションの XML 属性があります。この属性は、ESI 応答内の変更されていないデータをそのグループに格納するかどうかを指定します。このエレメントにこの属性が指定されていない場合、デフォルト値 false が適用されます。デフォルトの応答メタ情報ファイル内の変更されていないコンテンツを表す各エレメント (変更されていない部品を表す <GroupInformation> エレメントなど) では、この属性の値は true になります。応答メタ情報ファイルにカスタムグループを追加する場合、変更されていないデータが格納されるグループではこの属性を true に設定します。
同様に、<MapInformation> エレメントには、メモリ内の ESIMapInfo オブジェクトの属性を表す子エレメントが格納されます。これらの属性については、グループ情報クラスとマップ情報クラスのセクションを参照してください。デフォルトの応答メタ情報ファイルからのサンプル <MapInformation> エレメントを以下に示します。
<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:MapInformation>
最後に、<Map> エレメントには、マッピングプロセスで使用されるソース属性とターゲット属性を表す子エレメントが格納されます。デフォルトの応答メタ情報ファイルからのサンプル <Map> エレメントを以下に示します。
<esi:Map id="ESIPart">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.Part">Class</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="modifier">LastChangedBy</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="number">Number</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartSerialNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndSerialNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartLotNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndLotNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">SerialNumberEffectivityCxtPartNumber</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">LotNumberEffectivityCxtPartNumber</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="defaultUnit">DefaultUnit</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="name">Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="partType">PartType</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="source">Source</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="state.state">State</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="view" plantSpecificAttribute="true">View</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="storageLocation" plantSpecificAttribute="true">StorageLocation</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="phantom">IsPhantom</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="genericType">IsConfigurable</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="collapsible">IsCollapsible</esi:attributeMapping>
</esi:Map>
上記のサンプルエレメント <GroupInformation><MapInformation>、および <Map> は実際には相互に関連しています。これは、<mapInformationRef > エレメントに関連付けられているコンテンツが <MapInformation> エレメントの id 属性の値と同じであることからわかります。また、<mapRef> エレメントのコンテンツは <Map> エレメントの id 属性の値と同じです。つまり、基本的には、論理名 AddedParts を持つグループでは、id 属性の値が ESIPartInfo である <MapInformation> エレメントにマップ情報が格納され、id 属性の値が ESIPart である <Map> エレメントから、マッピングプロセスに関連するソース属性とターゲット属性の名前 (および存在する場合はそのデフォルト値) がフェッチされます。
* 
上の図のサンプルエレメントは、WTPart に関連する情報を含む ESI 応答メッセージの一部の構造を決定しています。これは、<MapInformation> エレメント内に出現する <typedef> エレメントの値からわかります。
以下のテーブルに、Windchill ビジネスオブジェクトを表す XML エレメント (応答メッセージに表示されるとおり) と、既成の応答メタ情報ファイル内の対応する MapInformation エレメントと Map エレメントを示します。
応答 XML エレメント
MapInformation エレメント
Map エレメント
AlternateLink
ESIAlternateLinkInfo
ESIAlternateLink
AUM
AlternateUnitOfMeasureInfo
AlternateUnitOfMeasure
BOMComponent
BOMComponentInfo
BOMComponent
BOMHeader
BOMHeaderInfo
BOMHeader
Document
DocumentInfo
ESIEPMDocumentInfo
Document
ESIEPMDocument
DocumentLink
DocumentLinkInfo
DocumentLink
ECNHeader
ChangeHeaderInfo
ChangeHeader
EPMMemberLink
ESIEPMMemberLinkInfo
ESIEPMMemberLink
EPMReferenceLink
ESIEPMReferenceLinkInfo
ESIEPMReferenceLink
EPMRepresentation
ESIEPMRepresentationInfo
ESIEPMRepresentation
Part
ESIPartInfo
ESIPart
ReferenceLink
RefDesignatorInfo
RefDesignator
Substitute
SubstituteInfo
Substitute
ProcessPlan
ProcessPlanHeaderInfo
ProcessPlanHeader
Sequence
SequencesInfo
Sequences
Operation
OperationInfo
Operation
ProcessPlanPartLink
ProcessPlanPartLinkInfo
ProcessPlanPartLink
StandardProcedureLink
StandardProcedureLinkInfo
StandardProcedureLink
ConsumableResourceLink
OperationToConsumableResourceLinkInfo
OperationToConsumableResourc
eLink
WorkCenterLink
OperationToWorkCenterLinkInfo
OperationToWorkCenterLink
OprBomAllocatedPart
OperationToPartLinkInfo
OperationToPartLink
OprOperatedOnPart
OperationToOperatedOnPartLinkInfo
OperationToOperatedOnPartLink
Tooling
ToolingInfo
Tooling
ProcessMaterial
ProcessMaterialInfo
ProcessMaterial
Skill
SkillInfo
Skill
ControlCharacteristic
ControlCharacteristicInfo
ControlCharacteristic
PartToControlCharacteristicLink
PartQualityLinkInfo
PartQualityLink
ProcessPlanToControlCharacteristicLink
ProcessQualityLinkInfo
ProcessQualityLink
OperationToControlCharacteristicLink
OperationQualityLinkInfo
OperationQualityLink
ModelItem
ModelItemInfo
ModelItem
ProcessPlanLocalizationLink
ProcessPlanLocalizationLinkInfo
ProcessPlanLocalizationLink
PlantLocalizationLink
PlantLocalizationLinkInfo
PlantLocalizationLink
ResourceBOMHeader
ResourceBOMHeaderInfo
ResourceBOMHeader
ResourceUsageLink
ResourceUsageLinkInfo
ResourceUsageLink
*Part/CommonEnterpriseData
ESICommonEnterpriseDataInfo
ESICommonEnterpriseData
*Part/ViewSpecificEnterpriseData
ESIPlantSpecificEnterpriseDataInfo
ESIPlantSpecificEnterpriseData
ESI Options and Variants がインストールされている場合、以下に示す XML エレメントが設定されます。リリース 11.0 では、Oracle ERP への Options and Variants の統合はサポートされていません。
Product_class
ESIOptionSetInfo
ESIOptionSet
Specification_category
ESIOptionInfo
ESIOption
Specification
ESIChoiceInfo
ESIChoice
Class_category_association
OptionSetOptionLinkInfo
OptionSetOptionLink
Class_specification_association
OptionSetMemberLinkInfo
OptionSetMemberLink
Class_structure_relationship
AssociatedOptionSetLinkInfo
AssociatedOptionSetLink
Class_condition_association
OptionSetRuleLinkInfo
OptionSetRuleLink
条件
RuleInfo
Rule
Condition_member_association
RuleMemberLinkInfo
RuleMemberLink
Condition_action_member_association
RuleMemberActionLinkInfo
RuleMemberActionLink
Specification_expression
ExpressionInfo
Expression
* が付いたエレメントをカスタマイズして、マージとしてレンダリングしたり別個のエレメントとしてレンダリングしたりできます。詳細については、オプションセットのパブリッシングを参照してください。
ESI 応答 XML エレメント
* 
上記のテーブル内の MapInformation Element および Map Element というタイトルのコラムに表示されている値は、実際には、応答メタ情報ファイル内に出現するエレメントの id 属性の値です。応答 XML エレメントの構造を実際に決定するのは、これらのエレメントのコンテンツです。Document 行のこれらのコラムには複数の値が表示されており、それぞれ WTDocument 用と CAD ドキュメント用です。これにより、ESI 応答で同じ XML エレメント名 Document を使用しながら、これらのタイプに異なる属性セットを送信できます。
Windchill ESI 応答は、Info*Engine 仮想データベース (VDB) のコンテンツから toXML Info*Engine API によって生成された XML ドキュメントです。Info*Engine VDB の詳細については、Info*Engine User's Guide を参照してください。この Info*Engine API は、オブジェクトが VDB に追加された順序で XML 出力を生成します。
* 
Info*Engine VDB は VdbBuilder API によって設定され、さらに VdbBuilder API はクラス ESIMapper のマッピング API によって生成された出力を利用します。クラス ESIMapper とそのメソッドについては、マッパークラスのセクションを参照してください。
ESI 応答メタ情報ファイルは、Windchill ESI 応答出力の構造とコンテンツの大部分を定義します。このために、Windchill ESI マッパーに対し、データを取得する場所と、マッパーによって作成された Info*Engine エレメントオブジェクトに取得したデータを追加する順序を知らせます。マッパーからの出力は、応答メタ情報ファイルのコンテンツを必要に応じて変更することによって修正できます。変更後のバージョンのファイルを特定の配布ターゲットに関連付けることで、そのターゲットに送信される応答メッセージに必要な変更を確実に反映させることができます。
すでに述べたように、ESI 応答メタ情報ファイルは XML ファイルです。このファイルの既成のバージョンの完全なリストについては、付録を参照してください。
手順
ESI 応答メタ情報ファイルのコンテンツを変更する場合、既存のファイルを、Windchill メソッドサーバーからアクセス可能な別のディレクトリにコピーする必要があります。任意のエディタを使用してファイルを修正します。このドキュメントのマッパークラスのセクションで説明しているように、ファイル内の各属性マッピングエレメントは、応答メッセージ内の XML エレメント内に特定のビジネスオブジェクトを表す子エレメントを生成します。
* 
Windchill ESI のインストール時に提供された応答メタ情報ファイルを修正しないでください。このファイルは将来ソフトウェアがリリースされる際に置き換えられる可能性があります。このファイルを修正する必要がある場合は、新しい場所にコピーします。
このファイルに対する変更を有効にするには、修正された応答メッセージの生成先の配布ターゲットで responseMetaInfoPath 属性の値を変更します。これを行うには、「サイト」または「組織」「ユーティリティ」オプションの下に表示される「配布を管理」 UI オプションを使用します。開いた「配布ターゲットを編集」 (または「新規配布ターゲット」) ダイアログで、「ESI 応答メタ情報のファイルパス」フィールドの値を変更して、修正されたファイルを指定し、「OK」をクリックして変更を保存します。
* 
1. 「ESI 応答メタ情報のファイルパス」フィールドに入力した値が $CODEBASE$ で始まる場合、ファイルが Windchill コードベースの下にあることを示しています。たとえば、ファイルが <Windchill>/codebase/com/ptc/windchill/esi/modified/ にある場合、この値は $CODEBASE$/com/ptc/windchill/esi/modified/ESIResponseMetaInfoModified.xml という形式をとります。
2. 編集した配布ターゲットにオブジェクトをリリースすると、修正バージョンの応答メタ情報ファイルに従って応答メッセージが生成されます。
* 
応答メタ情報ファイルのコンテンツを変更すると、ESI 応答の構造が変わることがあります。構造が変更されると、Windchill および EAI ソフトウェアコンポーネント内の XML スキーマが同期しなくなります。応答メタ情報ファイルに変更を加える場合、このドキュメントのXML スキーマの作成/修正のセクションの説明に従って XML スキーマを修正する必要があります。さらに、新しいスキーマを使用するように EAI ソフトウェアコンポーネントを修正する必要があります。詳細については、このドキュメントのXML スキーマのセクションを参照してください。
例: <Part> への属性の追加
既成で提供されている応答メタ情報ファイルでは、id 属性の値が ESIPart である Map エレメントが <Part> エレメントの出力を制御します。関連する Map エレメントを以下に示します。
<esi:Map id="ESIPart">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.Part">Class</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="modifier">LastChangedBy</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="number">Number</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartSerialNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndSerialNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartLotNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndLotNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">SerialNumberEffectivityCxtPartNumber</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">LotNumberEffectivityCxtPartNumber</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="defaultUnit">DefaultUnit</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="name">Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="partType">PartType</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="source">Source</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="state.state">State</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="view" plantSpecificAttribute="true">View</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="storageLocation" plantSpecificAttribute="true">StorageLocation</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="phantom">IsPhantom</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="genericType">IsConfigurable</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="collapsible">IsCollapsible</esi:attributeMapping>
</esi:Map>
* 
上記の Map エレメントは単に説明用として提供されており、ESI Services の CD に付属する ESIResponseMetaInfo.xml ファイル内の Map エレメントとは異なる場合があります。
上記の Map エレメントを使用した場合、ESI マッパーは以下の構造を持つ XML エレメントを生成します。
Part XML エレメントのデフォルト構造
応答メタ情報ファイル内の Map エレメントが修正されて部品の属性 traceCode に対応するエントリが追加された場合、以下に示す形式になります。
<esi:Map id="ESINewPart">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.Part">Class</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="modifier">LastChangedBy</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="number">Number</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartSerialNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndSerialNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">StartLotNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">EndLotNumberEffectivity</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">SerialNumberEffectivityCxtPartNumber</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">LotNumberEffectivityCxtPartNumber</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="defaultUnit">DefaultUnit</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="name">Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="partType">PartType</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="source">Source</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="state.state">State</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="view" plantSpecificAttribute="true">View</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="storageLocation" plantSpecificAttribute="true">StorageLocation</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="phantom">IsPhantom</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="genericType">IsConfigurable</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="collapsible">IsCollapsible</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="traceCode">TraceCode</esi:attributeMapping>
</esi:Map>
* 
上記の Map エレメントは、(i) その id 属性の値が異なり、(ii) traceCode 属性用の追加の attributeMapping エレメントがあるという点で、デフォルトのバージョンとは異なります。
(i) に関しては、各 ESI インストールで、各 Map エレメントの id 属性が一意の値を持つ必要があります。これに対し、同じ値が 2 つ以上のバージョンの応答メタ情報ファイル間で共有されている場合 (id を共有する Map エレメントが異なる場合)、応答の生成には Map エレメントの 1 つのバージョンだけが使用され、これは想定されているものとは明らかに異なります。また、特定の Map エレメントの id 属性の値を変更する場合、対応する MapInformation エレメントにも変更を加える必要があります。上記の Map エレメントに対応する修正バージョンの MapInformation エレメントを以下に示します。
<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>ESINewPart</esi:mapRef>
</esi:MapInformation>
* 
mapRef エレメントの値が Map エレメントの id 属性の値と一致しています。
上記の変更が加えられた応答メタ情報ファイルが <Windchill>/codebase/com/ptc/windchill/esi/examples/ESIResponseMetaInfoExample1.xml にあります。
「配布を管理」 UI を使用して、既存のターゲットの「配布ターゲットを編集」ダイアログを開き、「ESI 応答メタ情報のファイルパス」フィールドの値を変更してファイル ESIResponseMetaInfoExample1.xml に設定します。「OK」をクリックしてターゲットを保存した後、編集したターゲットに WTPart を関連付けてリリースします。
* 
または、「配布を管理」 UI から「新規配布ターゲット」ダイアログを開き、先ほどのフィールドの値をファイル ESIResponseMetaInfoExample1.xml に設定することもできます。この新しく作成されたターゲットに WTPart を関連付けてリリースできます。
* 
応答メタ情報ファイルのコンテンツを変更すると、ESI 応答の構造が変わることがあります。構造が変更されると、Windchill および EAI ソフトウェアコンポーネント内の XML スキーマが同期しなくなります。応答メタ情報ファイルに変更を加える場合、このドキュメントのXML スキーマの作成/修正のセクションの説明に従って XML スキーマを修正する必要があります。さらに、新しいスキーマを使用するように EAI ソフトウェアコンポーネントを修正する必要があります。詳細については、このドキュメントのXML スキーマのセクションを参照してください。
ファイル ESIResponseMetaInfoExample1.xml が使用された場合、Windchill ESI マッパーは次の出力を生成します。
カスタマイズされた Part XML エレメントの構造 - 例 1
カスタマイズされた応答メタ情報ファイルを使用した場合に生成される Windchill ESI 応答の XML スキーマ定義が <Windchill>/codebase/com/ptc/windchill/esi/examples/Example1.xsd にあります。
カスタマイズされた応答メタ情報ファイルを使用した場合に生成される Windchill ESI の応答が <Windchill>/codebase/com/ptc/windchill/esi/examples/Example1.xml にあります。
* 
応答メタ情報ファイルとスキーマファイルには子エレメント ViewStorageLocation が存在しますが、上記の応答ファイル内の Part エレメントにはこれらの子エレメントがありません。これは「プラント特有情報をパブリッシング」プリファレンスがデフォルト値 (「いいえ」) に設定されている場合にのみ起こります。ESI 応答で上記の子エレメントが送信されるようにするには、このプリファレンスを「はい」に設定します。このトピックの詳細については、このドキュメントの後のセクションで説明します。
* 
複数の配布ターゲット (通常は複数の Oracle Applications インスタンスに属する) を部品に関連付けた後で、部品をリリースできます。そのような場合、特定の Oracle Applications インスタンスに属しているターゲットのセットごとに応答メッセージが生成されます。特定のターゲットに生成されるメッセージの構造は、そのターゲットに使用されている応答メタ情報ファイルのコンテンツによって決まります。したがって、ターゲットは responseMetaInfoPath 属性を適切にカスタマイズされたバージョンの応答メタ情報ファイルに設定することによって、希望する構造で応答メッセージを受信できます。
推奨されるベストプラクティスとしては、特定の Oracle Applications インスタンスに属するすべての配布ターゲットに同じ ESI 応答メタ情報ファイルを使用します。
アドホックインスタンスベース属性
Windchill PDMLink では、モデルを変更することなく、wt.part.WTPart などのモデル化クラスに属性を追加できます。これを行うには、Windchill タイプマネージャを使用します。詳細については、「特殊な管理」を参照してください。ソフトタイプを作成することでモデル化クラスを拡張したり、モデル化クラスに属性を追加したりすると、このドキュメントの前のセクションで説明したように、適切に修正されたバージョンの ESI 応答メタ情報ファイルがターゲット (オブジェクトのリリース先) で使用されている場合、Windchill ESI サービスは追加された属性を取得します。
Windchill PDMLink では、Windchill タイプマネージャを使用せずに、wt.part.WTPart など、IBAHolder であるモデル化クラスにインスタンスベース属性 (IBA) を追加することもできます。この方法で追加された IBA をアドホック属性と呼びます。
IBAHolder オブジェクトの詳細については、Windchill Application Developer's Guide を参照してください。
IBA を wt.part.WTPart に追加する方法については、Windchill User's Guide を参照してください。
上記のいずれかの方法によって wt.part.WTPart オブジェクトに追加された属性をパブリッシングする場合は、(i) 適切に修正されたバージョンの ESI 応答メタ情報ファイルを作成し、(ii) 関連する配布ターゲットを編集 (または新しい配布ターゲットを作成) して、修正後のバージョンのファイルを指定する必要があります。このように編集した (または作成した) ターゲットに部品をリリースすると、部品の追加された属性が ESI 応答で送信されます。
* 
ESI 応答メタ情報ファイルのコンテンツを修正する際には、ESI 応答メタ情報ファイルの修正のセクションで説明されている手順に従ってください。
* 
(追加した属性に応じて) 応答メタ情報ファイルのコンテンツを変更すると、ESI 応答の構造が変わることがあります。構造が変更されると、Windchill および EAI ソフトウェアコンポーネント内の XML スキーマが同期しなくなります。応答メタ情報ファイルに変更を加える場合、このドキュメントの「XML スキーマの作成/修正」のセクションの説明に従って XML スキーマを修正する必要があります。さらに、新しいスキーマを使用するように EAI ソフトウェアコンポーネントを修正する必要があります。詳細については、このドキュメントの「XML スキーマ」のセクションを参照してください。
ESI 応答情報ファイルを修正する際の注意事項
応答メタ情報ファイルのコンテンツを修正する際には、以下の点に注意してください。
1. ファイルをデフォルトの場所から直接修正しないでください。必ずファイルのコピーを作成して修正します。ファイルを直接修正した場合、以降のメンテナンスリリースにインストールを更新したときに変更内容が消去される可能性があります。また、これらのターゲットがカスタムデータを受信する必要がある場合、応答メタ情報ファイルの修正バージョンを作成して配布ターゲットに関連付けることができます。
2. Map エレメントを修正する際には、その id 属性の値が一意になるようにします。つまり、同じバージョンまたはほかのアクティブなバージョンのファイル内のほかの Map エレメントによってこの値が使用されていてはなりません。この条件が満たされていない場合、修正されたファイルを参照する配布ターゲットを保存しようとするとエラーが発生します。
3. 新しい id 属性で Map エレメントを作成する場合、mapReference エレメントのコンテンツが id 属性の値と等しい MapInformation エレメントも作成します。または、既存の MapInformation エレメントの mapRef element を適宜修正できます。
4. コンテンツが変更された場合を除き、Map エレメントの id 属性を修正しないでください。
5. MapInformation エレメントを新規作成 (または既存のエレメントを修正) する場合、その id 属性がファイル内で一意の値を持つようにします。異なるバージョンのファイル間でもこの値を一意にすることをお勧めしますが、必須ではありません。
6. 新しい id 属性で MapInformation エレメントを作成する場合、mapInformationRef エレメントのコンテンツが id 属性の値と等しい GroupInformation エレメントがファイルに存在するようにします。
7. GroupInformation エレメントの logicalName エレメントの値を変更するのはエラーです。physicalName エレメントの値は修正できますが、ほとんどの場合、以下のファイルを適宜修正する必要があります。
<Windchill>/tasks/com/ptc/windchill/esi/lite/GetPostResultInfoForTarget.xsl
8. 部品の ERP 材料 (またはプラント固有) 属性をパブリッシングする必要がある場合、(i) 関連する attributeMapping エントリを部品の Map エレメントに追加し、(ii) 必要に応じて、XML 属性 erpMaterialAttribute (または plantSpecificAttribute) を true に設定します。
9. ターゲットによってすでに参照されている応答メタ情報ファイルに対する変更を有効にするには、(i) メソッドサーバーを再起動するか、(ii) 参照元ターゲットの Status 属性を Active から Inactive に切り替えて、保存してから、属性を再び Active にリセットします。
10. オブジェクトのソフトタイプ (モデル化された) 拡張バージョンをパブリッシングする場合、拡張元のオブジェクトと比較して拡張バージョンに異なる属性セットをパブリッシングする必要がある場合にのみ、応答メタ情報ファイルは変更を必要とします。つまり、拡張バージョンが親オブジェクトと同じ属性セットを持つかぎり、ファイルのデフォルトバージョン自体で十分です。
11. カスタムグループを表す <GroupInformation> エレメントを追加する際には、以下に示すように、必要に応じて属性 isUnchanged を設定してください。
< esi:GroupInformation isUnchanged="true">
< esi:logicalName>MyUnchangedType< /esi:logicalName>
...
< /esi:GroupInformation>
12. 上記の例では、MyUnchangedType という名前のカスタムグループは、変更されていないデータを ESI 応答で保持することを目的としているので、属性 isUnchangedtrue に設定する必要があります。応答メタ情報ファイルのコンテンツは、XML フォーマットでメッセージを生成する場合 (配布ターゲット属性 ESI Response Output FormatESI XML に設定されている場合) にのみ ESI 応答メッセージに影響します。つまり、PLM フォーマットで ESI 応答を生成する際には、このファイルは何の役割も果たしません。
これは役に立ちましたか?