The truth is that many people set rules to keep from making decisions. Mike Krzyzewski, American basketball coach and former player

An expert is someone who has succeeded in making decisions and judgements simpler through knowing what to pay attention to and what to ignore. Edward de Bono


ID-100215199.jpg

Image courtesy of Stuart Miles / FreeDigitalPhotos.net


5 days ago (and counting) the A/V Receiver in my home entertainment  surround sound system died after almost 10 years of faithful service.  My TV, my Blu-Ray recorder, my gaming console, 5 speakers, 1 subwoofer, and a bass speaker are all connected to my A/V receiver, so all of a sudden I was looking at pictures with no sound.  Calamity!  Or as my sister put it: “oh no, you’ve introduced a single point of failure!”


So for the last 5 days (and counting) I’ve had a decision to make. 


As it happens, I had to travel to my project this week anyway, so a few days living in the hotel has given me some time to do the necessary research, work out what needs to go into this decision, i.e. what rules I want to apply/ignore; and coincidentally put together some reflections on the difference between decisions and rules that I have been discussing with my current customer.  Oh and yes this customer has an ongoing project using SAP NetWeaver DSM and BRFplus, although many of the reflections would apply equally to the use of decisions and rules in BRM.  We currently have totals of well over 1000 rules to implement within a dozen decision services.


What’s the difference between a decision and a decision service?

Most people recognize a decision when they see one.  There’s an issue at hand, factors to be considered, and a choice to be made.  As the Oxford Dictionary puts it:

A conclusion or resolution reached after consideration http://www.oxforddictionaries.com/definition/english/decision


We make hundreds of decisions every day: what clothes to wear; what to eat; what to drink; what route to travel to work; what school to send our children to, and so forth.  Businesses make thousands of decisions every day: what price to charge a particular customer for a specific product; where to locate an employee; what work is assigned to each employee; how much we pay our contractors; what suppliers we use; what distribution/carrier companies we use; what servers we build; what software we support; what software we blacklist; what tax we pay and when, and so forth. 


Knowing that there are lots of decisions and choices is fine.  But there are so many decisions that without some guidelines and understanding it can be overwhelming to try and work out which decisions we automate and which we don’t.     


Automated decisions are implemented as decision services. A decision service is a self-contained, callable service for the purposes of making decisions.  A decision service encapsulates one or more business rules that must be executed together, in the correct sequence or order, to make that decision.


Each decision service asks a question, for example “How much discount should this customer receive when purchasing an A/V Receiver?”  Each decision has a specified result (i.e. answer), for example “The discount percentage, and maximum discount amount permitted”.   Making the decision may require one or more business rules to be executed, for example:

  • What’s the credit rating of this customer?
  • What other purchases have they made with us in the past?
  • Are they buying the A/V Receiver as part of a Home Entertainment Theatre package?
  • Is the price of the A/V Receiver high enough to warrant a discount?
  • What’s the maximum discount our policy people have decided the business can support?


Contrast this with a manual decision. Manual decisions are those made directly by a person.  When someone makes a decision on behalf of the business it is their responsibility to ensure they know, understand and are current (up-to-date) with the business rules that need to be applied, the result that needs to be determined, and that they apply those business rules correctly in making a decision.    Think of a Home Entertainment salesperson who is on staff at your local electrical appliances store, and who can assess and decide what discount to give a particular customer.   Of course, if they get it wrong it’s often too late to fix it once the purchase has been made or the contract has been signed.


At its simplest: Decision services automate decisions that would otherwise need to be made manually. 


Decision services are particular critical where it would be difficult for personnel to keep current (up-to-date) with the information and knowledge of all the rules that need to be applied, such as:

  • There are many underlying business rules that need to be executed
  • The business rules change over time, or with different circumstances
    • Where different business rules need to be applied as at different dates based on changes in legislation or policy
    • Where the correct rules need to be re-applied retrospectively, e.g. if a complaint or appeal or objection means the decision needs to be re-evaluated, under the rules that were in place at the time the original decision was made
    • Where rates and factors in the rules change frequently, e.g. changes in thresholds, changes in discounts, changes in inflation factors, etc.
    • Where there are specific situations that change which rules need to be applied, e.g. strategic customers, remote geographical locations, even whether the carrier has to deliver a product to a multi-storey apartment without a lift.


Why can’t I just use a web service, method or function module?

But hang on a minute, doesn’t that automated decision service sound awfully like a web service or a method or a function module?  Where’s the boundary line between decision services and other automated (encapsulated, callable, coded) services? It all comes down to understanding the degree of change that needs to be supported.

