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

RAMSession within a policy

Hello. I am writing a policy that must query for and read other assets in addition to the asset passed through the context. Is there a recommended way in 7.5 to acquire a RAMSession or obtain references to other assets in the repository within the test() method of policy? Thanks in advance.

0 votes



3 answers

Permanent link
To use the asset the policy run against, use the following:

Asset a = getPolicyContext().getAsset();
....

getPolicyContext().updateAsset(a);


To use other assets, at this time you will need to use the Java API. You will need to include the Java client .jars and use a RAMSession(). RAM 7.5.0.1 allows you to include multiple .jars (as a .zip) when you upload a policy.

In the future, we are going to provide a policy based RAMSession() that directly calls the server (vs. use webservices communication). It will also attempt to resolve the cycle issues that can result with client api calls from a policy ... this is the case of a policy running an api that invoke the same policy again.

0 votes


Permanent link
RAM 7.5.0.1 allows you to include multiple .jars (as a .zip) when you upload a policy.


I have been using this new capability for the last few weeks to bundle policy code and dependent jars into a single zip file for deployment. It has been working great and has totally eliminated the messy problem of:

1. Hacking up the deployed application WEB-INF/lib folder in WAS to add the necessary jars
2. Repackaging a massive single jar with policy classes and all dependencies

Thanks! Keep up the great work!

0 votes


Permanent link
RAM 7.5.0.1 allows you to include multiple .jars (as a .zip) when you upload a policy.


I have been using this new capability for the last few weeks to bundle policy code and dependent jars into a single zip file for deployment. It has been working great and has totally eliminated the messy problem of:

1. Hacking up the deployed application WEB-INF/lib folder in WAS to add the necessary jars
2. Repackaging a massive single jar with policy classes and all dependencies

Thanks! Keep up the great work!

-jthario,

In my case I only add the ramclient.jar on the zip, the other dependencies are already provided by WAS.

Did you do try it?

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: Oct 13 '10, 6:08 p.m.

Question was seen: 5,616 times

Last updated: Oct 13 '10, 6:08 p.m.

Confirmation Cancel Confirm