All supported DevTest releases.
N/A
There are multiple ways to do this, Please see the options described below:
Option A:
With the new 'IBM MQ Native' protocol, you can put multiple response queues into a single Respond step.
1. Create a separate queue asset for each of your response queues.
2. Add multiple response channels in your VSM 'Respond' step (or in the VSE recorder when generating your VSM). Create a separate channel for each response queue and give it a name.
3. In your VSI service image, find the 'channel.name' property in the response meta-data of each transaction and change its value to match the name of the response channel corresponding to the correct response queue.
Option B:
You can do this with a response-side scripted DPH :
if ("A0001JH3".equals(lisa_vse_request.getMetaData().getParameterValue("...field.Usario"))) {
lisa_vse_response.getMetaData().setParameterValue("channel.name", "Response 2");
} else {
lisa_vse_response.getMetaData().setParameterValue("channel.name", "Response 1");
}
Option C:
Add a Scripted Assertion,
Set the Assertion to FAIL if False.
// set the response channel 1 or 2 depending on the input arg
// use getStateString in case the argument is not parsed by the XML dph
if ( “A0001JH3”.equals( testExec.getStateString(“requestMsg_dse_formattedData_kColl_field_1_value”, “unknown”) ) {
testExec.setStateValue(“responseChannel”, “Response 1”);
} else {
testExec.setStateValue(“responseChannel”, “Response 2”);
}