添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
欢乐的铁链  ·  I want to use arrow ...·  2 天前    · 
大力的金针菇  ·  pyarrow.csv.CSVWriter ...·  1 周前    · 
豪爽的猴子  ·  Gel pour sourcils Big ...·  2 周前    · 
长情的沙滩裤  ·  Add Secondary Indexes ...·  2 周前    · 
坚强的铁板烧  ·  SQL UNION overview, ...·  4 月前    · 
侠义非凡的拐杖  ·  Check failed: 0 <= ...·  5 月前    · 
稳重的铁链  ·  WPF Prism框架(1) -- ...·  10 月前    · 

A business rules engine (BRE) is an application that manages decision processes using pre-defined logic to determine outcomes. BREs enable precise decision-making and are especially useful for complex dependencies, as well as in instances where regulatory or organizational rule changes frequently require logic changes. Automation can mean the difference between rules changes taking months vs. hours. The benefits of having Business Rules Engines are huge, some of them being improved compliance, improved quality of work, reduced manual work, and chances for human errors.

SnapLogic platform does not support any rules engine so, we have decided to try to connect the SnapLogic platform with Drools as a rule engine and try to execute business rules with them.

In this blog post, we will present the Drools Transformer custom-developed snap. As I said, we have decided to make a connection between SnapLogic and Drools as a rule engine and develop a snap which can centralize the business logic of the clients and make the whole process much faster and cheaper. It means when some client has defined specific business rules with a lot of conditions we can use Drools rule engine to resolve these kinds of conditions without writing a huge amount of code with many nested if-else statements.

Drools

Let’s say a couple of words about Drools. Drools is a Business Rule Management System (BRMS) solution. It provides a rule engine, which processes facts and produces output as a result of rules and facts processing. The centralization of business logic makes it possible to introduce changes fast and cheaply.

It also bridges the gap between the Business and Technical teams by providing a facility for writing the rules in a format that is easy to understand.

Use-case scenario

We have defined a real case scenario about discount offers as an example of some business rules. For that purpose, we have defined some rules and those are:

  • 0% of discount for standard users
  • 15% of discount for premium users
  • 10% of additional discount for first purchase

Getting started

To make the connection between SnapLogic and Drools, we have defined a real case scenario explained above. We will simulate the solution of that use-case scenario building a simple pipeline that will contain:

  • JSON Generator snap which will contain the expected input data
  • Mapper snap will be used to map the wanted values
  • Drools Transformer snap will be expecting .drl file where we will write our rules based on the requirements (input data) modify and output the data after resolving the conditions

Step by Step

In this section, we will explain the entire process of simulating the solution for this use-case scenario.

First, we need to analyze the input that we are expecting:

As you can see in this example the .drl (the rules file) has its own syntax. First, we need to declare the types that we have in this case Product and User and after that, we have to write the rules that we have defined. So, these types will be mapped according to the input document that we expect in JSON format and after that, all rules will be fired and the data will be modified, transformed, and sent as an output document in JSON format. Also, we want to point out that the .drl file is the most important because here we are defining the rules for the conditions that we want to resolve and we can easily modify the file and define new rules based on the input that we are expecting.

When we are finished with analyzing the expected input data and writing the rules we need to prepare the pipeline and enter all the data that is needed and simulate the solution of the use case.

You can see we are mapping the input values under User and here we also have the information about the product that the user wants to buy. You can map the values as you want it depending on how the data should be processed.

The next step is to upload the .drl file where we have defined our rules in the Drools File section and specify the Fact Type that we want to map and display on output (in this case User) in the Fact Types section. Also, we can have multiple Fact Types, which is based on the mapping we are doing and the data we want to display according to the client’s requirements.

In the end, after successfully simulating the solution of this use-case scenario we can say that now we can easily resolve any kind of use-cases like this using the Drools Transformer snap and Drools as a rule engine to centralize the business logic of the clients and make the whole business process much faster and cheaper.

  • Finance and Accounting
    keyboard_arrow_down
  • Human Resources
    keyboard_arrow_down
  • Sales & Marketing
    keyboard_arrow_down
  • IT
    keyboard_arrow_down
  • Telecommunications
    keyboard_arrow_down
  • Supply Chain
    keyboard_arrow_down
  • eCommerce
    keyboard_arrow_down
  • Customer Service
    keyboard_arrow_down
  • Retail
    keyboard_arrow_down
  • Create Amazing Solutions
    keyboard_arrow_down
  • Accelerate Your Processes
    keyboard_arrow_down
  • Integrate Your Solutions
    keyboard_arrow_down
  • Deploy and Monitor
    keyboard_arrow_down
  • Master Your Data
    keyboard_arrow_down
  • Managed Services
    keyboard_arrow_down
  • Business Support
    keyboard_arrow_down
  • Low-code Platforms
    keyboard_arrow_down
  • Quality Assurance
    keyboard_arrow_down
  • Microsoft
    keyboard_arrow_down
  • PHP
    keyboard_arrow_down
  • DevOps
    keyboard_arrow_down
  • AWS Cloud
    keyboard_arrow_down
  • Data Management
    keyboard_arrow_down
  • SnapLogic
    keyboard_arrow_down
  • MuleSoft
    keyboard_arrow_down
  • Mobile
    keyboard_arrow_down
  • Life at ⋮IW
    keyboard_arrow_down
  • Job Openings
    keyboard_arrow_down
  • Events
    keyboard_arrow_down
  • Are your business departments fully optimized or are you facing certain challenges in some of them? Choose the department where you are experiencing challenges and see how you can leverage our custom solutions to address them.

    Sales & Marketing