Drools

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. Centralization of business logic makes it possible to introduce changes fast and cheap.

What are Drools Basic?

We are going to look into Drool basic concepts

Facts — represents data that serves as input for rules

Working Memory — a storage with Facts, where they are used for pattern matching and can be modified, inserted and removed

Rule — represents a single rule which associates Facts with matching actions. It can be written in Drools Rule Language in the .drl files or as Decision Table in an excel spreadsheet.

Knowledge Session — it holds all the resources required for firing rules; all Facts are inserted into session, and then matching rules are fired

Knowledge Base — represents the knowledge in the Drools ecosystem, it has the information about the resources where Rules are found, and also it creates the Knowledge Session

Module — A module holds multiple Knowledge Bases which can hold different sessions

Let’s understand Drool keyword

package — this is the package name we specify in the kmodule.xml, the rule file is located inside this package

import — this is similar to Java import statement, here we need to specify the classes which we are inserting in the KnowledgeSession

global — this is used to define a global level variable for a session; this can be used to pass input parameter or to get an output parameter to summarize the information for a session

Rule: A rule is nothing but the logic that will be applied to incoming data. It has two main parts: when and then.

When: Determines the condition on which the Rule will be fired.

Then: The action; if the rules met the condition, they defines what work this rule performs.

Conclusion:

We have explored making use of Drools as a business rule engine in our application. There are multiple way of writing rules, we can also use decision tables which provide capability of defining rule in pre-formatted Excel sheet.

要查看或添加评论,请登录

NISHI KUMARI的更多文章

  • What Is Digital Legal Talent?

    What Is Digital Legal Talent?

    “Talent” is a common term lacking a conventional meaning. The importance of a working definition goes far beyond…

  • What Is Six Sigma?

    What Is Six Sigma?

    Six Sigma is a quality-control methodology that businesses use to significantly reduce defects and improve processes…

  • What is PMI?

    What is PMI?

    PMI or a Purchasing Managers’ Index (PMI) is an indicator of business activity -- both in the manufacturing and…

  • What is Debt Recovery?

    What is Debt Recovery?

    Debt recovery and debt collection are similar terms with one small, but very important distinction. The difference is…

  • Row-level security (RLS)

    Row-level security (RLS)

    Create roles It's possible to create multiple roles. When you're considering the permission needs for a single report…

  • What is NULL ?

    What is NULL ?

    In Structured Query Language Null Or NULL is a special type of marker which is used to tell us about that a data value…

  • Delta Format

    Delta Format

    The Delta format is a storage format used in data lakes, particularly in the context of Azure Data Factory and Azure…

  • Amazon SageMaker

    Amazon SageMaker

    Amazon SageMaker is a fully managed machine learning (ML) service provided by Amazon Web Services (AWS). It enables…

  • What is SharePoint?

    What is SharePoint?

    SharePoint is a web-based collaborative platform developed by Microsoft, launched in 2001. It is primarily used for web…

  • What is Data Pipeline?

    What is Data Pipeline?

    A data pipeline is a series of processes and tools designed to collect, process, and deliver data from various sources…

社区洞察

其他会员也浏览了