i use Jess rule engine with java and i have a template person with a number of facts. I excecute a rule concerning persons and i would like to get the number of facts that satisfy the rule and made it fire. Is this possible; e.g.Command engine.executeCommand("(run)") returns only 0 or 1 in case a rule fired
1
There are 1 answers
Related Questions in RULE
- Laravel : Need to dynamic validation rules (read from config file or setting)
- SWRL rule does not the right thing
- Evaluation of condition failed. Rule item ID: Unknown, condition item ID: Unknown - Operation not valid due to the current state of the object
- How to break the loops in Drools, Mvel dialect?
- How to use dynamic rule validation in jquery
- Url RewriteRule for Wordpress website
- Nintex choice control rule
- Exclude specific rules SonarQube
- What does the "squid:" Prefix mean in SonarLint Rules?
- Drools Object Passing Issue in DRL
- Htaccess redirect always keeps the old path
- ANTLR: Grammar with uppercase rules won't recognize input
- Copy rule of excel cell with openpyxl
- What is the right arrangement of these two names if we sort it
- Bison accept input after rule done
Related Questions in JESS
- Where to access Jess Rules engine software
- how do i prevent a rule from firing until asserts are complete?
- is it possible to use the result of a defquery by a defrule?
- why am i getting " Message: No method named 'hasNext' found in class jess.QueryResult."
- Why do i get "thread death" error in JessDE?
- What does "&:" mean in JessRule?
- How to run jess file (.clp file) from windows CMD/ .bat file?
- Run FuzzyJess files in console. Is it possible? (new in Jess)
- Jess - Is there an efficient way to check if a fact is still in working memory?
- Why isn't variable x referenced well?
- How to update facts in Jess Rules Engine?
- an error has occurred.see log file. workspace .metadata .log eclipse
- How do i make shadow facts?
- how do i put facts boolean in a slot by then after make a rule who can count it?
- Jess plugin for eclipse not working?and not installed
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Depending on what exactly you need, there are several things you might do. The function
(run)actually returns the number of rules that fired, so if each fact activates one rule, then the return value of(run)would do it.If you need to do anything more complex, then you can register a
JessEventListenerto be notified when each rule fires. TheJessEventwill contain the whole activation record for the rule, so you can walk through it and count the facts however you like. Since rules can match the non-existence of facts, or the existence of at least one fact that fits a pattern, etc, the question of "how many facts activated a rule" isn't completely straightforward. But with the activation record in hand, you can count them however you like.