To put it another way, does what needs to be considered (the underlying business rules) in making the decision change more frequently than the need to make the decision (the calling application or program itself)?

Decision services replace traditional automated services where decisions would otherwise be coded in programming languages that the business cannot read, which require significant IT support to maintain, and are constrained by IT change and transport lifecycles to implement those changes.

Or to put it even more bluntly, does the business need to:

  • Be able to change how the decision is made more frequently than IT can support
  • Be able to change how the decision is made more rapidly than IT can support
  • Be able to confirm that nothing has been lost in translation between business and IT.
    • Regardless of how many test cases you run, sometimes testing is just not enough for business experts or policy makers whose careers and peace-of-mind depends on knowing that the rules are correct, complete and true to their intention.

When we are talking about the speed at which IT can support changes, we are not just talking direct coding costs. Don’t forget the perennial IT backlog, conflicting IT projects, budget negotiations between business departments and IT, political power negotiations between senior management , and the many other common barriers to getting changes agreed, designed, built, tested and into production.

Essentially what this boils down to is that decision services are critical where the speed of change must be determined by the business and not IT.


That is, it must be possible for the business to update the rules, or the rates or factors on which they depend without being constrained by IT projects or IT change and transport cycles. For example, if a new rate is determined, it may need to be implemented within minutes, hours or days of the new rate being decided, regardless of whether this fits with the current IT transport schedule.

How to decide whether to turn a decision into a decision service

Not all decisions are necessarily suitable as decision services.  When choosing potential decision services, the first step is to check that the decision is suitable as a decision service. Decision services are used where:

  • The decision is repeatable
    • There is a pattern to making the decision that can be followed and automated
  • The decision is non-trivial
    • It is sufficiently important that the benefit of making accurate, reliable decisions outweighs the cost of automation
  • The business process, or business event, that triggers the decision is clearly identified
    • We know when and where the decision needs to be made
  • The information needed to make the decision is known
    • We can identify all the data needed to make the decision
  • The knowledge of underlying business rules is clear
    • We know the legislation, policy and operational considerations that go into making the decision
  • There is a clear sequence or order to applying the business rules
    • We know what rules have to be checked first, and can clearly articulate when we have applied all the rules and can return the result
  • The business needs visibility of the decision and the underlying business rules
    • We must be confident that the correct rules are being applied
  • The business is accountable for ensuring the underlying business rules, and any rates or factors on which they depend, are correct and current (up-to-date)

Typically the need to make the decision, and the calling applications or other triggers that require the result of the decision, change very rarely; while the underlying business rules, rates, factors, and even the data sources evaluated in making the decision may change frequently.  There may be any number of causes of frequent changes to making the decision; common causes of change include:

  • Changes in legislation
  • Changes in policy  or operational practice
  • Changes in market conditions, e.g. competitive pressures might mean we lower thresholds or raise discounts to give customers a more attractive outcome
  • Changes in our business partners or our arrangements with our business partners, e.g.  a change in a carrier’s rates might make it more attractive to ship with them
  • Changes in rates and factors that need to be periodically updates, such as inflation factors, discounts,  minimum/maximum thresholds
  • Changes due to corrections, e.g. updated formulas

As a second step, many SAP solutions provide for calling of decision services at certain points within a solution. For example, in many SAP solutions these days, such as TRM, CRM Utilities, CRM Social Services, Debt Collection Strategies, etc. , there are often several points where decision services may be called either via configuration – i.e. the rules application that holds or the BRF+ function that represents the decision service can be directly entered in configuration – or via standard business logics slots such as BaDIs – i.e. Business Add-Ins where additional business logic code can be added, including calls to a decision service. Examples include, but are not limited to:

  • Decision services for complex validations on data entry forms
  • Decision services for determining whether someone is eligible for a benefit, or discount
  • Decision services for determining which collection strategies will be used to pay off a debt
  • Decision services for determining amounts, such as debt amounts, tax amounts, entitlement amounts

Where SAP provides for the calling of specific decision services, often the signature (i.e. the inputs and result) of the decision service are predefined.   But of course you can create your own decision services too, which is especially useful when you want to call decision services from custom programs or BaDIs for your organization-specific or industry-specific decisions. Once the potential decision service has been identified as available and suitable for use, the decision service needs to be logically decomposed into the underlying business rules, and the information needed to support the decision, i.e. the rates and factors, and data sources which underpin the business rules.

