📜 ⬆️ ⬇️

BRMS 150 years ago and today: decision rule repositories

Attempts to master the business logic for IT systems began in our country around the 1820s. Then one of the founders of Russian cybernetics, a state councilor (and the son of an engineer-colonel), Semyon Nikolaevich Korsakov, did two such things:


Rectilinear Homeoscope


Simple comparator
')
This is what we would call today the mechanical germs of modern expert systems. Remember the news that IBM is distributing its artificial intelligence to hospitals? So, S. N. Korsakov began to do something similar at least 150 years before. His idea was very simple: you need to distribute the device to doctors on the ground, and then doctors can save experience together, not make common mistakes and generally treat by standards. The comparator served as a tool for diagnostics, and a simpler homeoscope could act as an automaton where the doctor put on symptoms and got a disease at the exit.

That is, in other words, Korsakov tried to create a repository of medical knowledge and a rule management system . Because he did not believe that the same diseases would be treated in all parts of the country equally effectively and accurately.

In general, we are not very far from the 1800s.


Modern business processes in many ways resemble the work of such a mechanical device. For example, a rule for a bank can work: if a client has been using services for more than 3 years (one lever was moved) and his account amount is more than 3 million rubles (moved by the second), then he should be considered a VIP client (the system made a conclusion). Another example of a business rule is that if the contract amount is more than $ 300,000, then coordination with the financial director is necessary.

Now imagine that you run a large bank or insurance company. You have a problem with the fact that decisions on the ground are made extremely randomly. As rural doctors will use 100 of their own custom approaches to patients with the same problem, so each of your departments will decide on a loan or risk assessment almost in the phase of the moon. Of course, the first thought is to introduce clear rules based on heuristics or linear comparisons.

So, BRMS systems are used to implement these rules. The beauty is that these are no longer Excel tables, no opinion of the branch's commercial director or colleague's advice, but specific mechanics. The company's business rules are maintained in a single repository in a form that users can understand. Corporate systems call the calculation of rules from BRMS and get the result.

At the same time, business users without IT participation change the rules, and these rules can change very quickly without coding. All systems always use a single version of the rules. There is control of mandatory compliance with the rules.

Why is it important? Well, for example, I know one large retail network, where only their own custom developments are used for automation. To do this, they have a regional development office, where 200+ developers are sitting. Business is developing rapidly, and management rightly considers flexibility to be one of the most important competitive advantages. Therefore, if necessary, change something in business processes or business rules, even in small things, they sit down at their code and quickly rewrite it. The complexity of making changes is growing, and the time is always too tight, so crutches are often piled up. Of course, such a system is extremely unstable. Plus you have to be almost an archaeologist in order to reuse code already written once. I think this situation is perfectly familiar to you from projects from where you fled in horror.

Such implementation delivers no less problems to the business owner - he becomes attached to specific people, specific solutions and as a result begins to pay more and more. Entropy grows.

On the other hand, large companies that have thought about this in advance and started building competent architecture can avoid such problems. In particular, one of the elements of the “right” architecture can be BRMS.



It works like this: there is a user interface for setting up rules, there is a very repository of rules, and there is an engine for executing business rules. For example, the site may request a calculation of the size of the discount, your 1C may request verification of the account using certain parameters, etc. BRMS-system "feeds" the incoming data stored in the repository rules and gives the result. By the way, among other things it allows you to do analytical things, for example, to track cars that were repaired during the week for the same breakdown in different places (a frequent example of fraud on spare parts in car services).

Example


One possible implementation is IBM ILOG JRules (now IBM WODM). For example, on it we did the BRMS system for one large insurance company with four hundred branches throughout the country. It was important to take into account a bunch of rules for OSAGO and CASCO, calculate commissions, quickly make changes to the rules, make the tariff description exactly correspond to the calculation in the system, plus allow the customer to make changes to the rules independently.

The initial situation was as follows: the tariff calculation algorithms were embedded in the information systems code and in Excel calculators. To change the tariffs, a standard IT cycle “problem statement - development - testing - deployment” was used. The change cycle took several weeks. The result after the introduction - the rate of change of the tariff for several days, the rules change the underwriters, and IT only accompanies the process; there is a single source of rules (for employees and systems), thanks to this there is complete transparency and accuracy of calculations in all systems.

When implementing the main work done analyst, engineer and manager. They collected more than 200 parameters for the calculation of the rules, received tens of thousands of basic rules. At the exit - the time of one decision making by the system is less than 1 second, and 30,000 calculations are performed in less than 3 minutes.

