Oracle Agile 9.3.4 Java SDK Getting And Adding Documents To Change Is Renaming File To SDK
(Doc ID 2878332.1)
Last updated on JULY 05, 2022
Applies to:
Oracle Agile PLM Framework - Version 9.3.4.0 and laterInformation in this document applies to any platform.
Symptoms
After adding an attachment to a change, the attachment is automatically named "SDK."
Steps to reproduce:
- Run the following code to add an attachment:
// First, get an attachment file
private InputStream getDocument(IAgileSession session) {// Get DOC018002 Restricting attachments.docxInputStream isFile = null;// Get item DOC018002IItem item = (IItem) session.getObject(IItem.OBJECT_TYPE, "DOC018002");// Get the attachment table for file attachmentsITable attTable = item.getAttachments();// Get a table iteratorITwoWayIterator it = attTable.getTableIterator();// Get the first attachment in the tableif (it.hasNext()) {IRow row = (IRow)it.next();// Read the contents of the streamisFile = ((IAttachmentFile)row).getFile();}else {if (logger.isDebugEnabled()) logger.debug(loggerPrefix + "No file);}// Second, add the file as attachment
private void addAttachments(IChange chg, IAgileSession session, InputStreamfileCoordDocIS) {// Get ChangeIChange itemChg = (IChange) session.getObject(IChange.OBJECT_TYPE, chg.getName());// Get the attachment table for file attachmentsITable attTableChg = itemChg.getTable(ItemConstants.TABLE_ATTACHMENTS);IRow rowChg = attTableChg.createRow(fileCoordDocIS);} - The newly added attachment is shown as SDK in filename column.
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |