バックグラウンド
指定した宛先に生成される ESI 応答メッセージの構造は、その宛先を表す配布ターゲットに関連付けられているいわゆる ESI response meta information file のコンテンツによって決まります。このファイルのデフォルトバージョンは <Windchill>\codebase\com\ptc\windchill\esi にあり、ESIResponseMetaInfo.xml という名前が付いています。配布ターゲット (基本的には WindchillESITarget オブジェクト) は、デフォルトで 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 オブジェクトの属性を表す子エレメントが格納されます。これらの属性については、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="xxxx">EnterpriseVersion</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="xxxx">AssociatedEffectivityID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="isAllocatedAsResource">IsAllocatedAsResource</esi:attributeMapping>
</esi:Map>
上記のサンプルエレメント <GroupInformation><MapInformation>、および <Map> は実際には相互に関連しています。これは、<mapInformationRef > エレメントに関連付けられているコンテンツが
<MapInformation> エレメントの属性の値と同じであることからわかります。また、<mapRef> エレメントのコンテンツは <Map> エレメントの id 属性の値と同じです。つまり、基本的には、論理名 AddedParts を持つグループでは、
id 属性の値が ESIPartInfo である <MapInformation> エレメントにマップ情報が格納され、id 属性の値が ESIPart である <Map> エレメントから、マッピングプロセスに関連するソース属性とターゲット属性の名前 (および存在する場合はそのデフォルト値) がフェッチされます。
* 
上の図のサンプルエレメントは、WTPart に関連する情報を含む ESI 応答メッセージの一部の構造を決定しています。これは、<MapInformation> エレメント内に出現する <typedef> エレメントの値からわかります。
以下のテーブルに、Windchill ビジネスオブジェクトを表す XML エレメント (応答メッセージに表示されるとおり) と、既成の応答メタ情報ファイル内の対応する MapInformation エレメントと Map エレメントを示します。
ESI 応答 XML エレメント
応答 XML エレメント
MapInformation エレメント
Map エレメント
AlternateLink
ESIAlternateLinkInfo
ESIAlternateLink
AUM
AlternateUnitOfMeasureInfo
AlternateUnitOfMeasure
BOMComponent
BOMComponentInfo
BOMComponent
BOMHeader
BOMHeaderInfo
BOMHeader
Document
DocumentInfo ESIEPMDocumentInfo
DocumentESIEPMDocument
DocumentLink
DocumentLinkInfo
DocumentLink
ECNHeader
ChangeHeaderInfo
ChangeHeader
EPMMemberLink
ESIEPMMemberLinkInfo
ESIEPMMemberLink
EPMReferenceLink
ESIEPMReferenceLinkInfo
ESIEPMReferenceLink
EPMRepresentation
ESIEPMRepresentationInfo
ESIEPMRepresentation
MadeFromObject
ESIMadeFromObjectInfo
ESIMadeFromObject
Part
ESIPartInfo
ESIPart
ReferenceLink
RefDesignatorInfo
RefDesignator
Substitute
SubstituteInfo
Substitute
ProcessPlan
ProcessPlanHeaderInfo
ProcessPlanHeader
Sequence
SequencesInfo
Sequences
Operation
OperationInfo
Operation
ProcessPlanPartLink
ProcessPlanPartLinkInfo
ProcessPlanPartLink
StandardProcedureLink
StandardProcedureLinkInfo
StandardProcedureLink
ESI 応答 XML エレメント
ConsumableResourceLink
OperationToConsumableResourceLinkInfo
OperationToConsumableResourceLink
WorkCenterLink
OperationToWorkCenterLinkInfo
OperationToWorkCenterLink
OprBomAllocatedPart
OperationToPartLinkInfo
OperationToPartLink
OprOperatedOnPart
OperationToOperatedOnPartLinkInfo
OperationToOperatedOnPartLink
Tooling
ToolingInfo
Tooling
ProcessMaterial
ProcessMaterialInfo
ProcessMaterial
Skill
SkillInfo
Skill
ControlCharacteristic
ControlCharacteristicInfo
ControlCharacteristic
PartToControlCharacteristicLink
PartQualityLinkInfo
PartQualityLink
PartToStandardControlCharacteristicLink
PartStandardCCLinkInfo
PartStandardCCLink
ProcessPlanToControlCharacteristicLink
ProcessQualityLinkInfo
ProcessQualityLink
OperationToControlCharacteristicLink
OperationQualityLinkInfo
OperationQualityLink
OperationToStandardControlCharacteristicLink
OperationStandardCCLinkInfo
OperationStandardCCLink
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 エレメントが設定されます。
ESI 応答 XML エレメント
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
Condition
RuleInfo
Rule
Condition_member_association
RuleMemberLinkInfo
RuleMemberLink
ESI 応答 XML エレメント
Condition_action_member_association
RuleMemberActionLinkInfo
RuleMemberActionLink
Specification_expression
ExpressionInfo
Expression
* が付いたエレメントをカスタマイズして、マージとしてレンダリングしたり別個のエレメントとしてレンダリングしたりできます。詳細については、セクションオプションセットのパブリッシングを参照してください。
* 
上記のテーブル内の MapInformation エレメントおよび Map エレメントというタイトルのコラムに表示されている値は、実際には、応答メタ情報ファイル内に出現するエレメントの 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 とそのメソッドについては、ESIMapperのセクションを参照してください。
ESI 応答メタ情報ファイルは、Windchill ESI 応答出力の構造とコンテンツの大部分を定義します。このために、Windchill ESI マッパーに対し、データを取得する場所と、マッパーによって作成された Info*Engine エレメントオブジェクトに取得したデータを追加する順序を知らせます。マッパーからの出力は、応答メタ情報ファイルのコンテンツを必要に応じて変更することによって修正できます。変更後のバージョンのファイルを特定の配布ターゲットに関連付けることで、そのターゲットに送信される応答メッセージに必要な変更を確実に反映させることができます。
ESI 応答メタ情報ファイルは XML ファイルです。このファイルの既成バージョンの完全なリストについては、ESI 応答メタ情報のセクションを参照してください。
これは役に立ちましたか?