IBM Enterprise Records, 版本 5.1.+            

檔案計劃匯入和匯出工具疑難排解

您需要瞭解使用 IBM® Enterprise Records 的「檔案計劃匯入匯出工具」時,可能發生之錯誤的常見原因,以及如何減少發生錯誤的可能性等相關資訊。

錯誤的一般原因

當您匯入檔案計劃時,可能會遇到錯誤。在大多數情況下,發生錯誤後匯入的程序將停止,而不顯示任何訊息。錯誤的原因可能是下列任何一項: 「檔案計劃匯入匯出工具」包括可用來描述潛在錯誤的選項。後面的章節中會討論這些選項。

手動建立 XML 檔案

為了討論的目的,手動建立 XML 檔案是指使用「檔案計劃匯入匯出工具」以外的方法來建立 XML 檔案(例如,使用巨集或其他程式方法來建立 XML 檔案)。在匯入檔案計劃之前,您必須先建立符合 XML 標準並與 FileNet 軟體的 XML 綱目相容的 XML 檔案。

如果您手動建立要用於匯入檔案計劃的 XML 檔案,檔案必須以 IBM 提供的 XML 綱目為根據。

重要: 發生在匯入檔案計劃時的大部分錯誤,都是因為不相容或不符合標準的 XML 檔案所導致的。因此,手動建立 XML 檔案時請特別注意。

手動建立 XML 檔案之後,強烈建議您在驗證模式下執行「檔案計劃匯入匯出工具」。驗證模式下的工具會讀取 XML 檔案,驗證檔案內沒有任何錯誤或不符標準的問題。 (如需驗證模式的詳細資料,請參閱使用檔案計劃匯入和匯出工具。)

子種類排程繼承ConditionXML 屬性章節中,包含手動建立 XML 檔案時可用的部分選項。

觀察檔案計劃匯入匯出工具功能

如果您打算手動建立 XML 檔案以匯入含自訂類別和物件的大型檔案計劃,建議先建立小型檔案計劃和相關的 meta 資料,然後在匯出模式下執行工具。 在您手動為檔案計劃建立具有條件式暫存區、內部事件觸發程式和替代保留期物件(皆含複式 ConditionXML 屬性)的 XML 檔案之前,這樣的練習特別有用。 即使您建立了正確 XML 格式的檔案,XML 檔可能含有不正確的屬性值或語法,而可能在匯入期間導致錯誤。匯出小型檔案計劃可讓您檢閱工具所建立的 XML 檔案,並觀察 XML 檔案中的語法和屬性值。

使用範圍 meta 資料選項

如果您的檔案計劃包含自訂類別或屬性,匯出處理程序期間必須使用範圍 meta 資料選項。範圍 meta 資料選項會為自訂類別和屬性建立一個單獨的 XML 檔案。因此,如果檔案計劃包含自訂類別或屬性,則匯出和匯入程序分別由兩個步驟組成:一個步驟是處理自訂類別和屬性,另一個步驟處理檔案計劃中的其餘部分。 使用檔案計劃匯入和匯出工具說明主題包含使用範圍 meta 資料選項的程序。

使用重新匯入選項

重新匯入選項用來指定 XML 檔案中新增動作的行為。重新匯入選項有三個參數: 初始匯入大型檔案計劃期間,您可能想要使用「跳過」選項。如果失敗,在第二次嘗試匯入相同檔案計劃時,使用「跳過」選項可避免重新匯入已成功匯入的實體。 但是,如果第二次嘗試匯入時,需要對第一次成功匯入的實體進行少量修改,您可能要使用「取代」選項。

後續在匯入對少量實體所做的少量修改期間,建議您在實體的 XML 檔案中指定 Action="Modify",而不是對原始 XML 檔案進行變更。另外,使用「更新」模式可讓您更容易地從初始完整匯入中識別出後續更新。

子種類排程繼承

當您建立子種類時,可使用 IBM Enterprise Records 使用者介面來指定子種類繼承母項處置排程。 如果您手動建立 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" />

ConditionXML 屬性

