![]() |
Copyright © Cloud Software Group, Inc. All Rights Reserved |
This section describes the GetLocation sample shipped with the TIBCO API Exchange Gateway product to illustrate the configuration steps required for routing. Refer to the GetLocation example in the ASG_HOME/examples directory.The GetLocation example illustrates how to use a routing key to route the facade request to a different target operation or target operation group. The routing key is derived from the telephone number specified in the address element of the request. The target operation or target operation group must be configured in the Config UI.
• If the value of the address element is specified as "tel:+498948956000", the opCoId derived using the substring function (substring($address,6,2)) from the address element is 49.The routing key is populated based on the opCoId as 49. See Configuration for the routing configuration.ASG_CONFIG_HOME/GetLocationTask A Define a Transformation FileRefer to the Sample XSLT File sample file to define a transformation file. This XSLT file shows that the routing key is derived based on the value of the address element of the request message. The address element contains a telephone number. You can edit the file, as required.ASG_CONFIG_HOME/GetLocation/xslt/operations/parse_getLocation.xsl
To upload the parse_getLocation.xsl transformation file, do the following steps:
3.
4. Click the ROUTING tab on upper left.
5. Click the Facade Operations tab.
6. Expand the getLocationBW operation.
7. Make sure that the operations/parse_getLocation.xsl file is populated in the ProcessBody Transform field. If it is not selected, select it from the drop-down list.Task C Routing ConfigurationConfigure a routing key for the getLocationBW operation to route the request to the http.getLocation target operation, as follows:
1.
2. Click the Add Property to add a new routing configuration.
Select getLocationBW from the drop-down list. Select Target Operation from the drop-down list. Enter 49 as the routing key. Select the target operation as http.getLocation from the drop-down list. The http.getLocation target operation is defined in the Target Operations tab.
The routing configuration for the GetLocation example demonstrates the getLocationBW operation. For the getLocationBW operation request, if the routing key is populated as 49 from the data content of the incoming request message, the request is routed to the http.getLocation target operation. Similarly, you can define additional routing configuration to route the request to a different target operation for a different routing key.
![]() |
Copyright © Cloud Software Group, Inc. All Rights Reserved |