What is jboss drools




















Stateless is a one-off execution of a KieRuntime with a provided data set. It may return some results, with the session being disposed at the end, prohibiting further iterative interactions. You can think of stateless as treating an engine like a function call with optional return results.

The foundation for this is the CommandExecutor interface, which both the stateful and stateless interfaces extend. This returns an ExecutionResults :. The CommandExecutor allows for commands to be executed on those sessions, the only difference being that the StatelessKieSession executes fireAllRules at the end before disposing the session. The commands can be created using the CommandExecutor. The Javadocs provide the full list of the allowed comands using the CommandExecutor.

Set Global calls setGlobal underneath. If true it uses the same name as the global name. A String can be used instead of the boolean, if an alternative name is desired. Allows an existing global to be returned. The second optional String argument allows for an alternative return name.

All the above examples execute single commands. The BatchExecution represents a composite command, created from a list of commands. It will iterate over the list and execute each command in turn. However the keen-eyed reader probably has already noticed the FireAllRules command and wondered how that works with a StatelessKieSession.

The FireAllRules command is allowed, and using it will disable the automatic execution at the end; think of using it as a sort of manual override function. Any command, in the batch, that has an out identifier set will add its results to the returned ExecutionResults instance.

The example presented includes command from the Drools and jBPM, for the sake of illustration. They are covered in more detail in the Drool and jBPM specific sections. In the above example multiple commands are executed, two of which populate the ExecutionResults. The query command defaults to use the same identifier as the query name, but it can also be mapped to a different identifier.

This is covered in section Commands API. Its main focus is on the decision service type scenarios. It avoids the need to call dispose. Stateless sessions do not support iterative insertions and the method call fireAllRules from Java code; the act of calling execute is a single-shot method that will internally instantiate a KieSession , add all the user data and execute user commands, call fireAllRules , and then call dispose.

The CommandExecutor and BatchExecution are talked about in detail in their own section. Our simple example shows a stateless session executing a given collection of Java objects using the convenience API. It will iterate the collection, inserting each element in turn.

Methods of the CommandFactory create the supported commands, all of which can be marshalled using XStream and the BatchExecutionHelper. StatelessKieSession supports globals, scoped in a number of ways. We cover the non-command way first, as commands are scoped to a specific execution call.

Globals can be resolved in three ways. These are shared for all execution calls. Exercise caution regarding mutable globals because execution calls can be executing simultaneously in different threads.

Using a delegate is another way of global resolution. Assigning a value to a global with setGlobal String, Object results in the value being stored in an internal collection mapping identifiers to values. Identifiers in this internal collection will have priority over any supplied delegate. Only if an identifier cannot be found in this internal collection, the delegate global if any will be used.

The third way of resolving globals is to have execution scoped globals. Here, a Command to set a global is passed to the CommandExecutor. The CommandExecutor interface also offers the ability to export data via "out" parameters. Inserted facts, globals and query results can all be returned. An instance of the KieMarshallers can be retrieved from the KieServices.

A simple example is shown below:. However, with marshalling, you will need more flexibility when dealing with referenced user data. To achieve this use the ObjectMarshallingStrategy interface. Two implementations are provided, but users can implement their own.

SerializeMarshallingStrategy is the default, as shown in the example above, and it just calls the Serializable or Externalizable methods on a user instance. IdentityMarshallingStrategy creates an integer id for each user object and stores them in a Map, while the id is written to the stream.

When unmarshalling it accesses the IdentityMarshallingStrategy map to retrieve the instance. This means that if you use the IdentityMarshallingStrategy , it is stateful for the life of the Marshaller instance and will create ids and keep references to all objects that it attempts to marshal.

Below is the code to use an Identity Marshalling Strategy. Im most cases, a single strategy is insufficient. For added flexibility, the ObjectMarshallingStrategyAcceptor interface can be used. This Marshaller has a chain of strategies, and while reading or writing a user object it iterates the strategies asking if they accept responsibility for marshalling the user object.

One of the provided implementations is ClassFilterAcceptor. This allows strings and wild cards to be used to match class names. The default is ". Assuming that we want to serialize all classes except for one given package, where we will use identity lookup, we could do the following:.

Also note that if you are using scheduled matches i. If rollback occurs the ksession state is also rolled back, hence it is possible to continue to use it after a rollback. To enable persistence several classes must be added to your persistence. The jdbc JTA data source would have to be configured first.

