LibraryLink ToToggle FramesPrintFeedback

Languages for Expressions and Predicates

In the definition of a route, it is frequently necessary to evaluate expressions and predicates. For example, if a route includes a filter processor, you need to evaluate a predicate to determine whether or not a message is to be allowed through the filter. To facilitate the evaluation of expressions and predicates, FUSE Mediation Router supports multiple language plug-ins, which can be accessed through XML elements.

Table 3.1 lists the elements that you can insert whenever the context demands an expression or a predicate. The content of the element must be a script written in the relevant language. At runtime, the return value of the script is read by the parent element.

Table 3.1. Elements for Expression and Predicate Languages

ElementLanguageDescription
simple N/AA simple expression language, native to FUSE Mediation Router (see Simple).
xpath XPathThe XPath language, which is used to select element, attribute, and text nodes from XML documents (see http://www.w3schools.com/xpath/default.asp). The XPath expression is applied to the current message.
xquery XQueryThe XQuery language, which is an extension of XPath (see http://www.w3schools.com/xquery/default.asp). The XQuery expression is applied to the current message.
sql JoSQLThe JoSQL language, which is a language for extracting and manipulating data from collections of Java objects, using a SQL-like syntax (see http://josql.sourceforge.net/).
ognl OGNLThe OGNL (Object Graph Navigation Language) language (see http://www.ognl.org/).
el ELThe Unified Expression Language (EL), originally developed as part of the JSP standard (see http://juel.sourceforge.net/).
groovy GroovyThe Groovy scripting language (see http://groovy.codehaus.org/).
javaScript JavaScriptThe JavaScript scripting language (see http://developer.mozilla.org/en/docs/JavaScript), also known as ECMAScript (see http://www.ecmascript.org/).
php PHPThe PHP scripting language (see http://www.php.net/).
python PythonThe Python scripting language (see http://www.python.org/).
ruby RubyThe Ruby scripting language (see http://www.ruby-lang.org/).
bean BeanNot really a language. The bean element is actually a mechanism for integrating with Java beans. You use the bean element to obtain an expression or predicate by invoking a method on a Java bean.