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"<br"/>data="${@FORM[]supporting-adapter[*]}" valueSeparator=";" delim=";"
default="windchill"/>
<ie:param name="primary" data="TRUE"/">
<ie:param name="object_ref"<br"/>data="${@FORM[]object_ref[*]}"/>
<ie:param name="where"<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());