Drools engine abstraction
Drools engine abstraction
- Value Params
- config
drools engine configuration
- drl
knowledge base content (rules, declarations, ...)
- kbaseName
knowledge base name (what ever you want)
- Companion
- object
Value members
Concrete methods
Manipulate the time, if a pseudo clock has been configured. This method is very important for unit test purposes.
Manipulate the time, if a pseudo clock has been configured. This method is very important for unit test purposes.
- Value Params
- duration
how much time shall will go in future
- timeUnit
the time unit, default is seconds
Makes the drools engine fire all activable rules, it will stop once no more rules are activable
Makes the drools engine fire all activable rules, it will stop once no more rules are activable
- Returns
number of rule fired
Convenient method to quickly get the first available instance of the given type
Convenient method to quickly get the first available instance of the given type
- Returns
object option
Convenient method to quickly get the first available json instance of the given type
Convenient method to quickly get the first available json instance of the given type
- Returns
json string option
Convenient method to extract a field value from the first found instance of the given type Of course, really convenient if only have just one instance of the given type
Convenient method to extract a field value from the first found instance of the given type Of course, really convenient if only have just one instance of the given type
- Returns
value
Retrieve a field value from a drools facts previously extracted from the working memory
Retrieve a field value from a drools facts previously extracted from the working memory
Get all facts which have the given type or inheritate from it
Get all facts which have the given type or inheritate from it
- Value Params
- declaredType
the full type information of the facts we want to extract
- Returns
objects iterable
Get all facts which have the given type or inheritate from it
Get all facts which have the given type or inheritate from it
- Value Params
- declaredType
the full type information of the facts we want to extract
- Returns
json strings iterable
Retreive all available fact from drools working memory
Retreive all available fact from drools working memory
- Returns
objects iterable
Retreive as json all available fact from drools working memory
Retreive as json all available fact from drools working memory
- Returns
json strings iterable
insert a raw object into drools, it can be anything
insert a raw object into drools, it can be anything
Insert a fact described in json, the given typeInfo will be use to find the right declaration
Insert a fact described in json, the given typeInfo will be use to find the right declaration
- Value Params
- json
the fact to insert
- typeInfo
the type of the object we will create
- Returns
internal drools fact handle
A convenient method to quickly extract all string instance from drools working memory. Using such strings is quite helpful for testing purposes.
A convenient method to quickly extract all string instance from drools working memory. Using such strings is quite helpful for testing purposes.
- Returns
working memory String instances
Inherited methods
- Inherited from
- RuntimeDrools
- Inherited from
- RuntimeDrools