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

Changes to RAM Asset are not visible in RAMSession object - Java API

 Hi,

When an asset is updated(like asset name changed, categories added/modified, etc) the changes are not visible in RAMSession object. 

Let me list down the steps that leads to this issue,
1. Create new RAM session (RAMSession object) using java API.
2. Search for assets. Let us consider the search results has returned an asset having name: Asset A.
3. Using RAM web console, change the  name of above asset to Asset B.
4. Using the same RAMSession object from Step 1, I do RAM search.
5. In the search results, I see the asset name still as Asset A. Even though in RAM search page I see the changes are visible.

Changes in category schema are also not visible.

Is this a known issue/defect with the RAM java API?

RAM ver is 7511.

Regards,
Pramod

0 votes


Accepted answer

Permanent link
Hi Pramod,

RAM API caches the assets and category schemas that it used to have, so once it get a asset information from server, It first try to fetch asset from local cache. I think it does the same thing to category schema.

So I think in order to get the updated asset and category schema, one needs to call RAMSession.clear() to clear cached content before the second search operation.

Thanks.
Pramod Chavan selected this answer as the correct answer

0 votes

Comments

Hi Lin,


So, by doing RAMSession.clear(), any new changes happened to asset(like asset attribute value changed, new category added, etc) will be visible through the same session object in consecutive search? 

Also, please confirm whether new assets submitted also will be avialable using same instance.

What's the diff between clear() and clear(boolean includeMetaModel)?

Regards.

For Q1, yes.
For Q2, one need to use asset = RAMSession.getAsset(); to retrive new updated asset.
FOr Q3, I think clear()  works as clear(false). It remove only the cached assets. If one uses clear(true),  cached objects like categoryschema, community etc will also be cleared.

 Thanks Lin.

Your answer

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,943

Question asked: Feb 05 '14, 1:32 a.m.

Question was seen: 5,511 times

Last updated: Feb 25 '14, 2:21 a.m.

Confirmation Cancel Confirm