Professional Documents
Culture Documents
Modeling Rules Using Sap Netweaver Business Rules Management 7.2
Modeling Rules Using Sap Netweaver Business Rules Management 7.2
Modeling Rules Using Sap Netweaver Business Rules Management 7.2
Applies to:
SAP NetWeaver Composition Environment 7.2. For more information, visit the Business Rules Management
homepage.
Summary
This article is an end-to-end guide meant to help you in understanding the different features available in BRM
7.2 and in how they can be used in modeling a set of simple rules.
This guide makes use of simple rules scenario where we check whether or not the approval of a superior
officer is required in an Investment Approval Process.
Author: Arti Gopalan
Company: SAP Labs.
Created on: 15th July 2009
Author Bio
Arti is a product manager in SAP NetWeaver Product Management BPM\BRM\CE team. She has been a
software engineer in BRM before joining the Product Management team. She has over three years of
experience in Business Rules Management.
Table of Contents
Introduction ................................................................................................................................................... 3
Introduction ................................................................................................................................................... 3
Modeling Rules ............................................................................................................................................. 3
Create Rules DC ....................................................................................................................................... 3
Creating a new FlowRuleset ...................................................................................................................... 6
Importing Decision Table ........................................................................................................................... 6
Creating a simple Rule Script................................................................................................................... 11
Rule Script 1: ............................................................................................................................................................. 11
Rule Script 2: ............................................................................................................................................................. 14
Modifying Rule Flow ................................................................................................................................ 17
Default Rule Flow as provided with Rules DC .......................................................................................... 17
Modified Rule Flow .................................................................................................................................. 17
Testing Rules Created................................................................................................................................. 24
Build and Deploy Ruleset......................................................................................................................... 31
Testing Web Service already Generated .................................................................................................. 36
Copyright .................................................................................................................................................... 40
Introduction
In this article you will be looking at how Netweaver Business Rules Management Component will help you in
automating business decisions/rules. Here, Business Rules are defined as the policies or constraints which
are applicable to any business.
In this end-to-end article, you will be modeling, implementing and executing rules using the SAP NW BRM
7.2 Component.
Modeling Rules
In this step we will be modeling rules using the Netweaver Development Studio BRM component.
Create Rules DC
For this purpose the first step is to create a new Rules DC. To do this –
1. Open the
NetWeaver
Development
Studio.
2. Select the
workspace
5. Select File>
New> Project of
type Rules
Composer
Development
Component and
click on Next.
6. Select the
required
Software
Component and
click on Finish.
7. Enter the name
of the rules as
iap_rules and
click on Finish.
This will create
the rules DC.
2.
Rule Script 1:
We will be creating a rule script which will check if the inputted entry value of the region is an allowed value
or not - ValidateEntry rule script.
1. First step is to create a
temporary variable to hold
whether or not the inputted
entry is valid.
2. To do this let us create a
variable definition. This is a
variable specific to this
ruleset alone, so we will be
creating a ruleset variable
definition.
3. Open the ruleset overview
page and select the
Definitions tab.
4. To create a variable
definition of type boolean,
click on and select the
type boolean.
Rule Script 2:
The next rule scrip to be created is to set the approval as necessary whatever may be the condition –
ApprovalAlwaysNecessary rule script.
1. Select on the Rule Scripts
node of the Rules DC.
From the context menu of
this node, select the
option to create a New
Rule Script.
6. Select Approval
Necessary/approvalNeces
sary = {boolean} as the
action.
7. Select the default value
and in the drop box
opened change this static
value to „true“.
8. The action is now set as
Approval
Necessary/approvalNeces
sary = true.
Output Values
approvalNecessary as
false.
8. Click on Add.
9. Enter the
Instance Hostname : ,
Instance Number : ,
Add to Domain:Default.
10. Click on OK.
14. Enter
username:administrator
password:abcd1234
15. Click on OK.
4. Click on Next
6. Click on Finish.
7. A csdl file –
ApprovalNeededRuleset.csdl - is
created in src > brms > ws folder
of the Rules DC.
8. In Result approvalNecessary
box has not been checked.
That is Approval of senior
officer is not necessary for the
region and totalAmount
entered.
Related Content
For more information, visit the Business Rules Management homepage.
Copyright
© Copyright 2010 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9,
iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,
BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems
Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of
Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts
Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by
Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned
herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this docume nt
serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("S AP
Group") for informational purposes only, without representation or warranty of any kind, and SAP Gro up shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the
express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an
additional warranty.