Questions tagged [nools]

nools is a Rete based rules engine written in javascript.

nools is a Rete based rules engine written in javascript.

https://github.com/C2FO/nools

9 questions
6
votes
0 answers

How to define Nools in Nodejs?

I am looking to create nools rules in nodejs. I am new to nools rule-engine.I am trying to write a rule but i don't know anything about nools. I have studied whole documentation but it is confusing me. So please can anyone help me how to create…
Raks
  • 131
  • 4
3
votes
1 answer

Converting a rule from node-rules engine to nools rule engine

var RuleEngine = require('node-rules'); var titan = { "product": "Titan", "amount":"500", "base":1, "conversation":0.91, }; var oxicash = { } var rules = [{ "name": "Product rule", …
A.H
  • 129
  • 2
  • 10
3
votes
1 answer

how deal with dynamic rules in a flow

I'm using nools rule engine and I have the necessity of modify rules on the fly without impacting the rule engine integrity. So far I was using the default 'main' action group to store my default rules and using an specific action group to store…
rahpuser
  • 1,224
  • 10
  • 31
1
vote
0 answers

Is RETE algorithm still relevant in year 2022 OR we have better alternatives, do we have any other stable rule engine libs in JavaScript except nools?

I am working with a user input that has to be processed based on the set of rules. Using nools but its a pain in the back when comes to javascript ES6 operations like IIFE, map-reduce, nested sort. Talking about RETE algo in 2022 might sound…
1
vote
1 answer

Unable to run nools

Hi I'm working on nools in node.js. When I run this program an error occurred: throw new Error("Invalid expression '" + expression + "'") Invalid expression 'm.text = ~/^hello(\s*world)?$/' pls help to fix this problem. Here my…
chozhan
  • 181
  • 2
  • 17
1
vote
1 answer

Unit test failing on Angular service with promises

JSFiddle showing the problem: http://jsfiddle.net/ggvfwoeL/3/ I have an Angular application that involves a service for generating threats. The threat generation is done using the nools rule engine. The service exposes a function generateForElement…
Mike Goodwin
  • 8,810
  • 2
  • 35
  • 50
1
vote
1 answer

design pattern with rule engine and node.js to handle permissions

I have the requirement to use a rule engine to implement role permissions in the system ( could this be an overkill? ) however the permissions are kind of complicated and complex itself. I got confused in how to grant access or not using a…
rahpuser
  • 1,224
  • 10
  • 31
0
votes
1 answer

How to import nools with es6 and webpack

I want import nools in my project with webpack, and I try in 2 steps : 1) install nools with npm : npm install nools --save 2) import nools in to the project : import "../node_modules/nools"; webpack give me this error : Can not resolve 'fs' and…
Reza Mazarlou
  • 2,986
  • 4
  • 22
  • 31
0
votes
1 answer

Creating a Discount Rule using Nools rule engine

Am trying to create a new discount rule in my e-commerce website. I thought nools rule engine was the best to implement. but i dont know how to start and where to start. i have read the documentation also . am not getting anything. Can any one help…
A.H
  • 129
  • 2
  • 10