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

Running a policy from another policy?

Hi.
I want to run policies depending on some custom conditions. They only way I can imagine to implements this it's creating a custom policy that check the conditions and fire the right policy. So, is it possible to run policies using the policy API? Any other possible approach?
Regards,
-unai

0 votes



3 answers

Permanent link
A policy gets to run on a server thread, as a response to an asset event (e.g., enters a state, update ...). The policy gets a context (the asset, policy configuration on that state ....).

What the policy does, and what code it returns when it ends, is up to that policy. Policy can update the (context) asset, other assets... delegate work to other systems (e.g., build / automation, opening a change request ...), or read a rule file (say an XML content from another asset) to determine what to do. The last one imply that you have one generic policy that do different thing based on the environment it is executing, and the rules associated with that environment.


Not sure for the exact reason you want a policy to "fire the right policy" ...
Can you provide an example, specifically, when is the "main" policy activated, what what conditions it will drive what action

0 votes


Permanent link
Simple example: imagine I want to send an email to asset owner depending on some custom conditions. I could associate default 'send email' policy with the state but with no event. Then I could run this policy from another policy that checks custom conditions, passing the 'policy context' to default 'send email' policy.

Obviously, I can create some custom code that implements the 'send email' behaviour, but in that case I can not reuse default policy. This applies to the rest of default policies.

Also, RAM could track what policies were run on that asset/state and show them in web UI. That applies also to custom policies. If I have rules A, B and C, and they are executed as policies from Controler policy, RAM web UI would show policies A, B, C and Controler were executed on that asset. But if they are implemented as rules inside my custom code, only Controler would be showed.

0 votes


Permanent link
... so you want to reUse the existing eMail policy to: get users (reviewers, owners ...), and send them an email?

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: May 11 '11, 7:12 a.m.

Question was seen: 4,006 times

Last updated: May 11 '11, 7:12 a.m.

Confirmation Cancel Confirm