當手動建立 XML 檔案以匯入檔案計劃時,您可選擇指定 ConditionXML 內容的值,「檔案計劃匯入工具」即會使用此值來匯入下列項目: 對於「替代保留期」、「內部事件觸發程式」和「動態(條件式)暫存區」實體,ConditionXML 內容會以 XML 格式來儲存搜尋條件。ConditionXML 中的內容標籤會儲存 IBM Enterprise Records 使用者介面的內容名稱/值/運算子。 ConditionXML 中的 sql 標籤會儲存 SQL 陳述式。當您輸入檔案計劃匯入的 ConditionXML 內容值時,必須將特殊字元 (< > & " ') 轉換成標準表示法 (&lt; &gt; &amp; &quot; &apos;)。 下列實體的 XML 範例包含「檔案計劃匯入匯出」的 ConditionXML 內容。

替代保留期的 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" />
          <ObjectValue Type="AlternateRetention">
            <Properties>
              <Property Name="RetentionBase" Value="CutoffDate" />
              <Property Name="ConditionXML" Value="&lt;response xmlns=&quot;http://filenet.com/namespaces/wcm/apps/1.0&quot;&gt;&ltobjectset&gt;&ltcount&gt;1&lt/count&gt;&ltcustomobject&gt;&ltproperties&gt;&ltproperty&gt;&ltsymname&gt;ClosedBy&lt/symname&gt;&ltoperator&gt;IEQUAL&lt;/perator&gt;&ltvalue&gt;Administrator&lt/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" />
            </Property> </ObjectValue>
          <ObjectValue Type="AlternateRetention">
            <Properties>
              <Property Name="RetentionBase" Value="DateClosed" />
              <Property Name="ConditionXML" Value="&lt;response xmlns=&quot;http://filenet.com/namespaces/wcm/apps/1.0&quot;&gt;&ltobjectset&gt;&ltcount&gt;1&lt/count&gt;&ltcustomobject&gt;&ltproperties&gt;&ltproperty&gt;&ltsymname&gt;RMEntityDescription&lt/symname&gt;&ltoperator&gt;LKE&lt;/perator&gt;&ltvalue&gt;something&lt/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>

含 ConditionXML 的處置觸發程式範例:

<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="&lt;response
xmlns=&quot;http://filenet.com/namespaces/wcm/apps/1.0&quot;&gt;&lt;objectset&gt;&lt;count&gt;1&lt;/count&gt;&lt;customobject&gt;&lt;properties&gt;&lt;property&gt;&lt;symname&gt;DateCreated&lt;/symname&gt;&lt;displayname&gt;Date Created&lt;/displayname&gt;&lt;propertytype&gt;3&lt;/propertytype&gt;&lt;value/&gt;&lt;operator&gt;IS NOT NULL&lt;/operator&gt;&lt;jointype&gt;AND&lt;/jointype&gt;&lt;/property&gt;&lt;/properties&gt;&lt;aggregation&gt;RecordInfo&lt;/aggregation&gt;&lt;sql&gt; SELECT OIID , ID , RMENTITYTYPE FROM RecordInfo WHERE ( DateCreated IS NOT NULL )&lt;/sql&gt;&lt;/customobject&gt;&lt;/objectset&gt;&lt;/response&gt;"/>
           <Property Name="CycleMonths" Value="0" />
       </Properties>
    </RMEntity>
</DisposalTriggers>

含 ConditionXML 的動態暫存區範例:

<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="&lt;response
xmlns=&quot;http://filenet.com/namespaces/wcm/apps/1.0&quot;&gt;&lt;objectset&gt;&lt;count&gt;2&lt;/count&gt;&lt;customobject&gt;&lt;properties&gt;&lt;property&gt;&lt;symname&gt;RecordCategoryName&lt;/symname&gt;&lt;displayname&gt;Record Category Name&lt;/displayname&gt;&lt;propertytype&gt;8&lt;/propertytype&gt;&lt;selectable&gt;true&lt;/selectable&gt;&lt;value&gt;dynamic&lt;/value&gt;&lt;operator&gt;like&lt;/operator&gt;&lt;jointype&gt;AND&lt;/jointype&gt;&lt;/property&gt;&lt;/properties&gt;&lt;aggregation&gt;RecordCategory&lt;/aggregation&gt;&lt;sql&gt; SELECT ro.[RecordCategoryName] , ro.[RecordCategoryName] FROM RecordCategory ro Where ro.[RecordCategoryName] like &apos;%dynamic%&apos; &lt;/sql&gt;&lt;
/customobject&gt;&lt;customobject&gt;&lt;properties&gt;&lt;property&gt;&lt;symname&gt;RecordFolderName&lt;/symname&gt;&lt;displayname&gt;Record Folder Name&lt;/displayname&gt;&lt;propertytype&gt;8&lt;/propertytype&gt;&lt;selectable&gt;true&lt;/selectable&gt;&lt;value&gt;dynamic&lt;/value&gt;&lt;operator&gt;like&lt;/operator&gt;&lt;jointype&gt;AND&lt;/jointype&gt;&lt;/property&gt;&lt;/properties&gt;&lt;aggregation&gt;RecordFolder&lt;/aggregation&gt;&lt;sql&gt; SELECT ro.[RecordFolderName] , ro.[RecordFolderName] FROM RecordFolder ro Where ro.[RecordFolderName] like &apos;%dynamic%&apos; &lt;/sql&gt;&lt;/customobject&gt;&lt;/objectset&gt;&lt;/response&gt;" />
           <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="&lt;response xmlns=&quot;http://filenet.com/namespaces/wcm/apps/1.0&quot;&gt;&lt;objectset&gt;&lt;count&gt;1&lt;/count&gt;&lt;customobject&gt;&lt;properties&gt;&lt;property&gt;&lt;symname&gt;CurrentActionType&lt;/symname&gt;&lt;operator&gt;IS EQUAL&lt;/operator&gt;&lt;value&gt;6&lt;/value&gt;&lt;/property&gt;&lt;/properties&gt;&lt;aggregation&gt;&lt;/aggregation&gt;&lt;sql&gt; AND ([CurrentActionType] = 6)&lt;/sql&gt; &lt;/customobject&gt;&lt;/objectset&gt;&lt;/response&gt;" />
                                           <Property Name="RetentionPeriodMonths" Value="0" />
                                           <Property Name="RetentionPeriodYears" Value="2" />
                                           <Property Name="RetentionPeriodDays" Value="0" />
                                     </Properties>
                               </ObjectValue>
                         </Property>
                   </Properties>
             </RMEntity>


意見

前次更新: 2011 年 8 月


© Copyright IBM Corp. 2011.
此資訊中心採用 Eclipse 技術。(http://www.eclipse.org)