Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Ruleset that has algebra function will not work? #393

Open
tuongbuimtt opened this issue Feb 17, 2023 · 0 comments
Open

Create Ruleset that has algebra function will not work? #393

tuongbuimtt opened this issue Feb 17, 2023 · 0 comments

Comments

@tuongbuimtt
Copy link

I try to use some function that uses the algebra functions such as add(), sub(), mul(), ... And the result is cannot not creat the ruleset.
How can I use that functions?

 whenAll: {
   m.number.sub(1) > 3;
  }
run:
{
    console.log(m);
 }

The output was:

TypeError: term(...).sub(...).gt is not a function
    at fn (eval at ruleset (/home/tuongmtt/Source/rule-engine/libjs/durable.js:1710:21), <anonymous>:11:119)
    at eval (eval at ruleset (/home/tuongmtt/Source/rule-engine/libjs/durable.js:1710:21), <anonymous>:23:12)
    at Object.ruleset (/home/tuongmtt/Source/rule-engine/libjs/durable.js:1710:21)
    at Object.<anonymous> (/home/tuongmtt/Source/rule-engine/testjs/test_operator_length.js:23:3)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant