Could you share us the syntax of xml that is used to load documents into the collaboration manager (not the attachment field)
if you run the XML provided by Jair above against your clairty environment, it should create your needed syntax to load back in.
If this does not work, i can look for an example for you.
My requirement is to copy attachment attribute from a custom object to project collaboration tab. Folder path of the attachment in file store is "/files/123/456" and file name is 890.
In the folder "/files/123/456" there are 5 files along with 890
How do I copy only 890 file to the project collab tab. I tried with below xml but it is copying all 5 files under "/files/123/456" and also test folder is not getting created but instead folder structure "/files/123/456" is created in the collab tab
Can you help me what am I doing wrong here?
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_document.xsd">
<Header action="write" externalSource="OS" objectType="document" version="126.96.36.1996"/>
<Parent documentLocation="/files/123/456" parentObjectId="3456789" parentObjectType="Projects">
<Folder allowNonParticipants="0" hasAllParticipants="1" name="test">
<Document allowNonParticipants="0" fileCreatedDate="2015-06-17T10:35:41" hasAllParticipants="1" language="en" name="890" numCheckoutDays="1"
owner="admin" status="0" versioningEnabled="1">
<Version id="-1" owner="admin" versionNumber="1"/>
As you have probably seen, when you xog documents in/out of Clarity, they are copied into Clarity's document file store from some location, and exported out of Clarity's document file store to some other location visible to the server.
Your request however is referencing an existing part of the document store and re-importing it to the same place.. I would not recommend this.
Instead, you need to export your document attachments somewhere, arrange them with the appropriate files/folders as you wish them to exist in the application, and then issue the import specifying the location you want to bring them in.
That way if you have this structure at the documentLocation specified:
Then just by specifying the folder containing this structure, you would bring in those files/folders under the collaboration tab of your project without extra content needed in your XOG document import file, and they would retain that same structure:
<Parent documentLocation="/correct/path/to/folder" parentObjectId="3456789" parentObjectType="Projects">
If your location is an existing part of the filestore, then you're going to import a lot of oddly named files/folders that are part of the internal storage structure used by Clarity, and could bring in files from quite a span or range of Clarity records (almost randomly) and you wouldn't want that. It should (always) be a separate and unrelated file/folder path that doesn't already belong to your Clarity installation.
Project prior to import:
Files/folders at documentLocation (on the Clarity server where the app services run):
Running the XOG request:
And finally, how it ends up looking in Clarity on the project:
Thanks a lot for your suggestion. It worked great and it did saved lot of time for me. I have exported document from custom object to a separate folder unrelated to the file store and I was able to import documents into project collaboration tab from that folder. This way I was able to import only related documents to that project. One last question when I export the document from custom object, files are created with internal ID's under clarity folder structure like clarity/Files/004/457/345678 where 345678 is the file name in clarity. How do I export documents with actual file names and get rid of the clarity internal folder structure. Users may not understand what 345678 is and they would want to see the actual file name. Any inputs here please???
I do understand the challenge created by the folder/filename structure of the export, but I haven't personally had to address it or seen any of the created solutions.
I expect that at least one already exists out there created and used by other customers or partners (quite possible CA Services have created such things as billable deliverables on projects too), I just haven't been exposed to them. All I can expect is that those solutions involved taking the filenames from the disk and looking up the version_id column of the database view clb_dms_files_read_v (or similar) in order to discover the path and filename to use for reconstructing the layout.
Thanks Nick. I will go from there . You have been a great help here..
As you mentioned "Instead, you need to export your document attachments somewhere, arrange them with the appropriate files/folders as you wish them to exist in the application, and then issue the import specifying the location you want to bring them in."
My requirement is to transfer the files along with folder structure from one clarity instance to other. What kind of programming do you recommend to arrange the files/folders in the server with meaningful names instead of internal id's