RAMSession within a policy
3 answers
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.
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.
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!
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?