Process Routing Strategy Result Assertion

The Process Routing Strategy Result assertion is used to process the results of a route and generate feedback status of the strategy. This assertion is part of the dynamic routing capabilities of the .
gateway83
The
Process Routing Strategy Result
assertion is used to process the results of a route and generate feedback status of the strategy. This assertion is part of the dynamic routing capabilities of the
API Gateway
.
Use of this assertion is optional, as some strategies do not require feedback and may ignore the Feedback List context variable set by this assertion. However, feedback may still be useful elsewhere in the policy.
 
Before you can process the result of a routing strategy, create a route first, through the Create Routing Strategy Assertion. See Working with Dynamic Routing Strategy before creating a route. The Create Routing Strategy assertion must precede Execute Routing Strategy and Process Routing Strategy Result assertions.
Using the Assertion
  1. Do one of the following:
    • To add the assertion to the Policy Development window, see Add an Assertion.
    • To change the configuration of an existing assertion, proceed to step 2 below.
  2. Right-click "
    Process Routing Strategy...
    " in the policy window and then select
    Process Routing Strategy Properties
    or double-click the assertion in the policy window. The assertion properties are displayed. 
  3. Configure the properties as follows.
    Variable
    Description
    Routing Strategy Prefix 
    Specify the context variable that is storing the chosen routing strategy.
    This should match the “Routing Strategy Prefix” entered in the Create Routing Strategy and Execute Routing Strategy assertions.
    Default:
    strategy
    Feedback List 
    Specify the context variable that will store the feedback list. This should match the “Feedback List” entered in the Execute Routing Strategy assertion. The Feedback List variable will contain feedback data, including the selected route, reason code returned, latency of the assertion, and status.
    Default:
    feedback
    Example
    : Based on the default value, you can retrieve the first feedback data with these variables:
    • ${
      feedback.1.route
      } – returns the first route on the Feedback List.
    • ${
      feedback.1.reasonCode
      } – returns the reason code sent back by the routing assertion.
    • ${
      feedback.1.latency
      } – returns the latency of the assertion.
    • ${
      feedback.1.status
      } – returns the status of the route (“-1” = fail; "0" = success).
    Based on the Feedback List variable, the Process Routing Strategy Result assertion will also populate the following context variables.
    Variable
    Direction
    Description
    ${
    <
    feedbackList
    >.
    current.reasonCode}
     
    Inbound
    Returns the reason code of the current route. This value is sent back by the routing assertion.
    This currently returns the same value as ${
    httpRouting.reasonCode
    }, which is created by the Route via HTTP(S) assertion.
    ${
    <
    feedbackList
    >.
    current.status}
    Inbound
    Returns the status of the current route as an integer.
    This variable is initially created by the Set Context Variable assertion. For more information, see Working with Dynamic Routing.
    ${
    <
    feedbackList
    >.
    current.latency}
    Inbound
    Returns the latency for routing.
    This variable is initially created by the Set Context Variable assertion. For more information, see Working with Dynamic Routing.
    ${
    <
    feedbackList
    >.
    current.route}
    Inbound
    Returns the current route in the loop that is being monitored for feedback by the Process Routing Strategy Result assertion.
    This variable is initially created by the Execute Routing Strategy assertion. This variable returns the same route as ${route}, but can be reset and overwritten if necessary.
    The variables contain feedback for the current route. This differs from using indexing on the
    ${
    <
    feedback
    >}
    multivalued context variable
    , which can access feedback information on routes other than the current route (for example, for the first feedback data based on the example shown earlier).
  4. Click [
    OK
    ] when done.