Comments (4)
Hi, thanks a lot for reporting the issue. The null logical operator support had not been implemented. I just did, defining null as a value, which property is to be different from any other value. I have uploaded a new durable_rules version to npm, gem and pypi.
from rules.
Good deal, however, the problem persists. The problem is not that null can not be matched, but rather an error condition occurs (silently) when one of the properties of a fact is null; in the example above tokenVal is superfluous to the rule M.token.ex()
but if it exists then the fact is not matched. I don't have better debugging info as there is no error message or stacktrace.
from rules.
Thanks for clarifying. I misunderstood the scenario. I found a bug in the code for context assert and post, as an object with a 'null' property value was not being copied correctly. I have pushed the fix and published a new build. The following code works for me now:
const durable = require('../libjs/durable');
let M = durable.m, S = durable.s, C = durable.c;
durable.ruleset('a0', {
whenAll: [M.token.ex()],
run: function(c) {
console.log(JSON.stringify(c.m));
c.post({id: 2, token: true, tokenVal:null});
}
},
function (host) {
host.assert('a0', {id: 1, sid: 1, token: true, tokenVal:20});
}
);
durable.runAll();
from rules.
Indeed this does appear to solve the problem.
from rules.
Related Issues (20)
- UnicodeDecodeError issue HOT 1
- Running Python Statechart example results in MessageNotHandledException
- MessageObservedException appears while there aren't any duplicates
- Could not create ruleset: 106
- Error installing with "pip install durable-rules" HOT 1
- Clear Ruleset & c
- Error installing with npm on Widnows HOT 1
- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) HOT 2
- ERROR: Command errored out with exit status 1 when trying to pip install scrublet HOT 3
- Getting matched groups
- pylint error when using this from durable.lang import * HOT 1
- Issue when I call startTimer
- C or C++ examples are available ?
- REST api not found HOT 2
- Issue with multiple asserted facts similarly formatted
- Repeated Could not assert timers exception
- Create Ruleset that has algebra function will not work?
- Can someone please tell me how to handle null values in durable rules. HOT 1
- Go support?
- Cumulative amount of events will trigger fraud detection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules.