Element |
Tag |
Super |
Flags |
nools
|
nools |
|
|
Description
The root tag of the nools schema.
A nools IttfDocument defines one Flow.
A Flow is a container of Rule(s).
In a Flow you declare Fact types and Rule(s).
Instances of Flow(s) are called Session(s).
In a Session instances of Facts are matched against Rule(s).
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
global |
globals |
one-to-many |
|
|
|
fact |
facts |
one-to-many |
|
|
|
rule |
rules |
one-to-many |
|
|
|
agendaGroup |
agendaGroups |
one-to-many |
|
|
|
function |
functions |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
global
|
global |
|
|
Description
Globals are accessible through the current working scope of rule facts in a dsl,
very similar to using the scope option when compiling.
Note: globals are not part of the working memory and therefore are not accessible
in the LHS (when) of your rule.
Element |
Tag |
Super |
Flags |
fact
|
def |
|
|
Description
Declares a Fact type.
A Fact type must be a String or a javascript Function.
dsl > define 'type-name' {
In a Session (an istance of a Flow) instances of Fact(s) can be:
. asserted
. retracted
. modified
. retrivied (all or by Type)
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
property |
properties |
one-to-many |
|
|
|
ctor |
|
one-to-one |
|
is-one-to-one |
|
function |
functions |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
ctor
|
ctor |
|
|
Description
Fact type constructor
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
param |
params |
one-to-many |
|
|
|
codeline |
codelines |
one-to-many |
|
|
|
Methods
Signature |
Statements |
getParams
|
var ret = [];
foreach item in this.params;
return ret;
|
Element |
Tag |
Super |
Flags |
property
|
@ |
|
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
function |
functions |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
agendaGroup
|
group |
|
|
Description
Agenda groups allow for logical groups of rules within a flow.
Rule(s) that do not have an agenda-group specified are placed into
the main agenda-group.
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
rule |
rules |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
rule
|
rule |
|
|
Description
A Rule
. applyies to a Fact type
. has one or many Constraint(s)
. describe an Action that is execute when the Fact instance
matches the Constraint(s)
Attributes
Name |
Tag |
Type |
Default |
Inherited |
Flags |
Description |
agendaGroup |
agenda-group |
string |
|
|
|
|
autoFocus |
auto-focus |
string |
|
|
|
|
salience |
salience |
integer |
|
|
|
Salience is an option that can be specified on a rule
giving it a priority and allowing the developer some control
over conflict resolution of activations.
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
option |
options |
one-to-many |
|
|
|
constraint |
constraints |
one-to-many |
|
|
|
action |
actions |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
option
|
opt |
|
|
Element |
Tag |
Super |
Flags |
constraint
|
constraint |
|
is-abstract |
Description
Constraints define how a Rule should match Fact instances.
A rule should have an array of at least one or many constraints.
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
when
|
when |
constraint |
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
xfor
|
for |
constraint |
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
and
|
and |
constraint |
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
or
|
or |
constraint |
|
Description
The or constraint can be used to check for the existence of multiple facts.
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
not
|
not |
constraint |
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
is
|
is |
constraint |
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
set
|
set |
constraint |
|
Description
example
ittf: set name = value
dsl : { name: value}
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
exists
|
exists |
constraint |
|
Description
exists is the logical inversion of a not constraint.
It checks for the existence of a fact in memory.
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
from
|
from |
constraint |
|
Description
The from modifier allows for the checking of facts that are not necessarily in the workingMemory.
The from modifier can be used to access properties on a fact in workingMemory or you can use javascript expressions.
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
constraint |
constraints |
one-to-many |
constraint |
|
|
Element |
Tag |
Super |
Flags |
action
|
then |
|
|
Description
Defines the code of the Action of a Rule.
An Action is a function that should be fired when all constraints in the rule match.
The tag 'then' is for readability of the nools dsl source.
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
codeline |
codelines |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
xfunction
|
function |
|
|
Description
You may define Function(s) that can be used (are in scope)
inside a Rule.
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
param |
params |
one-to-many |
|
|
|
codeline |
codelines |
one-to-many |
|
|
|
Methods
Signature |
Statements |
getParams
|
var ret = [];
foreach item in this.params;
return ret;
|
Element |
Tag |
Super |
Flags |
param
|
param |
|
|
Description
The parameter of a Function
Element |
Tag |
Super |
Flags |
codeline
|
+ |
|
|
Element |
Tag |
Super |
Flags |
conflictResolution
|
conflict-resolution |
|
|
Relations
Name |
Role |
Cardinality |
Inherited |
Flags |
Description |
resolutionStrategy |
resolutionStrategies |
one-to-many |
|
|
|
Element |
Tag |
Super |
Flags |
resolutionStrategy
|
strategy |
|
|