Rete Network Diagram for the simple rules of the Java Rules Engine

Source: Internet
Author: User

A fact is added to the rule network through the session, the approximate process of how to make a rule match is as follows

(1) Find the corresponding Entrypointnode object from the map collection of Entrypointnode by root node object

(2) The Entrypointnode object has a Objecttypenode map collection that transforms the fact class into Classobjecttype, which is found in the collection Objecttypenode

(3) The sink attribute of the Ojecttypenode object refers to the rule network of the fact fact

(4) Take a alphanode from the list in the sink attribute to match, recursively traverse all Alphanode subnodes (sink attribute) and compare the fact data according to the conditions in the Alphanode.

==> (the child node) is an attempt to match a rule completely, if there is a mismatch down, indicating that the rule does not conform to the current fact, exits the recursion, and begins to match to the right.

==> (Nextrighttuplesinknode property) starts trying to match another rule.

===> down (all the conditional patterns of the rule currently represented by the Alphanode child node), if all the hidden conditions in the child nodes Alphanode are met, then exactly matches a rule, forming the agenda to join the conflict collection, to match all the rules, The result part of the match rule is then executed according to the priority of the rule, and the fact data is changed.

===> to the right (another rule is matched), if all of the child nodes alphanode the hidden conditions are met, then exactly match a rule, forming an agenda to join the conflict collection, to match all the rules, and then according to the priority of the rule to perform the matching rule on the result part, Change the fact data.

Rete Network for simple rules of the Java Rules Engine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.