Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RAM createAssetNewVersion

 How to create new asset version? (RAM v7.5.3.1)


Say I have an asset in RAM:  "Book" version: "1.0"  and I want to create a new version of that asset, I can use the createAssetNewVersion() operation.  Problem is, I get an asset not found exception

RAMSession session = new RAMSession(url, user, pass);
RAMAsset oldBook = session.getAsset(new AssetIdentification("{GUID}","1.0"); // my book asset
RAMAsset newBook = session.createAssetNewVersion(oldBook, "2.0", new RAMStatusMonitor()); // new book        
newBook.setName("Fine New Book");
session.put(newBook, new NullProgressMonitor());

The code above causes an AssetNotFoundException to be thrown.  What must I do do create a new version of an asset with the RAM Java API?

This is the output:
[11/08/20 11:30:44 GMT] %-10i 5178 DEBUG main com.ibm.ram.client.RAMSession RAMSession.java -
com.ibm.ram.common.data.exception.AssetNotFoundException
at com.ibm.ram.internal.access.ws.Utilitiesv72.copy(Utilitiesv72.java:1087)
Utilitiesv72.java:1087
at com.ibm.ram.internal.access.ws.RAMv72.getAssetByID(RAMv72.java:1889)
RAMv72.java:1889
at com.ibm.ram.client.RAMSession.fetchAssetFromServer(RAMSession.java:797)
RAMSession.java:797
at com.ibm.ram.client.RAMSession.getAsset(RAMSession.java:537)
RAMSession.java:537
at com.ibm.ram.client.RAMSession.getAsset(RAMSession.java:591)
RAMSession.java:591
at com.ibm.ram.client.RAMSession.clone(RAMSession.java:1385)
RAMSession.java:1385
at com.ibm.ram.client.RAMSession.createAsset(RAMSession.java:1083)
RAMSession.java:1083
at com.bt.intcoe.rmi.RAMRmiServiceImpl.updateSoftwareServiceInstance(RAMRmiServiceImpl.java:681)


0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Nov 04 '20, 12:46 p.m.

Question was seen: 786 times

Last updated: Nov 08 '20, 6:42 a.m.

Confirmation Cancel Confirm