Bitronix provides a number of ways of doing this, and its documentation should be consulted for details.

For a quick start, here is the programmatic approach:. Bitronix also provides a simple embedded JNDI service, ideal for testing. To use it, add a jndi. The best way to learn the new build system is by example. The source project "drools-examples-api" contains a number of examples, and can be found at GitHub:.

Each example is described below, the order starts with the simplest most of the options are defaulted and working its way up to more complex use cases. The Deploy use cases shown below all involve mvn install. Utilize refers to the initial act of loading the resources and providing access to the KIE runtimes. Where as Run refers to the act of interacting with those runtimes. Summary: Empty kmodule. The example shows the retrieval of the default KieSession from the classpath.

An empty kmodule. That single KieBase is the default and also includes a single default KieSession. Default means they can be created without knowing their names. Notice that you no longer need to look up the KieBase, in order to create the KieSession.

Summary: kmodule. The examples shows the retrieval of the named KieSession from the classpath. KieSession 'ksession1' is associated with that KieBase and can be created by name. This time the KieSession uses the name 'ksession1'. You do not need to lookup the KieBase first, as it knows which KieBase 'ksession1' is assocaited with. Summary: 'kmodule. In this case it inherits the named KieBase from the 'name-kiesession' example. Further it will include all the resources found from the KieBase 'kbase1', due to the use of the 'includes' attribute.

KieSession 'ksession2' is associated with that KieBase and can be created by name. This example requires that the previous example, 'named-kiesession', is built and installed to the local Maven repository first. Once 'named-kiesession' is built and installed this example can be built and installed as normal. Again the act of installing, will force the unit tests to run, demonstrating the use case. This time the KieSession uses the name 'ksession2'. Notice two rules fire this time, showing that KieBase 'kbase2' has included the resources from the dependency KieBase 'kbase1'.

Summary: Demonstrates that the 'kmodule. Introduces the 'packages' attribute to select the folders for the resources to be included in the KieBase. The other KieBases include resources from other selected folders, via the 'packages' attribute.

Only part of the example is included below, as there is a test method per KieSession, but each one is a repetition of the other, with different list expectations. Summary: The project does not contain a kmodule. Instead the Java code demonstrates the loading of a dynamic KieModule from a Maven repository. The pom. As this uses Maven under the hood you can also use the standard Maven settings.

In the previous examples the classpath KieContainer used. This example creates a dynamic KieContainer as specified by the ReleaseId.

The ReleaseId uses Maven conventions for group id, artifact id and version. Summary: Dynamic KieModules can also be loaded from any Resource location. No kmodue. The project 'default-kiesession' must be built first, so that the resulting JAR, in the target folder, can be referenced as a File. Once deployed in the KieRepository it can be resolved via its ReleaseId.

Note neither Maven or kie-ci are needed here. It will not set up a transitive dependency parent classloader.

The project 'named-kiesession' must be built first, so that the resulting JAR, in the target folder, can be referenced as a File. Once in the KieRepository it can be resolved via its ReleaseId.

It will not setup a transitive dependency parent classloader. Summary: Programmatically provide the list of dependant KieModules, without using Maven to resolve anything. The projects 'named-kiesession' and 'kiebase-include' must be built first, so that the resulting JARs, in the target folders, can be referenced as Files. Creates two resources. One is for the main KieModule 'exRes1' the other is for the dependency 'exRes2'.

Even though kie-ci is not present and thus Maven is not available to resolve the dependencies, this shows how you can manually specify the dependent KieModules, for the vararg. Summary: Programmaticaly buid a KieModule from just a single file. The POM and models are all defaulted. This is the quickest out of the box approach, but should not be added to a Maven repository. This programmatically builds a KieModule.

It populates the model that represents the ReleaseId and kmodule. A pom. The KIE engine is a platform for the modelling and execution of business behavior, using a multitude of declarative abstractions and metaphores, like rules, processes, decision tables and etc.

Many times, the authoring of these metaphores is done by third party groups, be it a different group inside the same company, a group from a partner company, or even anonymous third parties on the internet. Rules and Processes are designed to execute arbitrary code in order to do their job, but in such cases it might be necessary to constrain what they can do.

For instance, it is unlikely a rule should be allowed to create a classloader what could open the system to an attack and certainly it should not be allowed to make a call to System. The Java Platform provides a very comprehensive and well defined security framework that allows users to define policies for what a system can do. The KIE platform leverages that framework and allow application developers to define a specific policy to be applied to any execution of user provided code, be it in rules, processes, work item handlers and etc.

Rules and processes can run with very restrict permissions, but the engine itself needs to perform many complex operations in order to work. Examples are: it needs to create classloaders, read system properties, access the file system, etc. Once a security manager is installed, though, it will apply restrictions to all the code executing in the JVM according to the defined policy. For that reason, KIE allows the user to define two different policy files: one for the engine itself and one for the assets deployed into and executed by the engine.

One easy way to setup the enviroment is to give the engine itself a very permissive policy, while providing a constrained policy for rules and processes. Policy files follow the standard policy file syntax as described in the Java documentation. For more details, see:. Please note that depending on what the rules and processes are supposed to do, many more permissions might need to be granted, like accessing files in the filesystem, databases, etc.

In order to use these policy files, all that is necessary is to execute the application with these files as parameters to the JVM.

Three parameters are required:. Defines the global policy file to be applied to the whole application, including the engine. Define the kie security policy as described above and set the kie. Please note that unless a Security Manager is configured, the kie. Applications with strict performance requirements are strongly discouraged of using a Security Manager.

Over the last few decades artificial intelligence AI became an unpopular term, with the well-known "AI Winter". There were large boasts from scientists and engineers looking for funding, which never lived up to expectations, resulting in many failed projects.

Thinking Machines Corporation and the 5th Generation Computer 5GP project probably exemplify best the problems at the time. Here is a quote from its brochure:. It will be a truly intelligent machine. One that can see and hear and speak. A machine that will be proud of us.

Yet 5 years later it filed for bankruptcy protection under Chapter The site inc. The article covers the growth of the industry and how a cosy relationship with Thinking Machines and DARPA over-heated the market, to the point of collapse. It explains how and why commerce moved away from AI and towards more practical number-crunching super computers.

Valves or Tubes was the first generation, transistors the second, integrated circuits the third and finally microprocessors was the fourth. The fifth was intended to be a machine capable of effective Artificial Intelligence. By the project was considered a failure and cancelled. It was the largest and most visible commercial venture for Prolog, and many of the failures are pinned on the problems of trying to run a logic based programming language concurrently on multi CPU hardware with effective results.

Net have dominated the last 20 years, enabled by the practicality of the languages and ability to run with good performance on commodity hardware. However many believe there is a renaissance underway in the field of AI, spurred by advances in hardware capabilities and AI research. In Heather Havenstein authored "Spring comes to AI winter" which outlines a case for this resurgence.

Norvig and Russel dedicate several pages to what factors allowed the industry to overcome its problems and the research that came about as a result:. Recent years have seen a revolution in both the content and the methodology of work in artificial intelligence. It is now more common to build on existing theories than to propose brand-new ones, to base claims on rigorous theorems or hard experimental evidence rather than on intuition, and to show relevance to real-world applications rather than toy examples.

Computer vision , neural networks , machine learning and knowledge representation and reasoning KRR have made great strides towards becoming practical in commercial environments. For example, vision-based systems can now fully map out and navigate their environments with strong recognition skills.

As a result we now have self-driving cars about to enter the commercial market. Ontological research, based around description logic, has provided very rich semantics to represent our world. Algorithms such as the tableaux algorithm have made it possible to use those rich semantics effectively in large complex ontologies. Early KRR systems, like Prolog in 5GP, were dogged by the limited semantic capabilities and memory restrictions on the size of those ontologies.

KRR is about how we represent our knowledge in symbolic form, i. Reasoning is about how we go about the act of thinking using this knowledge. In Java we call exemplars of these described things beans or instances.

However those classification systems are limited to ensure computational efficiency. Over the years researchers have developed increasingly sophisticated ways to represent our world. There is always a gap between what can be theoretically represented and what can be used computationally in practically timely manner, which is why OWL has different sub-languages from Lite to Full.

It is not believed that any reasoning system can support OWL Full. However, algorithmic advances continue to narrow that gap and improve the expressiveness available to reasoning engines. There are also many approaches to how these systems go about thinking.

You may have heard discussions comparing the merits of forward chaining, which is reactive and data driven, with backward chaining, which is passive and query driven. Many other types of reasoning techniques exist, each of which enlarges the scope of the problems we can tackle declaratively. To list just a few: imperfect reasoning fuzzy logic, certainty factors , defeasible logic, belief systems, temporal reasoning and correlation. They are just there to give an idea of the range of scope of research topics, which is actually far more extensive, and continues to grow as researchers push new boundaries.

