Skip to Content

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:

/wp-content/uploads/2014/10/1_553883.png

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

/wp-content/uploads/2014/10/2_553884.png

Give name for Your RuleSet

/wp-content/uploads/2014/10/3_553885.png

3. After Creating Rule set your DC look like this :

/wp-content/uploads/2014/10/5_553886.png

After Creation of RuleSet we have to create XML Schema:

      Expand src folder in the BRM DC – Right click on wsdl – New – XML Schema

/wp-content/uploads/2014/10/6_553887.png

Name your XSD Schema and click finish (in my case I created AgeValidation.xsd)

/wp-content/uploads/2014/10/7_553888.png

4. Open your XSD element by double click on it , it will look like

/wp-content/uploads/2014/10/8_553893.png

   Now we have to create the element in the XSD Element :

  1. 1.UserAge  ; Integer Type
  2. 2.UserCatagory  : String Type

     For this Right click on Types – Add Simple type

/wp-content/uploads/2014/10/9_553894.png

5. After Creation Simple type you can see it in XSD Types :

/wp-content/uploads/2014/10/10_553901.png

  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:

/wp-content/uploads/2014/10/11_553902.png

  Now we have to add these element in our Project :

  Open the Project Resources

  Expand
   Rules Modeling – Right click on Project Resources – open

/wp-content/uploads/2014/10/12_553903.png

   7. You will see the below screen after open the Project Resources

/wp-content/uploads/2014/10/13_553905.png

   8. Now go to Alias Tab – Add –Left click on Add – choose XSD Element

       (Before this save your Project)

/wp-content/uploads/2014/10/14_553906.png

    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 :

/wp-content/uploads/2014/10/15_553910.png

    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

/wp-content/uploads/2014/10/16_553911.png

     Give Name to your Decision Table and Comments (optional) – and click Next

/wp-content/uploads/2014/10/17_553912.png

   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’):

/wp-content/uploads/2014/10/18_553925.png

     Click next – now select the action (what action to be performed in Decision Table)

     Choose category and you can see it in selected Actions ;

/wp-content/uploads/2014/10/19_553926.png

     Click on finish – Expand Decision Table Folder and Double click on your Decsion Table you can see the created decision table:

/wp-content/uploads/2014/10/20_553927.png

     11. We can do editing in the decision table :

/wp-content/uploads/2014/10/21_553928.png

/wp-content/uploads/2014/10/21_553928.png

     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:

/wp-content/uploads/2014/10/22_553929.png

/wp-content/uploads/2014/10/23_553930.png

     12. After creation of Decision Table we have to create a flow for our BRM project :

        Expand your Ruleset – Right Click – New Flow

/wp-content/uploads/2014/10/24_553932.png

/wp-content/uploads/2014/10/25_553933.png

/wp-content/uploads/2014/10/26_553934.png

     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):

/wp-content/uploads/2014/10/27_553935.png

     Now go to Properties of Decision Table Activity and browse for your Decision Table

/wp-content/uploads/2014/10/28_553936.png

/wp-content/uploads/2014/10/29_553937.png

     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 :

          Note : Before Creating Web Service make your new flow set as main flow (by Right click on flow set – make as main flow) , otherwise it will take           default flow as main flow and your decision table wont execute.

          Right Click on your Flow Ruleset – web service – Create WSDL Artifacts

/wp-content/uploads/2014/10/30_553938.png

     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

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply