Servigistics InService 發佈與載入 > 其他資訊 > TAL 概觀 > TAL 流程 > 零件關係
  
零件關係
Px 零件關係資料是從 relatedParts.xml 檔案處理的,其中,關係類型 (例如汰換、交互參照和全域替代) 以 Relation 標籤上的 role 屬性,以及相對應的來源與目標屬性或子項來識別。針對 AND 編組,Px 使用 Relation 中包含的 SourceTarget 標籤。支援的關係包括一對一、一對多,以及多對一。也支援 AND 和 OR 關係。
零件關係的適用性在 Relation 中包含的 Metadata 標籤中提供。依預設,Metadata 上支援 quantitydatedescription 屬性。如果您要轉換其他中繼資料,則必須在自訂 XSL 檔案中新增新的屬性。
為了計算向前與向後汰換鏈,會使用錨定 Part Group 並據以向前或向後周遊。如果找到零件的汰換群組,則表示正在計算個別零件鏈。
relatedParts.xml 檔案的根元素為 Relationships。該檔案包含下列顯著標示:
Relation 元素
role 屬性
src 屬性
tgt 屬性
Target 元素
Source 元素
Objectref 元素
href 屬性
零件關係也可以從協力廠商 SAP 或透過 CSV 檔案載入。針對這些輸入,Group 元素的 groupID 屬性應該是物件編號與組織名稱的組合。顯示的這個群組 ID 屬性可用來在零件之間建立錨定與弧線。
以下是零件關係的範例。
<零件關係> 中的配套屬性
意義
<Relation id="wt.supersede.SupersedeGroup:6121937"
quantity="2"
role="supersession"
src="x-wc://f03a22d72215f49d:wt.part.WTPartMaster:BRPDL003B"
target="x-wc://52d4a5903feea56:wt.part.WTPartMaster:BRPDL003F"/>
quantity 屬性定義目標零件的數目。
<Property token="ModifyDate">
<Value>2016-03-29 18:30:00.0</Value>
</Property>
定義零件關係的日期值。
<Property token="Description">
<Value>Case2: 1:N,RC001A superseded by RC Supersede B and RC Supersede C
</Value>
</Property>
定義零件關係的描述值。
零件關係的轉換步驟
IMAN 登錄檔案在初始化轉換流程期間於工作區中產生。IMANConfig.xml 檔案具有零件關係群組的下列項目:
<Type name="GROUP">
<IdentifyingAttributes>
<Property name="uri"/>
</IdentifyingAttributes>
<OtherAttributes>
<Property name="objNumber"/>
<Property name="orgName"/>
</OtherAttributes>
</Type>
以下是轉換步驟:
1. 轉換零件關係時,會將所有零件登錄傳遞到 IMAN。
2. IMAN 將傳回兩個檔案,directRelation.xml (與零件登錄相關聯的所有關係) 和 IndirectRelation.xml (以 DirectRelation.xml 識別的群組的群組特定關係)。
3. 轉換:
a. 新增配套中定義的目前關係集中存在的物件。
b. 透過比較 DirectRelation.xmlrelatedParts.xml,並排除群組成員關係,識別出要刪除的物件。
c. 處理 DirectRelation.xml 中的群組成員關係:
針對非通用群組成員 (在 DirectRelation.xml 中發現但未在 relatedParts.xml 中發現的群組),從 DirectRelation.xml 找出群組特定登錄 ID,並標記要刪除的群組。
針對 DirectRelation.xmlrelatedParts.xml 中的通用群組成員關係,從 DirectRelation.xmlrelatedParts.xml 找出群組特定登錄 ID,然後在 Indirect.xml 中尋找以排除不屬於 PR 的其他關係。
d. 將要新增或刪除的關係傳送至 IMAN 和登錄。
e. 將要刪除的群組傳送至 IMAN。
4. IMAN 會刪除已識別的關係和群組。
資料篩選
支援零件關係的資訊篩選。以下是零件關係元素的資料篩選定義:
<xsl:call-template name="set-calc-applic">
<xsl:with-param name="logicalExpr1" select="apexLE"/>
<xsl:with-param name="logicalExpr2" select="apexSE"/>
<xsl:with-param name="logicalExpr3" select="apexAC"/>
<xsl:with-param name="docTypeValue"/>
</xsl:call-template>
另也支援零件關係 anchorarc 篩選。以下是零件關係 anchorarc 的資料篩選定義:
<xsl:call-template name="calc-applic-arc">
<xsl:with-param name="applicRoot" select="apexLE"/>
<xsl:with-param name="docTypeValue"/>
<xsl:with-param name="effRoot" select="apexSE"/>
<xsl:with-param name="arcFiltering" select="'true'"/>
</xsl:call-template>