KRR is often referred to as the core of Artificial Intelligence. Even when using biological approaches like neural networks, which model the brain and are more about pattern recognition than thinking, they still build on KRR theory.

My first endeavours with Drools were engineering oriented, as I had no formal training or understanding of KRR. It really is a vast and fascinating subject that will pay dividends for those who take the time to learn.

I know it did and still does for me. Bracham and Levesque have written a seminal piece of work, called "Knowledge Representation and Reasoning" that is a must read for anyone wanting to build strong foundations. The rule engine is the computer program that delivers KRR functionality to the developer. At a high level it has three components:. As previously mentioned the ontology is the representation model we use for our "things".

It could use records or Java classes or full-blown OWL based ontologies. The rules perform the reasoning, i. The distinction between rules and ontologies blurs a little with OWL based ontologies, whose richness is rule based. The term "rules engine" is quite ambiguous in that it can be any system that uses rules, in any form, that can be applied to data to produce outcomes.

This includes simple systems like form validation and dynamic expression engines. The book is actually about how to build and alter a database schema to hold validation rules.

The book then shows how to generate Visual Basic code from those validation rules to validate data entry. While perfectly valid, this is very different to what we are talking about. Drools started life as a specific type of rule engine called a Production Rule System PRS and was based around the Rete algorithm usually pronounced as two syllables, e. The Rete algorithm, developed by Charles Forgy in , forms the brain of a Production Rule System and is able to scale to a large number of rules and facts.

A Production Rule is a two-part structure: the engine matches facts and data against Production Rules - also called Productions or just Rules - to infer conclusions which result in actions. The process of matching the new or existing facts against Production Rules is called pattern matching , which is performed by the inference engine.

Actions execute in response to changes in data, like a database trigger; we say this is a data driven approach to reasoning. The actions themselves can change data, which in turn could match against other rules causing them to fire; this is referred to as forward chaining.

Drools 5. This extended Rete algorithm is named ReteOO , signifying that Drools has an enhanced and optimized implementation of the Rete algorithm for object oriented systems. Drools 6. Facts are asserted into the Working Memory where they may then be modified or retracted. A system with a large number of rules and facts may result in many rules being true for the same fact assertion; these rules are said to be in conflict.

The Agenda manages the execution order of these conflicting rules using a Conflict Resolution strategy. You may have read discussions comparing the merits of forward chaining reactive and data driven or backward chaining passive query. Here is a quick explanation of these two main types of reasoning. Forward chaining is "data-driven" and thus reactionary, with facts being asserted into working memory, which results in one or more rules being concurrently true and scheduled for execution by the Agenda.

In short, we start with a fact, it propagates through the rules, and we end in a conclusion. Backward chaining is "goal-driven", meaning that we start with a conclusion which the engine tries to satisfy.

These are known as subgoals, that will help satisfy some unknown part of the current goal. It continues this process until either the initial conclusion is proven or there are no more subgoals. Prolog is an example of a Backward Chaining engine.

Drools can also do backward chaining, which we refer to as derivation queries. Historically you would have to make a choice between systems like OPS5 forward or Prolog backward.

Nowadays many modern systems provide both types of reasoning capabilities. There are also many other types of reasoning techniques, each of which enlarges the scope of the problems we can tackle declaratively. Modern systems are merging these capabilities, and others not listed, to create hybrid reasoning systems HRS.

While Drools started out as a PRS, 5. For this reason we now prefer the term Hybrid Reasoning System when describing Drools. Drools currently provides crisp reasoning, but imperfect reasoning is almost ready. Work is also under way to bring OWL based ontological reasoning, which will integrate with our traits system. We also continue to improve our functional programming capabilities. You will often hear the terms expert systems used to refer to production rule systems or Prolog -like systems.

It becomes an expert system once there is an ontological model to represent the domain and there are facilities for knowledge acquisition and explanation. Mycin is the most famous expert system, built during the 70s. It is still heavily covered in academic literature, such as the recommended book "Expert Systems" by Peter Jackson.

The Rete algorithm was invented by Dr. Charles Forgy and documented in his PhD thesis in The Latin word "rete" means "net" or "network". The Rete algorithm can be broken into 2 parts: rule compilation and runtime execution. The compilation algorithm describes how the Rules in the Production Memory are processed to generate an efficient discrimination network. In non-technical terms, a discrimination network is used to filter data as it propagates through the network.

