Skip to main content
10-Marble
August 2, 2023
Solved

Has any did the bulk load method to obsolete existing WTDocuments?

We are in need to obsolete a bunch of existing WTDocuments.  I have done creating new WTDocument using Bulk Upload method, but I have not done Obsolete existing WTDocument before.  Has anyone done this before?  If yes, can you share the xml recipe file if you can?

 

Thank you,

 

 

 

 

tchaoAnswer
10-Marble
August 2, 2023

This xml file is working, but just that I need to change from this line:

 

<csvDocument handler="wt.doc.LoadDoc.createGeneral" >

 

to this line to get it working:

 

<csvDocument handler="wt.doc.LoadDoc.beginCreateWTDocument" >

 

The first one gave me and error and the change works and obsoletes the WTDocument.

Thank you.  I will create a recipe file for it.

4 replies

HelesicPetr
22-Sapphire II
August 2, 2023

Hi @tchao 

In your XML you need to define lifecyclestate element where you set a obsolete state. The value is internal name of the state.

Also during the import/creation user needs to have a rights to modify that state, for example as a administrator.

 

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<csvDocument handler="wt.doc.LoadDoc.createGeneral" >
 <csvuser></csvuser>
 <csvname>DOCUMENT123.pdf</csvname>
 <csvtitle>DOCUMENT123.pdf</csvtitle>
 <csvnumber>DOCUMENT123.pdf</csvnumber>
 <csvtype>Document</csvtype>
 <csvdescription></csvdescription>
 <csvdepartment>DESIGN</csvdepartment>
 <csvsaveIn>/Default/Test_import/</csvsaveIn>
 <csvteamTemplate></csvteamTemplate>
 <csvdomain></csvdomain>
 <csvlifecycletemplate>Two Phase Development</csvlifecycletemplate>
 <csvlifecyclestate>OBSOLETE</csvlifecyclestate>
 <csvtypedef>com.ptc.ReferenceDocument</csvtypedef>			
 <csvprimarycontenttype>ApplicationData</csvprimarycontenttype>
 <csvpath>D:\\fileContent.pdf</csvpath>
 <csvformat></csvformat>
 <csvcontdesc></csvcontdesc>
 <csvversion>A</csvversion>
 <csviteration></csviteration>
 <csvsecurityLabels></csvsecurityLabels>
</csvDocument>

</NmLoader>

PetrH

Translate
tchao10-MarbleAuthor
10-Marble
August 2, 2023

Thank you.  I will give this a try and let you know how it goes.

Translate
tchao10-MarbleAuthorAnswer
10-Marble
August 2, 2023

This xml file is working, but just that I need to change from this line:

 

<csvDocument handler="wt.doc.LoadDoc.createGeneral" >

 

to this line to get it working:

 

<csvDocument handler="wt.doc.LoadDoc.beginCreateWTDocument" >

 

The first one gave me and error and the change works and obsoletes the WTDocument.

Thank you.  I will create a recipe file for it.

Translate