Requirement: Request should be routed to live service in case of Unknown Request.
Solution:
This can be one of the approach you can take to fulfill the above requirement.
Virtual Service Image
Assuming it's a HTTP based model, in the VSI go to the Service Image tab and define HTTP-Response-Code in Meta Data section of “Response for Unknown Conversational/Stateless Request” with a value of 404 (standard http response code that is used to indicate that the server could not find what was requested).
During service image lookup if there is no match found then VSE would return the response which is defined in the “Response for Unknown Conversational/Stateless Request”
Virtual Service Model
In the VS Routing step which should be present in the model after the protocol listen step you can either add a script or a subprocess to define the condition based on which execution mode should be decided during run time.
Pseudo code
if (Response-Code == 404) {
return ExecutionMode.LIVE
} else {
return ExecutionMode.EFFICIENT
}
Runtime
The Virtual Service execution mode should be set to Dynamic. When the model is running in this mode it determines the real mode at runtime based on the condition specified for each incoming request.