HTTP routing rule action subexpression builder

Use the subexpression builder to build complex rule conditions from subexpressions by using AND, OR, NOT and parenthetical grouping. The subexpression builder validates the rule when you apply the changes, and alerts you to mismatched parentheses, and unsupported logic operators.

To view this page for ODRs, click Servers > On demand routers > odr_name > HTTP on demand router properties > Routing policy HTTP rules > Specify by > Expression > Subexpression builder.

To view this page for ODR clusters, click Servers > On demand router clusters > odr_cluster > HTTP on demand router properties > Routing policy HTTP rules > Specify by > Expression > Subexpression builder.

Select operand

The expressions for HTTP routing rules are enhanced to support an expression to define the target cluster. The expression gives more functionality and flexibility in defining the target cluster. For example, the expression cluster=’TestCell/TestClusterA' directs the ODR to route calls to members of TestClusterA.

The following list includes operand choices:

  • Cluster
  • Servers
  • Modules
Operator

Depending on the operand you select, various choices of operators are displayed. The following list includes operator choices:

  • <> The less-than or greater-than operator is for use with numbers.
  • Equals (=) - The equality operator expresses a case-sensitive match.
  • Equals Ignore Case (EQUALSIGNORECASE) - The equality operator expresses a non case-sensitive match.
  • IS NULL: This operator expresses that a validation of the query shows that the requested parameter does not exist.
  • IS NOT NULL: This operator expresses that a validation of the query shows that the requested parameter exists.
  • LIKE: This operator expresses pattern matching for string operand values. The value must contain the wildcard character percent sign (%) in the position where the pattern matching starts. For example, the expression, host LIKE %blanca, matches the word blanca, or any other word that ends in blanca, while the expression host LIKE blanca% matches the word blanca or any other word that starts with blanca, and the expression, host LIKE %blanca% matches the word blanca or any word that has blanca embedded in it.
  • IN: This operator expresses an operand with multiple values in a single expression. For example, if, for an operand called port, you want to express that the port value can be any or all of the values such as 9080, 9090, 9091, the expression fragment is port IN (9080,9090,9091). How the values inside the brackets are expressed depends on the data type of port. If port is an integer, the correct syntax is the values without quote marks. If port is a string, the correct syntax is port IN (‘9080’,‘9090’,‘9091’).
Value

Depending on the operator that you choose, type in a value for the subexpression that you want to create.

Subexpression builder

Generates the subexpression as a result of the operand, operator, and values that you specified.

Append

Adds the subexpression to the new rule.




WebSphere Virtual Enterprise information center (online)

Related information
Routing policy HTTP rules
HTTP rule expression builder

http_subexpression