RAM API: Is there a way to create a Search Subscription for a particular User?
From a web browser, when you access Rational Asset Manager, go to Assets (or Search). Once you Filter your search, there is an orange flag on the right side that you can click to "Subscribe to this search".
Is there any way from the RAM API that you can create a subscription like this for a user? We are using RAM 7.5.2.1. Thanks. - Troy Klomp |
2 answers
Hi, Try RAMSubscription. One could add a subscription like:
SearchQuery query = session.createAssetQuery("asset"); RAMAssetQueryBuilder queryBuilder = (RAMAssetQueryBuilder)query; SearchResult result = session.getAssets(queryBuilder); for(AssetSearchResult assetRe:result.getAssetSearchResults()){ RAMAsset asset = session.getAsset(assetRe.getAsset().getIdentification()); asset.addSubscription(new RAMSubscription("my sub", session.getUser("admin"))); try{ session.queueAssetForPut(asset); }catch(Exception e){ e.printStackTrace(); //if asset locked. ignore } } Comments 1
Troy Klomp
commented Jun 24 '14, 10:39 a.m.
Thanks for the reply, but this is not what we are looking for. The above sample code does a search for assets, and creates a subscription to every asset currently found in the search. So, the search is run once, and all individual assets (that already exist) are subscribed. The user would then have multiple subscriptions to manage for all of the assets found.
|
Ok, thanks for your further interpretation.
I am afraid there is not a function in API to add search subscription at this moment. You may would like to create a wi for Ram or raise a RFE.
Thanks.
|
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.