這個主題包括使用「檔案計劃匯入匯出工具」時,可能會遇到的錯誤的一般原因相關資訊。這個主題也會討論如何減少遇到錯誤的可能。
當您匯入檔案計劃時,可能會遇到錯誤。在大多數情況下,發生錯誤後匯入的程序將停止,而不顯示任何訊息。錯誤的原因可能是下列任何一項:
「檔案計劃匯入匯出工具」包括可用來描述潛在錯誤的選項。後面的章節中會討論這些選項。
為了討論的目的,手動建立 XML 檔案是指使用「檔案計劃匯入匯出工具」以外的方法來建立 XML 檔案(例如,使用巨集或其他程式方法來建立 XML 檔案)。在匯入檔案計劃之前,您必須先建立符合 XML 標準並與 FileNet 軟體的 XML 綱目相容的 XML 檔案。
如果您手動建立要用於匯入檔案計劃的 XML 檔案,檔案必須以 IBM 提供的 XML 綱目為根據。「開發人員導覽圖」的檔案計劃 XML 綱目說明主題中,提供 XML 綱目的相關詳細資料。
附註 發生在匯入檔案計劃時的大部分錯誤,都是因為不相容或不符合標準的 XML 檔案所導致的。因此,手動建立 XML 檔案時請特別注意。
手動建立 XML 檔案之後,強烈建議您在驗證模式下執行「檔案計劃匯入匯出工具」。驗證模式下的工具會讀取 XML 檔案,驗證檔案內沒有任何錯誤或不符標準的問題。(如需驗證模式的相關詳細資料,請參閱驗證檔案計劃。)
子種類排程繼承和 ConditionXML 屬性章節中,包含手動建立 XML 檔案時可用的部分選項。
如果您打算手動建立 XML 檔案以匯入含自訂類別和物件的大型檔案計劃,建議先建立小型檔案計劃和相關的 meta 資料,然後在匯出模式下執行工具。在您手動建立具有條件暫存區、內部事件觸發程式和替代保留物件(皆含複式 conditionXML 屬性)的檔案計劃的 XML 檔案之前,這樣的練習特別有用。即使您建立了正確 XML 格式的檔案,XML 檔可能含有不正確的屬性值或語法,而可能在匯入期間導致錯誤。匯出小型檔案計劃可讓您檢閱工具所建立的 XML 檔案,並觀察 XML 檔案中的語法和屬性值。
如果您的檔案計劃包含自訂類別或屬性,匯出處理程序期間必須使用範圍 meta 資料選項。範圍 meta 資料選項會為自訂類別和屬性建立一個單獨的 XML 檔案。因此,如果檔案計劃包含自訂類別或屬性,則匯出和匯入程序分別由兩個步驟組成:一個步驟是處理自訂類別和屬性,另一個步驟處理檔案計劃中的其餘部分。「檔案計劃匯入和匯出工具」說明主題包含使用範圍 meta 資料選項的程序。
重新匯入選項用來指定 XML 檔案中新增動作的行為。重新匯入選項有三個參數:
初始匯入大型檔案計劃期間,您可能想要使用「跳過」選項。如果失敗,在第二次嘗試匯入相同檔案計劃時,使用「跳過」選項可避免重新匯入已成功匯入的實體。但是,如果第二次嘗試匯入時,需要對第一次成功匯入的實體進行少量修改,您可能要使用「取代」選項。
後續在匯入對少量實體所做的少量修改期間,建議您在實體的 XML 檔案中指定 Action="Modify",而不是對原始 XML 檔案進行變更。另外,使用「更新」模式可讓您更容易地識別後續更新與初始完整匯入。
當您建立子種類時,可使用 Record Manager 使用者介面來指定子種類繼承母項處置排程。如果您手動建立 XML 檔案來匯入內含子種類的檔案計劃,您可選取指定子種類不繼承母項的排程而提供不同的排程。
在您建立的 XML 檔案中,使用 DisposalScheduleInheritedFrom 屬性來指示記錄種類是否要從母項繼承處置排程。例如:
<RecordCategory Name="myCat2" Level="2" ParentPath="/myCat1">
<Properties>
<Property Name="AGGREGATION" Value="RecordCategory" />
<Property Name="IsPermanentRecord" Value="false" />
<Property Name="IsVitalRecord" Value="false" />
<Property Name="CurrentPhaseExportFormat"></Property>
<Property Name="IsDeleted" Value="false" />
<Property Name="HomeLocation"></Property>
<Property Name="VitalRecordReviewAction"></Property>
<Property Name="IncrementedBy" Value="1" />
<Property Name="RecordCategoryName" Value="myCat2" />
<Property Name="DisposalScheduleInheritedFrom" Value="/myCat1" />
<Property Name="Reviewer" Value="ylin" />
<Property Name="RecordCategoryIdentifier" Value="myCat2" />
<Property Name="VitalRecordDisposalTrigger"></Property>
<Property Name="Inactive" Value="false" />
<Property Name="Location"></Property>
<Property Name="DateOpened" Value="2006-03-07T14:16:00-08:00" />
<Property Name="DisposalSchedule">
<ObjectRef ClassId="DisposalSchedule" ObjectId="myDispSchedule" />
</Property>
</Properties>
</RecordCategory>
以下有四種情境您可以使用 DisposalScheduleInheritedFrom 屬性:
<Property Name="DisposalScheduleInheritedFrom" Value="/myCat1" />
當您手動建立 XML 檔案以匯入檔案計劃時,您可選取指定 ConditionXML 屬性的值,檔案計劃匯入工具會使用此值來匯入下列項目:
對於「替代保留」、「內部事件觸發程式」和「動態(條件式)暫存區」實體,ConditionXML 屬性會以 XML 格式來儲存搜尋條件。ConditionXML 中的屬性標籤會儲存 IBM InfoSphere Enterprise Records 使用者介面的屬性名稱/值/運算子。 ConditionXML 中的 sql 標籤儲存 SQL 陳述式。當您輸入檔案計劃匯入的 ConditionXML 屬性值時,必須將特殊字元 (< > & " ') 轉換成標準表示法 (< > & " ')。
下列實體的 XML 範例包含「檔案計劃匯入匯出」的 ConditionXML 屬性。
<Phases>
<RMEntity Type="Phase" Name="myPhase1">
<Properties>
<Property Name="PhaseAction"></Property>
<Property Name="RetentionPeriodDays" Value="0" />
<Property Name="RetentionPeriodYears" Value="10" />
<Property Name="RMEntityDescription" Value="my phase 1" />
<Property Name="RetentionPeriodMonths" Value="0" />
<Property Name="PhaseNumber" Value="1" />
<Property Name="ExportFormat"></Property>
<Property Name="IsScreeningRequired" Value="true" />
<Property Name="DisposalSchedulePtr">
<ObjectRef ClassId="DisposalSchedule" ObjectId="myDispSchedule" />
</Property>
<Property Name="PhaseName" Value="myPhase1" />
<Property Name="AlternateRetentions">
<ObjectValue Type="AlternateRetention">
<Properties>
<Property Name="RetentionBase" Value="CutoffDate" />
<Property Name="ConditionXML" Value="<response xmlns="http://filenet.com/namespaces/wcm/apps/1.0"><objectset><count>1</count><customobject><properties><property><symname>ClosedBy</symname><operator>IS EQUAL</operator><value>Administrator</value></property></properties><aggregation></aggregation><sql> AND ([ClosedBy] = 'Administrator')</sql> </customobject></objectset></response>" />
<Property Name="RetentionPeriodMonths" Value="0" />
<Property Name="RetentionPeriodYears" Value="5" />
<Property Name="RetentionPeriodDays" Value="0" />
</Properties>
</ObjectValue>
<ObjectValue Type="AlternateRetention">
<Properties>
<Property Name="RetentionBase" Value="DateClosed" />
<Property Name="ConditionXML" Value="<response xmlns="http://filenet.com/namespaces/wcm/apps/1.0"><objectset><count>1</count><customobject><properties><property><symname>RMEntityDescription</symname><operator>LIKE</operator><value>something</value></property></properties><aggregation></aggregation><sql> AND ([RMEntityDescription] LIKE '%something%')</sql> </customobject></objectset></response>" />
<Property Name="RetentionPeriodMonths" Value="0" />
<Property Name="RetentionPeriodYears" Value="5" />
<Property Name="RetentionPeriodDays" Value="0" />
</Properties>
</ObjectValue>
</Property>
</Properties>
</RMEntity>
</Phases>
<DisposalTriggers>
<RMEntity Type="DisposalTrigger" Name="Date Created">
<Properties>
<Property Name="DisposalTriggerName" Value="Date Created" />
<Property Name="EventType" Value="3" />
<Property Name="CycleYears" Value="0" />
<Property Name="CycleDays" Value="0" />
<Property Name="AGGREGATION" Value="RecordInfo" />
<Property Name="ConditionXML" Value="<response xmlns="http://filenet.com/namespaces/wcm/apps/1.0"><objectset><count>1</count><customobject><properties><property><symname>DateCreated</symname><displayname>Date Created</displayname><propertytype>3</propertytype><value/><operator>IS NOT NULL</operator><jointype>AND</jointype></property></properties><aggregation>RecordInfo</aggregation><sql> SELECT OIID , ID , RMENTITYTYPE FROM RecordInfo WHERE ( DateCreated IS NOT NULL )</sql></customobject></objectset></response>" />
<Property Name="CycleMonths" Value="0" />
</Properties>
</RMEntity>
</DisposalTriggers>
<Holds>
<RMEntity Type="RecordHold" Name="dynamic Hold">
<Properties>
<Property Name="Active" Value="true" />
<Property Name="HoldName" Value="dynamic Hold" />
<Property Name="HoldReason" Value="dynamic Hold" />
<Property Name="ConditionXML
" Value="<response xmlns="http://filenet.com/namespaces/wcm/apps/1.0"><objectset><count>2</count><customobject><properties><property><symname>RecordCategoryName</symname><displayname>Record Category Name</displayname><propertytype>8</propertytype><selectable>true</selectable><value>dynamic</value><operator>like</operator><jointype>AND</jointype></property></properties><aggregation>RecordCategory</aggregation><sql> SELECT ro.[RecordCategoryName] , ro.[RecordCategoryName] FROM RecordCategory ro Where ro.[RecordCategoryName] like '%dynamic%' </sql></customobject><customobject><properties><property><symname>RecordFolderName</symname><displayname>Record Folder Name</displayname><propertytype>8</propertytype><selectable>true</selectable><value>dynamic</value><operator>like</operator><jointype>AND</jointype></property></properties><aggregation>RecordFolder</aggregation><sql> SELECT ro.[RecordFolderName] , ro.[RecordFolderName] FROM RecordFolder ro Where ro.[RecordFolderName] like '%dynamic%' </sql></customobject></objectset></response>" />
<Property Name="HoldType" Value="Audit" />
</Properties>
</RMEntity>
</Holds>
如果要將現有階段的保留期間更新為空值,保留期間屬性(RetentionPeriodYears、RetentionPeriodMonths 和 RetentionPeriodDays)需併入 XML 檔案但沒有值。
以下是「檔案計劃匯入匯出」工具的階段實體的 XML 範例:
<RMEntity Type="Phase" Name="phase 1">
<Properties>
<Property Name="PhaseAction"></Property>
<Property Name="PhaseNumber" Value="1" />
<Property Name="ExportFormat"></Property>
<Property Name="IsScreeningRequired" Value="false" />
<Property Name="DisposalSchedulePtr">
<ObjectRef ClassId="DisposalSchedule" ObjectId="mySchedule" />
</Property>
<Property Name="PhaseName" Value="phase 1" />
<Property Name="RMEntityDescription" />
<Property Name="RetentionPeriodMonths" />
<Property Name="RetentionPeriodYears" />
<Property Name="RetentionPeriodDays" />
<Property Name="AlternateRetentions">
<ObjectValue Type="AlternateRetention">
<Properties>
<Property Name="RetentionBase" Value="CutoffDate" />
<Property Name="ConditionXML" Value="<response xmlns="http://filenet.com/namespaces/wcm/apps/1.0"><objectset><count>1</count><customobject><properties><property><symname>CurrentActionType</symname><operator>IS EQUAL</operator><value>6</value></property></properties><aggregation></aggregation><sql> AND ([CurrentActionType] = 6)</sql> </customobject></objectset></response>" />
<Property Name="RetentionPeriodMonths" Value="0" />
<Property Name="RetentionPeriodYears" Value="2" />
<Property Name="RetentionPeriodDays" Value="0" />
</Properties>
</ObjectValue>
</Property>
</Properties>
</RMEntity>