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
|
Accepted answer
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
Comments
Pramod Chavan
commented Feb 24 '14, 3:37 a.m.
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.
Pramod Chavan
commented Feb 25 '14, 2:21 a.m.
Thanks Lin. |
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.