In order to do this, let's make some assumptions and then work through an example:
1) request_sourceSystem is a property that is coming in on the inbound request. So, when the DPHs process the request, this value will contain the value of the source system that applies to this specific request. We can use that to our advantage by directly referencing it.
2) In the VSI, we know we need to substitute a combination of fields in order to create a response value that will be placed in the <sourceLineNumber> XML. And, the value needs to be dynamic such that it contains a combination of the request_sourceSystem and the yodaOrderNumber.
In the VSI, replace the sourceLineNumber value with a property name that DevTest can construct and substitute at runtime.
<ns1:yodaOrderNumber>900216205</ns1:yodaOrderNumber>
<ns1:sourceSystem>{{=request_sourceSystem;/*MAGIC*/}}</ns1:sourceSystem>
<ns1:sourceSystemOrderNumber>default</ns1:sourceSystemOrderNumber>
<ns1:lineResponse>
<ns1:yodaLineNumber>{{... your logic here ... }}</ns1:yodaLineNumber>
<ns1:sourceLineNumber>{{=fl_generatedLineVal;}}</ns1:sourceLineNumber>
<ns1:lineStatus>PENDING PROCESSING</ns1:lineStatus>
We now have something that DevTest can replace at runtime. But, we need to populate the property with a value so DevTest can make the substitution.
Once the VSI Selection Step has executed, the lisa_vse_response contains a response.
Add a JSR-223 step after the VSI selection step (you could use Scripted Assertion but your exit logic will change slightly) In the JSR step, add some code to extract data and "build" a property. (note: code below is not tested so it may contain errors or typos)
// get the response body created in the VSI Selection Step from the lisa_vse_response object
String theBody = lisa_vse_response.get(0).getBodyAsString();
int sPos = 0;
int ePos = 0;
// find the start of the order number in the XML response
sPos = theBody.indexOf("yodaOrderNumber>");
// If you don't find an order number XML element, get out, nothing to do
if ( sPos == -1 )
return;
// find the end position of the Order Number in the XML response
ePos = theBody.indexOf( "</", sPos + 16 );
if ( ePos == -1 )
return;
// Now use the values to create the property that will be replaced at runtime
// first extract the order number from the XML response since you did not indicate
// that the order number is on the input request
String orderNum = theBody.substring( sPos + 16, ePos);
// create a source line number by combining the incoming source system with the order number
String sourceLineNumber = testExec.getStateString("request_sourceSystem", "GLB") + "." + orderNum;
// place the concatenated value into the property that is defined in the VSI's XML response
testExec.setStateValue("fl_generatedLineVal", sourceLineNumber );
// when the responder step fires, DevTest will substitute the properties with values so no
// need to put the value in the actual response payload and set it back into lisa_vse_response
Notes: The logic above only finds the first yodaOrderNumber. If your payload has more than one yodaOrderNumber AND you need to increment the source line number in the response XML for each occurrence of <lineResponse>, you will need more code.