Jess Information

Jess Home
Jess 7 Features
Download Now!
Online Demo

Documentation
FAQ
Manual
Mailing List
Jess Wiki

More information Related Web Sites
User Contributions
JSR94 Info
Developer's Log
About This Site

JESS ®, the Rule Engine for the JavaTM Platform

Jess Wiki: User Function Examples

Here are some user functions that I've found extremely useful. The first few are very simple, but the last few can be extremely useful.

NewlineUserFunction Returns the newline character(s) for the current platform.
TabUserFunction Returns the tab character.
StrFormatUserFunction Formats a string using Java 5.0's String formatter.
StrReplaceAllUserFunction Replaces each substring of a string that matches the given regular expression with the given replacement.
JessTypeUserFunction Returns a symbol denoting the Jess data type of the argument.
SortUserFunction Sort a list of items using some deffunction.
LoggerUserFunction Log a message using Apache's Commons Logging.
GetAllTemplateFactsUserFunction Extract all the fact objects from working memory that belong to a given deftemplate/defclass.
GetAllShadowFactObjectsUserFunction Extract all the Java POJO objects backing shadow facts belonging to a given defclass.
CommandLoopUserFunction Enter the console-based Jess command loop.
JoinStringsUserFunction Join a list of strings separating them with a delimiter.
SpliceListUserFunction Combine the functions delete$, insert$ and replace$ into a single function.
WhatIsUserFunction A function displaying information about its arguments.
LambdaCallUserFunction Call a lambda expression.
InterpolateUserFunction Within a string, replace variables by their values.
AsBeanUserFunction Generates getters and setters for all slots of a given template.
GetTemplateUserFunction Obtains the actual template name of some fact.
AfterEveryUserFunction Schedules the repeated execution of a Jess function call.
IsaPredicateUserFunction Tests whether a fact is of a certain template or subtemplate.
TypecheckUserFunction Checks whether the values in the slots of a fact are consistent with the types given in the deftemplate.
TempsByRulesUserFunction Displays rules and queries and the templates referenced in them.
RulesByTempsUserFunction Displays templates and the rules and queries where they are used.
FactInSlotUserFunction Sets up a rule checking that the value of a given slot is a fact of some template.
FactOnFiring Relate a rule to a deftemplate so that a fact of the latter is asserted whenever the rule fires.
NoClassSlotUserFunction Instruct the Rete Engine to skip "class" when deriving a template from a Java class.
RunQueryDollarUserFunction For queries returning facts of a single deftemplate: Simplifies the access to the results.
BindEnumUserFunction Returns a list of all enum constants of some enum type and binds them to Jess variables.


Front Page | Sandbox | Recent Changes | Powered by Friki | Last Edited: 02 April 2008