With any rule-based technology, rule-based processing involves three basic areas: the vocabulary that forms the language, the grammar for expressing the vocabulary in statements, and the rule-processing engine.
Vocabulary consists of the operators, variable keywords known as operands, and control flow statements. The language is the Java Message Service (JMS 1.1), and the Message Selector Syntax. The message selector is a string whose syntax is based on a subset of the SQL92 conditional expression. The general statement syntax is:
operand operator literalExpression [| compoundOperator expression] .
In the following example,
serverhost like '%ibm.com' or clienthost = 'myhost.raleigh.ibm.com'
serverhost and clienthost are operands, like and = are operators, or is the compound operator, and '%ibm.com' and 'myhost.raleigh.ibm.com' are the literalExpression. The [] indicates that the expression enclosed within is optional, and the | indicates that after the operator, a literalExpression or a compound operator can be followed by more expressions.
A complete statement consists of the rule expression, and the action to be taken is represented differently depending on the input source. In the administrative console, the actions are separated into forms and fields that are easily selectable. If you are using scripting, the complete statement might look as follows:
expression<delimeter>action
For example, clienthost='localhost' and serverhost like
'%.ibm.com'?permit?DefaultApplication.ear
From an implementation viewpoint, work classes, which are XML documents, are used to capture the rules expression, matched actions, and other implementation artifacts. Therefore, a work class is an XML document that contains zero or more matchRules elements, and one or more workClassModules elements.
Intelligent Management supports the operators in the rules expressions. In general, you might not know the true data type of a given operand. If you use the Hypertext Transfer Protocol (HTTP), every operand is treated as a data type string and use the operator as an indicator for the real data type of the operand for data validation purposes. An example of an operator which tests for an operand that has a null value is: IS NULL.
An example of an operand for HTTP requests is: MIMEType.