Hi All,
This Document will help you to create the BRM Proect and can be use as web service in BPM
Step by Step Process for Creating a Simple BRM(Business Rules Management) Project and
Connectivity with BPM with Web Service:
I am using NWDS 7.3
1. Open NWDS – Go To File – new –others-Development Infrastructure – Select the Development
Component – Next – Select Rules Composer – Next –LocalDevelopment-Select My
Component-Next - Name your Development Component
I gave name : brm/test
Click on Next – Finish
Click yes to Confimation Perspective PoP Up
After Successfully Completionof your test BRM Project ir will look like:
2. Now we have to create a Ruleset for creation of Rules
Expand your BRM Project – Right click on Rules Modeling – Select New Flow Ruleset
Give name for Your RuleSet
3. After Creating Rule set your DC look like this :
After Creation of RuleSet we have to create XML Schema:
Expand src folder in the BRM DC – Right click on wsdl – New – XML Schema
Name your XSD Schema and click finish (in my case I created AgeValidation.xsd)
4. Open your XSD element by double click on it , it will look like
Now we have to create the element in the XSD Element :
- 1.UserAge ; Integer Type
- 2.UserCatagory : String Type
For this Right click on Types – Add Simple type
5. After Creation Simple type you can see it in XSD Types :
After this create Elements and select the type Simple Type (which we created)
Right click on Element – Add Element
After creating Element you can see like this:
Now we have to add these element in our Project :
Open the Project Resources
Expand
Rules Modeling – Right click on Project Resources – open
7. You will see the below screen after open the Project Resources
8. Now go to Alias Tab – Add –Left click on Add – choose XSD Element
(Before this save your Project)
9. You can see here your created XSD Elements : (Selectthe Element one by one for your Project) After selection the Added XSD element look like this :
Now for Rules we have to create a Decision Table for our Project
(for more Detail about Decision Table use this SAP help Link : http://help.sap.com/saphelp_nw73/helpdata/en/d2/df35008f5d423180d57257c5570093/content.htm)
Expand Your Ruleset – Right Click on Decision Table – Select New Decision Table
Give Name to your Decision Table and Comments (optional) – and click Next
10. Now Select the Condition for your Decision Table (you can see the Aliases here)
Double click on aliases to select and it will look like this (select the check box for ‘Table has Horizontal Condition’):
Click next – now select the action (what action to be performed in Decision Table)
Choose category and you can see it in selected Actions ;
Click on finish – Expand Decision Table Folder and Double click on your Decsion Table you can see the created decision table:
11. We can do editing in the decision table :
The above condition check the input value for Age and if Age is less than 18 then it will return result as ‘Child’
We can add one more condition in decision table
For Adding one more condition right click on the values as follows:
12. After creation of Decision Table we have to create a flow for our BRM project :
Expand your Ruleset – Right Click – New Flow
13. Now the above flow is having the start and end points
we can add our decision table to perform the action after starting the flow , for
adding drag the decision table from Palette (in Right hand Side from Activities)And
give the connections as following(first
remove the previous connection between start and end points):
Now go to Properties of Decision Table Activity and browse for your Decision Table
14. The flow is ready to use and we have to exposed the web service so that we can use it into our BPM project :
Right Click on your Flow Ruleset – web service – Create WSDL Artifacts
15. Give Name to your Web Service – click next –and choose Input and output for web Service –Click Finish:
Now Build and Deploy your BRM DC and after Successfully Deployed you can use this
web service in BPM Project (Publish the ws in Service Registery and configured it)
If you want to use this web service in BPM then you have to create Service Interface for this in BPM Project and import the web service and then you can use this service interface into automated activity
Thanks
Rohit