cancel
Showing results for 
Search instead for 
Did you mean: 

Display All Rules Project Names on SAPUI5 Screen

Former Member
0 Kudos

Hi

I need to get all the Rules Project Names that are been created in my NWDS.

That names are to be displayed on the UI screen .

Please help me in getting all the Rules Project Name using BRM Edit API .

Thanks And Regards

Mani Gupta

Accepted Solutions (0)

Answers (1)

Answers (1)

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Mani,

Yes you can. Here is the code snippet for the same : 


     DefaultRulesEditAPIFactory apiInstance =                       

                                 DefaultRulesEditAPIFactory.getInstance();

     RulesEditAPI  api = apiInstance.getAPI();

     IProject project = api.getProject(<RULES_PROJECT_NAME>);

     String[] rulesets = project.getRulesetNames();


     ---- Iterate over the rule name ----

     project.getRuleset(<rulesetname>)



Hope this helps.


Regards,

Archana

Former Member
0 Kudos

Hi Archana

The code snippet you mentioned works fine if we already know the Project Name.

But if we does not have an idea what will be the project name then this code doesnt work .

If it possible can you help me getting all the rules project name considering the user does not know what all rules project have been created earlier .

Regards

Mani Gupta

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Mani,

There is no API method to get AllProjects deployed in the server. You can write some utilities to fetch the project with rules nature from the server. For this you can use BPM oData Service or BPM APIs to access active process definition.

Regards,

Archana