The beauty of the system in the flexibility and possibilities of almost any settings. The rules are set in simple human language, such as “If the agent’s sales for a period> 1,000,000 rubles, then set a commission of 20%”.

Of course, besides ILOG, there are solutions from other vendors, for example, Oracle Automation Policy, plus there are open source platforms, the most famous of which is JBoss Drools.

What does this mean in terms of IT?


Least:
  1. Less routine coding becomes to implement business rules. They can be set declaratively.
  2. As the code gets smaller, it is easier to maintain.
  3. More effort will have to be spent on systems integration, which requires more highly skilled developers.

If you look at large companies in North America and Europe, you can see that they have gone much further both in business automation as a whole and in using tools that increase the efficiency of non-expensive IT professionals. In particular, there many have already taken the next step in rejecting tons of developed code, which is difficult to maintain, in the direction of using more flexible technologies like BRMS.

What does this mean from the user's point of view?


Independence from IT. Now you do not need to knock on the developers to change tariffs, for example. This means that the rate of making and implementing decisions within the company is dramatically increasing.

Another important point is that relations between departments improve, because if earlier there was a classic misunderstanding of “well, then you have to change one number” against “you need to reassemble and test everything”, now users don’t think that IT comes up with excuses, just not to do.

What else can BRMS-system?


She can do event-processing. That is, to pass through itself a stream of hundreds of thousands and millions of events that are processed by specified business rules. This can be useful for identifying patterns. I have already cited an example of the search for dishonest actions by car service personnel. Another example is the search for market trends, for example, certain alerts with, say, a decrease in the consumption of traffic by subscribers of a cellular operator with certain signs. There is fraud detection, for example, making decisions on the fact of two withdrawals: in a restaurant in Moscow and at an ATM in China in two hours.

It is easy to program each such rule manually, but when there are hundreds of them, it is logical not to code handlers for each case, but to write a system that allows you to customize everything. By the way, developers often do this, implementing various frameworks and other mechanisms for the declarative task of logic in their systems. In essence, this is BRMS.



What surprises are revealed during the implementation?


In my practice - a bunch of undocumented rules are found. They just need to be described in BRMS. It is much more fun that at almost every implementation it becomes a surprise for the management of the company, which rules are used there where they didn’t even look. It happens that some prehistoric temporary building, written by the first programmer of the company in 15 minutes and with a bunch of bugs, becomes the basis for the module for calculating something important, and overflows with all sorts of integrations like mushrooms. Another surprise for a number of contracting and internal developers of the company - the level of dependence on them immediately decreases. No longer needed are the Susanins, who are the only ones who understand how the module works - everything is described in a single system.

A common problem is to find out, in general, where your legs grow from when calculating. For example, it happens that there is some formula. The formula was written by the financial director, who has not been with the company for five years. From where in it what coefficient is taken - nobody knows, they are used as constants. Begin to understand, compare the business processes of departments - and it turns out, for example, that you can save on something. Because they understood how to count the coefficient.

Where can I use?


Perhaps the main indicators when to use BRMS are two: the presence of a large number of rules and the need for their regular change. For example, a medium-sized insurance company uses about 2000 business rules. Of course, not all business rules need automation. For example, “a contract for an amount of more than 300,000 rubles must be approved by a commercial director” is a rule that directly begs for control through BRMS. And "on the territory of the entrance only in the respirator" - rather, on the actions of the guard on the spot. All that requires analytics, monotony, control, and strict adherence to information systems is worth making out in BRMS.

If we talk about industries, then BRMS are suitable for use in virtually any industry where information systems are actively used.

How to understand if the company has matured to BRMS?


To begin with, try to estimate how difficult it is for you to implement the BRMS approach. If you have one point, few people, simple business rules and rule breaking errors are not very critical, then for now it is cheaper without introducing a new system. If the company is large, the price of an erroneous decision is high, IT solutions change slowly, plus you want to have more control over the situation - then BRMS can be your choice. It should be noted that licenses for such software are expensive - the sums are calculated in tens of thousands of dollars (however, there are open source solutions).

I would add that in my practice, in order for all this to really work, a manager is needed who is ready to implement the system precisely for the sake of improving business efficiency, and not a report to shareholders.

PS If you have questions that you do not want to ask in the comments, write to Iomehin@croc.ru .

Source: https://habr.com/ru/post/183952/


All Articles