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

We are happy to announce the new Windchill Customization board! Learn more.

Content update

BrianKrieger
7-Bedrock

Content update

OK, I'm really struggling with this. I can find and checkout a document
(programmatically) no problem. I want to replace the primary content.
I've tried the contentserverhelper (and a few others) to no avail and at
this point the ptc documentation is becoming molasses to me. Below are
a couple of examples of my trials (I've tried many more than this, mind
you....). Any thoughts?



Brian Krieger





Webject:



<ie:webject name="Add-ContentItems" type="ACT">

<ie:param name="instance"&lt;br"/>data="${@FORM[]supporting-adapter[*]}" valueSeparator=";" delim=";"
default="windchill"/>

<ie:param name="primary" data="TRUE"/">

<ie:param name="object_ref"&lt;br"/>data="${@FORM[]object_ref[*]}"/>

<ie:param name="where"&lt;br"/>data="${@FORM[]dca_object_find[]}"/>

<ie:param name="CLASS" data="wt.doc.WTDocument"/">

</ie:webject>



Class calling webject:

IeMultipartInputStream
ieFileIn........



Task updateTask = new Task();

updateTask.setParam("supporting-adapter",
WTProperties.getLocalProperties().getProperty
("wt.federation.ie.VMName"));

updateTask.setParam("format", "true");


updateTask.setUsername(SessionHelper.manager.getPrincipal().getName());


updateTask.setTaskURI("/com/peterbilt/update_Documents.xml");

updateTask.addParam("blob_count","0");

updateTask.addParam("type",
returnWTDocument.getType());


updateTask.addParam("number",returnWTDocument.getNumber());

updateTask.setInputStream(ieFileIn);

updateTask.invoke();









Another shot at just a straight java call....



ApplicationData curUploadData =
ApplicationData.newApplicationData(returnWTDocument);


curUploadData.setUploadedFromPath(toAppend.getAbsolutePath());


wt.content.ContentServerHelper.service.updateContent(returnWTDocument,
curUploadData, toAppend.getAbsolutePath());





0 REPLIES 0
Top Tags