It's all about the answers!

Ask a question

RAM 7.5.2.4 - policy plugin, artifact modification


Eric Ballance (131) | asked Feb 27 '18, 4:43 p.m.

 Hello,


The requirement is to create a custom extension using the RAM Policy API, which changes the physical location of an artifact so it points to a new, local, location depending on the state. For example, asset ABC has artifact 123.doc. The state is updated to "complete" so the artifact now needs to point to c:\tmp\123.pdf.

Any helps is appreciated.
Thanks!


Comments
Eric Ballance commented Feb 27 '18, 5:13 p.m.

 This questions is very close to what I'm trying to achieve--- https://jazz.net/forum/questions/74240/is-a-file-artifact-in-ram-given-a-url?sort=votes&page=1


Only difference is I'm trying to modify the URL so the artifact is retrieved from a different location. So, when the user clicks on the artifact it is actually downloaded from c:\tmp\finaldocuments\verisign 


Eric Ballance commented Feb 28 '18, 10:14 a.m. | edited Feb 28 '18, 10:17 a.m.

 I'm able to pull the file by using the following code but I can't change the file location or even overwrite the file.


RAMFolderArtifact srcFolderArtifact = (RAMFolderArtifact) currentAsset. .getArtifactsRoot(); Artifact[] srcArtifacts = srcFolderArtifact.computeArtifactsAsFlatList(new NullProgressMonitor()); for (Artifact artifact : srcArtifacts) { RAMArtifact ramArtifact = (RAMArtifact) artifact; }

Be the first one to answer this question!


Register or to post your answer.