forked from fake-soul/prome-graphna-newRelic-rules-nodehjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
27 lines (20 loc) · 687 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var nools = require('nools');
// var filePath = __dirname + '/rules/helloworld.nools';
// console.log(filePath);
// var flow = nools.compile(filePath);
// console.log('level 1');
// var session = flow.getSession();
// console.log('level 2');
// var Output = flow.getDefined('output');
// console.log('level 3');
// session.assert(new Output("six"));
// console.log('level 4');
// session.match();
//
// console.log('Rule excuted @ '+ filePath);
var flow = nools.compile(__dirname + "/rules/sorting.nools"),
session = flow.getSession();
Message = flow.getDefined("message");
session.assert(new Message("ascending", [5,235,6,73,14]));
session.match();
console.log(Message);