Читать книгу Leveraging SAP BRFplus in Big Data Scenarios - Tom Zamir - Страница 10

Rule as a service

Оглавление

A business rule should be visualized as a special service such that it helps the caller to reach a resolution for a specific decision they must make. I will use the terms invoker or caller to address the entity that invokes the rule service, although the entity may invoke the rule without explicit intent. For every decision the invoker needs to make, there should be a dedicated rule to support it. A good rule is one that supplies a definite resolution for the question “What (logical) path should I take?”.

The rule service does not have to be specific about the actual action that needs to be taken. However, the invoker must be able to translate the answer into an actual action. In fact, the key trait of the concept of the rule as a service is the avoidance of acting in the world on behalf of the invoker as a by-product of the decision process. Instead, the result returned should be pure information and the final course of action should always be taken by the invokers themselves.

For the rule to be an effective decision service, there should always be a deterministic one-to-one translation between the informative outcome of the rule and the decisive action taken by the invoker. When the traffic light turns red, it does not press the brake pedal of the car. It also does not change the radio station, nor does it adjust the car’s mirrors—it simply turns red. The driver, however, should not cross the intersection when he sees a red traffic light, otherwise he may very well be arrested for jeopardizing himself and other drivers.

The traffic light, for example, is an effective decision service because its output can always be translated into a definite course of action: a red light means that you must not cross the intersection right now and green means that you may cross the intersection. The extent to which the driver applies pressure on the brake pedal and what the exact value of the deceleration or acceleration of the car is are not dictated by the rule but are determined by the judgment of each driver.

Leveraging SAP BRFplus in Big Data Scenarios

Подняться наверх