cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Translate the entire conversation x

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

tchao
10-Marble

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,

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
tchao
10-Marble
(To:tchao)

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.

View solution in original post

4 REPLIES 4
HelesicPetr
22-Sapphire II
(To:tchao)

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

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

tchao
10-Marble
(To:tchao)

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.

HelesicPetr
22-Sapphire II
(To:tchao)

Hi @tchao

 

This is second handler method that can import WTDocuments.

 

based on csvmapfile.txt you can use both handlers and the wt.doc.LoadDoc.createGenera has to work. 

It may be trouble with other elements that were not filed or what ever. MethodServer log should answer what was wrong.

 

Iam glad that I could help.

 

PS> my example uses "standardX20.dtd" but in windchill 12+ newer standard exists "standardX26.dtd""

PetrH

 

Announcements

Top Tags