I have 2 test steps. (note that inbetween these two, there are many transactions triggered) . The attachment has detailed steps. It has STEP1 and STEP2.
STEP1: Request1 when triggered must write the account numbers to already existing file. then to give back Response1
STEP2: Request1 to filter the response from file and get only filtered data back, to get Response1.
We cannot transfer any property from STEP1 to STEP2, as there are many transactions in between. I guess we need to work on Request/Response dispatcher only . Please help.
Initial file will be fixed. In STEP1 account numbers to be written to that file will be dynamic which is BillingAccountNumber. Later in STEP2, same Request to get filtered Response back with the account numbers.
The accurate information in the question will have better results.
Just one thing it is noticed that both requests are different, i.e., represent different operations.
It would be better if you can show mapping between each request and respone i.e., which value of the request (put place holder) goes to which value of the response (put place holder). Do the same for both requests and responses.
Hi Rao, Yes, I have updated modified file with my comments. I have named STEP1.REQUEST, STEP1.RESPONSE, STEP2.REQUEST and STEP2.RESPONSE for simplification in file. I have mentioned which values I need / will be set from STEP1.REQUEST to STEP2.RESPONSE. Just to ensure that the account numbers (dynamic values) must be written to file so that we have other transactions which can use them.
One more thing is if you send 5 accounts data as part of STEP1.REQUEST, then you might be expecting 5 records in STEP2.RESPONSE and if that changes, it should reflect the same in response, right? So, it should be very generic.
So, I am wondering, are you doing just mocking or real application development?
Also, what if some one requests for x in STEP1.REQUEST and send Y in STEP2.REQUEST -- then your idea of updating the response of 2 will not work.
You mentioned that jdbc to be queried, that would be more appropriate to use within the script dispatchers of both the operations.
STEP1.REQUEST - in mock script - read the data from request, persist into database.
STEP2.REQUEST -- in mock script -- read the request data, query for required data from database and update the response.
This both of the requests do not have to be sequential as well.
Only thing is fixed response file may not work well here in this case(applicable for both the operations).
In earlier posts, pointed some links, "how to use jdbc connection, have you tried any"?
Which database are you using here?
1) Yes, STEP1.RESPONSE can be fixed for any request.
2) Since I am using file, For second time, I use different initial file so that different account numbers which can be used again.
When I use 5 values in STEP1.REQUEST, I agree same should populate in STEP2.RESPONSE. But only 3 values I mentioned will be used back when we filter. So only 3 Values are enough.
I am only mocking here, not any dev work.
Since only X is set in global property, one and Only X cn be used in both Request.
I wanted to avoid jdbc here, as account numbers we get dynamically. Also I have updated the attached file again by adding STEP0.REQUEST and STEP0.RESPONSE.
FYI, we invoke STEP0.REQUEST and STEP2.REQUEST with same URL (same Operation). So I wanted to take the response from file and set account numbers back to file and then use again after filtering. Here is the summary of my flow again and remember that all 3 steps are not sequential.
1)Invoke STEP0.REQUEST with mode as SUBMITTEDORCORRECTED value along with ContractSolutionNumber set globally (ex SOL1234)
2) I need to get STEP0.RESPONSE present in file names SOL1234.xml
3) Above steps then invokes many transactions and we get account numbers that are invoked by STEP1.REQUEST. This request also has SOL1234 value
4)Get a fixed STEP1.RESPONSE back, so that our code assume it success and invokes further transactions.
5)Invoke STEP2.REQUEST with mode as LITE value along with globally set ContractSolutionNumber value with same URL of STEP0.REQUEST
6)Get Filtered STEP2.RESPONSE so that our code can use the same.
Note: I am also fine if its easy with 2 fixed responses. Say X.xml and Y.xml , where X and Y are set globally. X.xml is the initial file and after creating accounts write to Y.xml which can be used later.