Work with pending assets

If an approved asset is modified and subject to a review process, the approved asset remains available until the revision under review replaces it by becoming approved. While under review, there are two revisions of this asset:
  • the asset that was approved (the main asset)
  • the asset under review (the pending asset)
Through the API you can use the pending flag on AssetIdentification to retrieve either asset. You can also check if an asset is the pending or main asset by reading the pending flag on RAMAsset.getIdentification(). To retrieve the AssetIdentification of the main asset from a pending asset, call RAMAsset.getMainAssetId(). To retrieve the AssetIdentification of the pending asset from a main asset, call RAMAsset.getPendingAssetId().
 
		//Fetch a pending asset
		AssetIdentification revisedId = new AssetIdentification(GUID, version,true);
		RAMAsset revised= session.getAsset(revisedId);
		
		//Fetch main asset
		RAMAsset main = session.getAsset(revised.getMainAssetId());
		
		//Back to the pending
		revised = session.getAsset(main.getPendingAssetId());

Feedback