It's all about the answers!

Ask a question

Updating an Asset through custom policies


Sourav Ghosh (1266) | asked Jan 11 '13, 12:33 p.m.

I have to write a custom policy in RAM that will do the following:-

1. As a result of the user action, the relationship can be deleted/created and/or updated.

2. This custom policy should update the relationship that are done by the user and categorize the asset accordingly.i.e. if Asset A is related to Asset B, and user goes and deletes that relationship and makes A to be related to Asset C, now , the policy should accordingly categorize the Asset A.

Please throw some light on this can be achieved. I am considerably new to the RAM world.

One answer



permanent link
Gili Mendel (1.8k56) | answered Jan 16 '13, 8:37 a.m.
JAZZ DEVELOPER
At a given state, you can instigate a policy to run (on update, timer ....)

When a policy run, it gets a context for that asset, and a session to RAM, from which you can use the Java
API to introspect the asset, or modify it, or search/update other assets.

See  Java APIPolicies,  Also, there have been many code example on this forum ... like https://jazz.net/forum/revisions/96161/  and https://jazz.net/forum/questions/43870/ramsession-within-a-policy

Your answer


Register or 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.