What’s the difference between a decision service and a business rule?

I find the simplest way to think of business rules is as subcomponents of a decision.

Let’s take my A/V Receiver decision as an example.  If I was to turn the choice of A/V Receiver into a decision service, there are a number of business rules I might want to include, such as:

  • Is the price of the receiver within my budget?
  • Is the receiver in stock from a supplier I trust?
  • Will the receiver support my current and desired future surround sound requirements? Because I’m thinking of moving from a 5.1 channel to a 7.2 channel system later this year.
  • Did the receiver rate in the top 5 recommended receivers at review sites I trust?
  • Will the receiver fit in my current entertainment unit cabinet?

Isn’t a business rule just a decision service in itself? Certainly sometimes it is. But here’s the thing – most of the time I don’t care whether any of the shelves in my entertainment unit are sufficiently high, wide and deep enough to hold a different A/V receiver, and although I could have measured the shelves at any time, there was no value and no reason in doing so. In other words, unless I have a decision to make, I’m not all that interested in the rules that go into making that decision.

So this is where I take issue with those who suggest that a business rules engine should be some sort of massive re-usable bottom-up designed repository of all the possible business rules in an organization, which are then assigned to the relevant decision.  Where’s the cost benefit in documenting a whole heap of rules that you may never map to an automated decision service? It’s usually better or at least far more pragmatic to work top-down, i.e.

  • What decisions do I need to make?
  • How do those decisions map to decision services?
  • What rules underpin those specific decision services?

What about reusability?  Sure, some rules are re-usable – checking if the price of a product falls within my budget for starters.  But again here’s the thing – when you are adding that next decision service, it’s a lot easier for the business to identify rules they want to re-use, and upgrade them to a re-usable version, if they can see all the rules in the first place.  Actually what we find in practice is that underlying rules are often less re-usable than you might think, it’s more often the data sources or the rates and factors that you want to re-use.

What isn’t a business rule?

I don’t have to specify that a date is a valid date, any more than I have to specify that my entertainment unit has height and depth and width.  It’s an entertainment unit – height, depth, and width come with the furniture – literally.  It turns out that with SAP solutions you tend to get quite a lot of built-in rules that come with the furniture: data typing rules, data validation rules, standard configuration, process flows, business objects, etc.  The beauty of DSM/BRFplus for many decision services is that those furniture rules can be treated as instant data sources whenever I want to call on them.

Decision services, business rules and effort estimation

There’s another useful aspect for project effort estimation when you consider decision services vs. business rules.  Speaking as someone on a very large project involving well over 1000 rules to build, it’s a lot easier, and far more effective to break effort estimation by our into our dozen decision services rather than our many many many business rules.  Plus it makes a lot more sense from a testing perspective, because while I *can* individually test most of those rules, in practice it’s shows more progress to my business people if I can show a whole decision is working, and show it being called by the relevant calling application.  Granted some of our decisions hold only about 20 rules, and one has more than 400, but then from a testing perspective we can also break ourtesting into checking a decision service makes the correct decision for each business scenario, without the business person who’s testing it having to worry about how many rules this particular execution of the decision requires.

Oh and don’t forget to include your Rules Catalogs, i.e. the business view of the rules where they will adapt, simulate, and deploy future changes, as a part of your effort estimation.

Final thoughts

Would I put my A/V receiver decision in DSM/BRFplus? Well not for myself, I’m seriously hoping this is not a repeatable decision, but if I was a company selling home entertainment theatre equipment … then it might well be worth automating decisions about best or recommended A/V receivers based on typical rules my customers apply.

In the meantime I’ve made my decision, ordered my A/V receiver, and I’m off to pick up my new A/V receiver in the morning.   Wish me luck with connecting all those cables…!

To report this post you need to login first.

