Use the subexpression builder to build complex rule conditions from subexpressions by using AND, OR, NOT and parenthetical grouping. The rule builder validates the rule when you apply the changes, and alerts you to mismatched parentheses, and unsupported logic operators.
To view this administrative console page, click
.To modify rules with the Subexpression builder, you must have administrator administrative privileges.
Depending on the protocol you select, different operands are displayed. The following table includes the operand names as displayed in the console, the actual operand as it will appear in the expression, the valid protocols per operand, and the description for each operand.
Operand displayed | Operand | Valid protocols | Description |
---|---|---|---|
Application name | application | IIOP | The name of the application where the EJB is contained. |
Client host | clienthost | HTTP, SOAP, IIOP | The fully-qualified client host name. This is the value of the internet protocol (IP) command host name. This operand does not support numeric operators such as >, >=, <, <=. |
Client port | clientport | IIOP | The client port name. |
Client IPV4 | clientipv4 | HTTP, SOAP | The Internet Protocol Version 4 address of the client, using the dotted quad address type: n.n.n.n |
Client IPV6 | clientipv6 | HTTP, SOAP | The Internet Protocol Version 6 128-bit address type of x:x:x:x:x:x:x:x of the client computer. |
Cookie header name | cookie$<name> | HTTP, SOAP | A cookie name. For example, the expression cookie$My_Cookie_Name='My_Cookie_Value' tests
a request to see if it contains a cookie named My_Cookie_Name with
a value of My_Cookie_Value. To test for the presence or absence
of a particular cookie, use one of the following expressions:
|
EJB module name | ejbmodule | IIOP | The module name of an EJB. |
EJB name | ejbname | IIOP | The name of an EJB. |
EJB method name | ejbmethod | IIOP | The name of a method within the EJB. |
Group IDs | gids$<name> | HTTP, SOAP | The group ID of the request sender. |
HTTP method | HTTPMethod | HTTP, SOAP | The HTTP method for the request. Possible values are POST, GET, PUT, and DELETE. |
MIME type | MIMEType | HTTP, SOAP | The MIME type of the request. |
Port | port | HTTP, SOAP, IIOP | The listening port where service is provided on the host. |
Protocol | protocol | HTTP, SOAP | The communications protocol that transmits the request. Currently supported protocols are HTTP, HTTPS, SOAP, and SOAPS |
Request header name | header$<name> | HTTP, SOAP | A header name and value. For example, the expression header$Host='localhost' tests a request to see if it contains an HTTP host header with a value of localhost. To test for presence or absence of the host header, use one of the following expressions: header$Host IS NOT NULL ,header$Host IS NULL |
Request query parameter name | queryparm$<name> | HTTP, SOAP | A query parameter name specified on the
request URL. For each request, there is a name/value pair map of query
parameters, if they exist. The on-demand router (ODR) uses the request
query parameter name as a key to search the parameter map, and if
it exists, extracts the value to evaluate the rule expression. If
the rule matches, then the specified action is taken. Otherwise, the
default action for the work class in which the expression is defined
is used. For example, the expression queryparm$timezone=EST tests
a request to see if the request contains an HTTP query parameter named timezone with
a value of EST. To test for presence or absence
of a query parameter, use one of the following commands:
|
Roles | roles$<name> | HTTP, SOAP | The role of the request sender. |
Server host | serverhost | HTTP, SOAP, IIOP | The fully-qualified host name of the server. This operand does not support numeric operators such as >, >=, <, <=. |
Server IPV4 | serveripv4 | HTTP, SOAP | The IP address of the server machine using the IPv4 dotted quad address type n.n.n.n. |
Server IPV6 | serveripv6 | HTTP, SOAP | The IPv6 128-bit address type of x:x:x:x:x:x:x:x following RFC 1924 of the server machine. |
Time | time | HTTP, SOAP, IIOP | The time operand has the following format:
dayOfWeek/dayOfMonth/month/year::hour:minute:second
Note: Omissions and wild cards are not supported for the time operand.
The forward slash (/) is used to separate date parameters, the double colon (::) is used to separate the date and time parameters, and the colon (:) is used to separate the time of day parameters. Note that it is the boolean result of the entire rule in which the time operand is used that determines the routing action taken. |
User ID | uid$<name> | HTTP, SOAP | The user ID of the request sender. |
Virtual portal | virtualportal | HTTP, SOAP | The virtual portal is the request URL minus the context root for the WebSphere® Portal application's web module. If a given request matches the virtual portal defined, then the routing action defined for that rule is taken. |
XPath expression | xpathexpr | SOAP | The XPath string expression has a required field used to contain the XPath expression and an optional field for defining local namespace(s). If all the name spaces contained in the XPath expression are standard, then the second field can be optional. If there are multiple local namespaces, then separate each with a comma (,). The following is an example of an xpathexpr with one local namespace definition: xpathexpr$/soap:Envelope/soap:Body/m:getTimeZone/n:clientId$m\\=http://test.classify.ws.ibm.com,n\\=http://test2.classify.ws.ibm.com = \\'1000\\' or operation IS NOT NULL |
Depending on the operator that you choose, type in a value for the subexpression that you want to create.
Generate the subexpression as a result of the operand, operator, and values that you specified.
Copy and paste this subexpression into your rule.