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

Policy to set categorization

Hi there,

I'm trying to develop a policy that sets a categorization of an asset based on the type of related assets.

I'm not able to check the type of the related assets using the Policy API.

Is there any samples on how to do this: I need to run a policy inside asset1 and cicle among the related assets, checking the type of each asset. If a specific asset type is found I need to set a categorization on asset1.

Thank you,
Rodolpho

0 votes



2 answers

Permanent link
On 4/6/2010 9:22 PM, rugolini wrote:
Hi there,

I'm trying to develop a policy that sets a categorization of an asset
based on the type of related assets.

I'm not able to check the type of the related assets using the Policy
API.

Is there any samples on how to do this: I need to run a policy inside
asset1 and cicle among the related assets, checking the type of each
asset. If a specific asset type is found I need to set a
categorization on asset1.

Thank you,
Rodolpho


Although there is not a sample to do exactly what you require, there is
documentation and a sample jar shipped with RAM. Refer to the help topic
"Creating custom policies by using the custom policy review API" in the
RAM info center -->
http://publib.boulder.ibm.com/infocenter/ramhelp/v7r2m0/topic/com.ibm.ram.doc/topics/t_use_custompolicy_api.html?resultof=%22%64%65%6d%6f%22%20%22%70%6f%6c%69%63%79%22%20%22%70%6f%6c%69%63%69%22%20

Regards... Peter

0 votes


Permanent link
Hi there,
Is there any samples on how to do this: I need to run a policy inside asset1 and cicle among the related assets, checking the type of each asset. If a specific asset type is found I need to set a categorization on asset1.


If you write a policy, use the sample Governor that RAM ships
http://publib.boulder.ibm.com/infocenter/ramhelp/v7r2m0/topic/com.ibm.ram.doc/topics/t_use_custompolicy_api.html

It has java source in it, so you can play with the policy, and see the code.

If all you need is related assets, check out OddMinutePolicy policy. You can configure relationships (when you click on the configure link).
When the policy runs, you can


....
new RelationshipConfigurationDetails(key, "Relationships to include", "This is a list of relationships we want to include"),
......
RelatedAssetAccessor[] relatedAssets = (RelatedAssetAccessor[])getParameters().get(key);
....
relatedAssets[??].getManifestAccessor().getAssetTypeLocalized()

0 votes

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

Question asked: Apr 06 '10, 9:20 p.m.

Question was seen: 6,872 times

Last updated: Apr 06 '10, 9:20 p.m.

Confirmation Cancel Confirm