Surya/Kiran,
I misunderstood the flow of your scenario but I think I get what you're trying to do now. I need to provide a different solution altogether. I will use a "global" hashmap called com.itko.lisa.vse.SharedModelMap. We can use this data structure to pass "data" between the two operations. Here's what I would do...
=============
1. Remove the Scripted Assertion from the VS Image Response Selection step, this is no longer needed based on my new understanding...
2. Remove the second response from Request_C, and make sure the second response (Response B) is the response for Request_A
2. For Request_A's match script, change it to the following code:
boolean operationsMatch = incomingRequest.getOperation().equals(sourceRequest.getOperation());
if (operationsMatch) {
long currentTime = System.currentTimeMillis();
while ((System.currentTimeMillis() - currentTime) < 60000) {
String value = com.itko.lisa.vse.SharedModelMap.get("Request_C_Triggered");
if ("true".equals(value)) {
com.itko.lisa.vse.SharedModelMap.put("Request_C_Triggered","false");
return true;
}
}
}
return false;
3. Add the following match script code to Request_C:
boolean operationsMatch = incomingRequest.getOperation().equals(sourceRequest.getOperation());
if (operationsMatch) {
com.itko.lisa.vse.SharedModelMap.put("Request_C_Triggered", "true");
return true;
}
return false;
===================
I haven't had a chance to test out this code but let me explain what I'm trying to accomplish and I think you will be able to take it from here...
In the first script I have a loop for a max of 60,000 ms or 60 sec (this is the assumed time out value for the HTTP connection, if it's higher, then simply bump up this value to that same value). Inside the loop I check if the key "Request_C_Triggered" has been set to true (from Request_C transaction/match script), if it is then I return true in this match script and I can respond with Response B, else I keep looping until I meet the time out value.
In the second script I simply put the key value pair Request_C_Triggered=true into the global map, which will be read in Request_A (granted the timeout value hasn't reached yet). It then returns true immediately and returns Response D before Response B is returned for Request_A...
Hope my understanding is correct and it works out this time