The nodes at the top of the network would have many matches, and as we go down the network, there would be fewer matches. At the very bottom of the network are the terminal nodes. In Dr. The root node is where all objects enter the network. From there, it immediately goes to the ObjectTypeNode.

To be successful we need to do our job quicker, faster, and better than anybody else. JBoss Rules can help us become better and faster at managing our knowledge. To explain how, this chapter looks at:.

If you are reading this, you probably know important information. You might be in the medical, legal, or accountancy professions. You may be the only person in the company who understands how to process refunds to tractor dealers in the Chicago area. You may be the most experienced underwriter in the mortgage application department. Or you may be the person who is most capable of talking to 'those guys in IT'. Perhaps you've taken part in one or more Business and IT projects, or maybe this is your first one.

Whoever you are, you've got a problem. Maybe your team is too busy for the workload it has, maybe you can't recruit enough people to work for you, or maybe you can get the people, but it takes too many resources to train them.

Whatever the cause, there are not enough minds to go around, and costly or embarrassing mistakes happen as a result. You've probably already joked about being able to clone your key people.

Wouldn't it be great to leave your clone working at the desk while you get some time on the beach; or even just get to go home on time? Although JBoss Rules does not allow you to clone yourself, it does allow you to clone your mind that is, put your knowledge into a computer. Once in the computer, this knowledge can be copied, reviewed, and kept working even after you go home. Your second thought after hearing the "put your knowledge into a computer" bit is probably, "If the computer knows what I know, will I be out of a job?

This book is aimed at non-technical users, although it contains a lot of information for people who want to get under the covers of JBoss Rules.

Don't worry even if the entire extent of your PC skills is limited to writing a couple of formulae in Excel. You're going to be OK. Everybody complains about his or her job from time to time. You probably have a mug saying "You don't have to be crazy to work here…but it helps".

Just try out our question pop quiz and see if it sounds somewhat like the place where you spend most of you working hours:. Is Bob, in the corner, the only person who knows how the system really works? Can the business scale only if we have an expert? Is critical knowledge lost when people like Bob leave? If you're Bob owning the knowledge , are you sick of people asking you stupid questions?

Do you think: don't these people know that you've got a job to do? Are your customers getting a different answer every time they call your company and getting more than slightly irate about it? Are you at risk of receiving a slap on the wrist or worse, a fine from a regulator or other standards body?

Do you find yourself working around, rather than with, your computer systems? Have you ever thought of pouring coffee into your computer keyboard in frustration?

Trust me, it doesn't help. Are things always done by the book, or is there a lot of informal knowledge that is just in people's heads? Did you prepare for a quality ISO audit and then leave the process documentation unused on a shelf? Is there anybody around who knows or wants to change this process? Is this the right balance between being too hard to change and being stuck in a rut and being too easy resulting in chaos?

If a change is made, will people know about it and will they take any notice? Does your business knowledge exist in some easily usable format? Is its format easy to update? Can everybody use it from one central location so that copies are not 'out of sync'? Can you track changes made and roll them back if you get it wrong? Do the right people and only the right people have access both read and update to this information? Does this access need to change depending on the context of what the user is doing at the time?

Do people in your organization work on projects? Do they come together to form goal-driven teams and then go back to their original jobs when the objectives have been achieved? Do you know how to document the outcome of these projects as rules so that they can be reused? Are tasks carried out in isolation? How do we ensure that tasks and team members collaborate effectively? In the old days, everything was done in-house. Now the 'office as a factory' must also seamlessly interlink with other suppliers plugged in as part of the process.

If some of these problems seem familiar, then maybe, just maybe, business rules and JBoss Rules can help. But if you think you've got problems, consider the following example.

The health services in Bangladesh like many elsewhere can't get enough doctors. Training more doctors is not an answer. Those who do qualify tend to leave for higher rates of pay elsewhere. So, given the desperate need for trained medical staff in rural areas for example, to curb child mortality rates , what are the health workers to do? The more qualified a doctor is, the more likely he is to take a flight.

The district hospital in Matlab, Bangladesh, boasts an operating table, lamp, oxygen cylinder, and anesthetic machine, all carrying the EU's gift tag. They gleam, partly because they are unused. Several surgeons and anesthetists have been trained, but none so far have been retained.

