Is there an API to get the ruleset names from a given Instance file?
Please its very urgent!!!!!
Thanks in Advance!
You will have to enumerate all instances and retrieve the names. Assuming you know how to connect to the repository and open the project using APIs, you can use the following snippet to retreive the SRL name of the ruleset.
Create the location object using the path to the instance file.
NdLocation location = NdLocationFactory.createLocation("Test/Ruleset Template1 Instance");
Get the PROM entry object using the location (note that promProject object was created earlier as part of repository connection)
NdPromEntry entry = promProject.lookupEntry(location);
Get the instance from the entry using the following snippet
NdPromInstance instance = (NdPromInstance)((NdPromItem)entry).getItemContent();
Retreive the SRL name of ruleset using the following line
System.out.println(String.format("SRL name of instance: %1$s", instance.getSRLEntityName()));
If you have a list valueholder that contains multiple rulesets in a single instance file, you would have to enumerate over that list to get the names of all rulesets in the instance file.
I hope this helps. Good luck!
Thanks a lot!!! Its working...
Can you please tell me the solution in the same line regarding fetching the values from the valueholders from the instance file.
I suggest you refer the ListNodes.java example included in the product documentation for a good example of instance nodes manipulation using RMA API.
This source file is available at <ADVISOR_HOME>\examples\apiExamples\rmaAPI
Hope this helps. Good luck!
can you tell me how to connect to a repository and open a project using APIs...???
NdRomFactory.newRepositoryConnectionManager(connection) api to get the connection manager and connect to the repository.
You can find the sample code with Blaze installation at
Hope it helps.
Thank you for your quick answer~
It helped me a lot!!
Retrieving data ...