Designer 10.11 | Cloudstreams Development Help | CloudStreams Governance Project | Virtual Services (REST) | Routing Rule Step (Content-Based Routing, REST Virtual Service)
 
Routing Rule Step (Content-Based Routing, REST Virtual Service)
If you have a native service that is hosted at two or more endpoints, you can use the Context-Based routing protocol to route specific types of messages to specific endpoints based on specific values that appear in the request message.
You might use this capability, for example, to determine which operation the consuming application has requested, and route requests for complex operations to an endpoint on a fast machine.
The requests are routed according to the content-based routing rules you create.
To configure the Routing Rule step for Content-Based routing:
1. Click the virtual service name in the CloudStreams Governance view.
2. Expand the In Sequence step in the editor.
3. Click Routing Rule and complete the following fields in the Properties view.
Name
You can optionally change the step name from Routing Rule to any other name. There are no naming convention restrictions.
Type
(Read-only field.) Routing Rule.
Protocol
(Read-only field.) HTTP.
Routing Type
Select Content-Based.
Rule Name
Assign a name to the rule.
XPath
The XPath field is applicable only while creating SOAP Virtual Services.
Route To
Specify where to route the request if the rule criteria are met. Specify either the URL of the native service or a connection pool name.
Then, click the icon next to this field and complete the Configure Endpoint Properties dialog box as follows:
*HTTP Properties
*Connection Timeout: The time interval (in seconds) after which a connection attempt will timeout. If a value is not specified (or if the value 0 is specified), CloudStreams will use the default value specified in Integration Server.
*Read Timeout: The time interval (in seconds) after which a socket read attempt will timeout. If a value is not specified (or if the value 0 is specified), the default is 30 seconds.
*SSL Options: To enable SSL client authentication for the endpoint, you must specify values for both the Client Certificate Alias field and the IS Keystore Alias field. If you specify a value for only one of these fields, a deployment error will occur.
Note:
SSL client authentication is optional; you may leave both fields blank.
*Client Certificate Alias: The client's private key to be used for performing SSL client authentication.
*IS Keystore Alias: The keystore alias of the instance of Integration Server on which CloudStreams is running. This value (along with the value of Client Certificate Alias) will be used for performing SSL client authentication.
HTTP Method
The HTTP method to pass to the rule.
Default To
A native service endpoint to route the request to in case all routing rules evaluate to False.
Then, click the icon next to this field and complete the Configure Endpoint Properties dialog box, as described for the Route To field above.
HTTP Method
The HTTP method to pass to the native service.
Typically you want to pass each request to the native service with the same HTTP method that is contained in the request. For example, if a request contains a GET method, you allow the GET method to be passed to the native service. In this case, select the value CUSTOM. CUSTOM is a context variable that contains the HTTP method that is contained in the request.
However, in other cases you might want to change the HTTP method of a request to a different HTTP method. In this case, you can specify the different method explicitly (by selecting the GET, POST, PUT or DELETE value), or you can specify the different method dynamically on a per-request basis. If you want to specify the method dynamically, select the CUSTOM option and then write an IS service to set the value of the context variable. For more information, see the section Changing the HTTP Method of a REST Virtual Service in the document Administering webMethods CloudStreams.
Use credentials from incoming request
Default. Authenticates requests based on the credentials specified in the HTTP header. CloudStreams passes the Authorization header present in the original client request to the native service.
Use specific credentials
Authenticates requests according to the values you specify in the User, Password and Domain fields.
Invoke service anonymously
Does not authenticate requests.
Use existing HTTP headers
Use the HTTP headers that are contained in the requests.
Customize HTTP headers
Use the HTTP headers that you specify in the Name and Value columns on the tab. If you need to specify multiple headers, use the plus button to add rows.
Related Topics
New Virtual Service Wizard (REST)
REST Resources Wizard
General Properties (REST Virtual Service)
Advanced Properties View (REST Virtual Service)
Entry Step (REST Virtual Service)
Transform Step (REST Virtual Service)
Invoke IS Service Step (Inbound, REST Virtual Service)
Routing Rule Step (Straight Through Routing, REST Virtual Service)
Routing Rule Step (Context-Based Routing, REST Virtual Service)
Routing Rule Step (Load Balancing Routing, REST Virtual Service)
Transform Step (Outbound, REST Virtual Service)
Invoke IS Service Step (Outbound, REST Virtual Service)
Error Messaging Step (REST Virtual Service)