10 Comments

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

  1. James Taylor

    Jocelyn

    Thanks for the post and for the call out to the various blog posts I have written. I also talk a lot about Decision Services in my book, Decision Management Systems: A practical guide to using business rules and predictive analytics.

    One question I get asked about beginning with decisions rather than with rules is how to specify the decision I need the decision service to make without writing a bunch of rules. Increasingly I find decision modeling, using the new Decision Model and Notation (DMN) standard works perfectly. It let’s you break down the decision making into manageable components, clearly map business rules to each piece of the decision, map in information needs and sources of rules and much more. As Carsten and I show in this recorded webinar you can easily map these kinds of models to NW DSM.

    For those who want to try it I have a white paper on Decision Modeling with DMN and you can try out our cloud-based decision modeling tool DecisionsFirst Modeler.

    James

    (0) 
    1. Jocelyn Dart Post author

      Hi James, Yes I found your approach to decision modelling notation very helpful for deriving requirements for decisions.  It’s a little easier with many of our SAP solutions as increasingly the decision (or at least the option for a decision service) is often built into the SAP solution, but I agree if you are coming from a custom program then deciding that you need to set up a decision is another process in itself.

      Rgds,

      Jocelyn

      (0) 
  2. Tobias Trapp

    Hi Jocelyn,

    as usual you mentioned many important aspects in this blog entry. And especially BRFplus developers should read it carefully. One important thing they can learn development of decision services is something different than doing software architecture or programming since a decision service is an artifact that has to be understandable and testable by business experts as well as rapidly and frequently changeable. This is important to understand especially for developers who are trained to develop frameworks (often containing software layers) that are made for reuse. And so it is important to understand the difference between a decision service and a rule consisting of rules.

    Best Regards,

    Tobias

    (0) 
    1. Jocelyn Dart Post author

      Hi Tobias,

      Yes – a topic for another blog perhaps but I agree the difference between software architecture and decision architecture is a significant risk area at the moment. In practice we are seeing IT doing the initial implementation of the decision services before handing them over to the business, but without strong guidance developers tend to approach decision services as if they were programs.  For starters most developers are almost criminally negligent when it comes to describing underlying rules, probably because they turn on all the technical settings and forget to look at the business view.  On my current project, we are directing the developers to work with show technical names off, and the hope is this will encourage them to make sure their decisions and rules are readable from the beginning.  Similarly we are dictating the use of at least a basic rules catalog from the very beginning, and using a number of other tactics to encourage desired behaviour. 

      Rgds,

      Jocelyn

      (0) 
  3. John Roberts

    Hi Jocelyn

    Your post certainly rings true, as my clients tussle with similar themes also. I have recently been asked to advise a client on “when to use” and “when not to use” BRFplus, for business rule and decision services. I have found it difficult to define scenarios where directly hard-coding rules into ABAP is preferable. Are you aware of any scenarios in this respect?

    Regards

    John

    (0) 
    1. Jocelyn Dart Post author

      Hi John,

      For myself this sort of question always comes back to intent and purpose of business rules engines.  From working with BRFplus I am satisfied that there is rarely any need to resort to ABAP for purely technical reasons. So the question is really: what is the business need for using BRFplus for a particular business rule over hardcoding in ABAP? Or in other words, is it really an adaptable business rule or not?

      If it’s really a technical rule and then by default I would tend to keep it out of BRFplus – but more to keep the noise of technical rules out of the business rules engine. Even then there maybe small parts of technical rules that are worth putting into business rules engines for the sake of adaptability – such as escalation periods. 

      Similarly the less likely a rule is to change over time potentially the less benefit of placing it in a business rules engine. E.g. if it’s something that changes annually I would certainly put it in a business rule – because I expect my system to last for usually 10-15 years. But if it’s something that I never expect to change, due to the nature of the business or the industry, then there would be little benefit in creating a business rule.

      A more pragmatic view at the moment is that if the rule is already covered by existing configuration or relationships between existing data (such as which users hold which security roles), then there may be little benefit in reworking this as a business rule.  But if you have to code your business logic it into a BADI or user-exit or custom program anyway… then I’d definitely consider using a business rules engine for all or part of that business logic.

      Ultimately it may come down to the Total Cost of Ownership versus Total Cost of Development question – i.e. will putting the business rule into BRFplus reduce TCO sufficiently to cover TCD?

      Hope that helps.

      Jocelyn

      (0) 
    2. James Taylor

      I have a set of checks for deciding whether to put business logic (rules) into a business rules management system like BRFplus or NW DSM. A BRMS adds value when:

      – The decision involves many rules or

      – Those rules change often or

      – Those rules are complex or interact in complex ways or

      – The domain expertise involved in the rules is such that only a domain expert can write/confirm them or

      – Non technical people want to manage them

      Or some combination (moderate number of rules that change reasonably often for instance).

      In these circumstances rule MANAGEMENT becomes more important than rule execution and a BRMS like BRFplus or NWDSM becomes essential.

      I wrote a paper on the ROI of BRFplus/NW DSM that is available on our site here.

      Let me know if we can help with anything – james@decisionmanagementsolutions.com

      (0) 

Leave a Reply