Doubling their pay is not the answer because they can earn five or ten times as much in private practice. Besides, specialists want to educate their children in the capital Dhaka, not in Bangladesh's backwaters. Imagine that you were standing in that clinic without medical training, when a mother asks you to look at her sick child.

What will you do? IMCI takes the knowledge in a doctor's head and writes it down as a set of rules that health workers can follow. When a sick child is brought into the remote clinic, the health worker is able to follow the simple step-by-step instructions to make quite a sophisticated diagnosis.

Look at the boxes in the above diagram—it's a set of medical rules. Using these rules a health care worker can quickly come to the following conclusions:. This is a real life example of business rules. Although it is paper-based and useful to the medical profession, it's a good example of business rules all the same.

Rules are 'when something is present, then do this'. And not just single rules, but many of them. Together, loads of simple rules allow you to come up with quite a sophisticated diagnosis. Ruleflow and Workflow allow you to group your rules and decide which should fire first. If you're a health worker with a sick child, you want to do the most important checks first. Depending on the outcome, you then apply the next set of medical rules.

Everybody, including the doctors, is happy that his or her knowledge has been translated into rules. The doctors are happy because they can guiltlessly move to better-paying jobs. The medical workers using the system are happy because they can help the sick children that they see every day. The children gain because the better availability of medical knowledge is literally the difference between life and death. If you've used a computer language before, you might find the above example strange.

Rules are different; they allow you to make many individual statements of what you know to be true and then let the computer decide if these rules apply or not to the current situation.

This is similar to the way in which the human mind works. Look again at the example. We don't specify any order for our rules. All of them, one of them, or none of them might apply in a given situation. A child under two who was dehydrated potentially could be referred to a doctor and given rehydration salts on the way in.

This could be the outcome we want, or we may wish to rewrite our rules to be more precise—but always in the "when something is true then do this " format. You're going to be hearing a lot about 'business rules' over the next couple of pages, so it might be helpful to clarify what they are. We use the term 'business rule' to show that rules are non-technical. They could also be called 'medical rules', 'financial rules', 'insurance rules', 'benefit payment rules', and so forth.

It all depends on the organization you work for, and the particular niche that it finds itself in. A business rule is any bit of knowledge that can be expressed in the following format:. When 'something' is true, Then do 'this'. You do have knowledge like that in your organization, don't you? All companies and organizations have business rules, even if they are implied that's, unwritten or buried as code in existing systems for example the ones with black screens and green text that you see in Hollywood movies.

When somebody leaves the office before 4 pm, make sarcastic comment about 'taking a half-day vacation'. This book uses the "when In practical terms, these are very similar to "if The key reason for using 'when' is to underline that business rules will 'fire' whenever the condition is true. Traditional 'if' statements will only fire if we happen to be at that step in the process at the time.

Business rules themselves tend to be simple. Their power comes from the fact that there are many of them tens, hundreds, or even thousands. Just as you have many rules in your head when you see a bear, run away , the trick is knowing when to apply them what happens when you see a bear in the zoo?

Later we'll look at writing rules clearly and testing them to ensure that they do what you want. Business rules should be written as clearly as possible in English, or your human language of choice.

While this makes your life easier when writing the rules, more importantly, it allows other people to review your rules in the future. So clarity is one of the biggest advantages of using rule engines. As a simple exercise, take 10 minutes to list some of the business rules in your organization.

Don't worry if they are simple or difficult. Just write them out in the "when…then" format. The following figure shows sample business rules for a chocolate factory:.

Since I was a child, I've always wanted to work in a chocolate factory, and here's my chance. The figure shows the sample rules that I came up with. When the Finance department sees that we've sold more than 30, Chocolate Crunchie bars, then they should Order more chocolate. It is written in Java. It extends and implements the Rete Pattern matching algorithm. The two important keywords we need to notice are Logic and Data. Expert Systems are knowledge-based systems that use knowledge representation to process acquired knowledge into a knowledge base that can be used for reasoning.

A Production Rule System is Turing complete with a focus on knowledge representation to express propositional and first-order logic in a concise, non-ambiguous and declarative manner. The brain of a Production Rules System is an Inference Engine that can scale to a large number of rules and facts. The Inference Engine matches facts and data against Production Rules — also called Productions or just Rules — to infer conclusions which result in actions. A Production Rule is a two-part structure that uses first-order logic for reasoning over knowledge representation.

For more details, check out the Drools home page. Wizards Getting started. Debugging Debug your processes.



0コメント

  • 1000 / 1000