on 09-05-2006 9:13 AM
Hi All,
This is a JDBC-Proxy(scenario). Based on a particular field content say "receiver". I need to use 2 different receivers. For example, if the value is "1" I need to send the message to first receiver and if the value is "2" I need to send the message to second receiver.
Can you tell me how I need to configure my interface to achieve this. Also, is it possible to have 2 different mappings one for the first receiver and another mapping for the second receiver?
Thanks in Advance.
Regards,
Jai Shankar.
Hi Jai,
All you need to do for the same is,
Under Receiver Determination --> Configured Receivers --> Specify the 2 receivers and beside the same you have an option called condition, there you specify the condition on which it has to go to the first system and then the condition on which it has to go to the second system.
When you click on the codition it will open another window (Condition Editor window) under which you have a Left Operand which when you click will open up another window(Expression Editor window), there for your need you check on the XPath radio button and then click on the field whose value you wanna check from the structure that it displays, when you click on the field it fills in the XPath Expression, then click ok.
After that it takes you back to the previous window(Condition Editor window) with the Left Operand having the XPath Expression, so all you will have to do is to fill the Right Operand which is nothing but the value you want that field to contain.(For Example if a field "A" that you have selected which comes in the XPath Expression in ur Left Operand,has a value "1" in your Right Operand)
There you also have an option to put in an "and" or an "or" condition if required(For Example if you wanna check if "A" and "B" is satisfied or it you wanna check if "A" or "B" is satisfied, this can also be done)
If you have any doubts or clarifications on the same, please do ask and i will tell you how to proceed.
Regards,
Abhy
Message was edited by: Abhy Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shabz and Abhy,
Thanks a lot. I am working on that and will get back to you, if I face with any problems. Can you pls answer my second question, my configuration depends on your answer. <i>is it possible to have 2 different mappings one for the first receiver and another mapping for the second receiver?</i>
Thanks and Regards,
Jai Shankar.
Hi Jai,
See when we give 2 receivers, we thereby also need two interface determinations.
In your Interface Determination, we specify the Interface Mapping. So incase you have the sane Mapping for both the receivers you can specify the same Interface Mapping for both receivers else if you want different mappings for different Receivers,you can give different Interface Mappings for each of the receivers...
Regards,
Abhy
Hi All,
I have configured the interface mapping and message mapping, but I am having some problem with xpath, I have added 2 receivers in the configured receivers column. Also I could go to the expression editor and selected my colum and in the right hand opernad I have given the expected value.
Every thing is fine. But how do I specify, if the condition fails choose second receiver and choose first if the condition is true.
Thanks & Regards,
Jai Shankar.
Jai,
<i>But how do I specify, if the condition fails choose second receiver and choose first if the condition is true.</i>
The 2 conditions will be independent of each other. In the sense, the receivers are choosen whenever the condition becomes true.
The simple way to do this would be to specify the valid condition for one of the receivers and for the other receiver give the opppsite of the previous condition. So, at any given time only one recever would be choosen.
http://www.w3schools.com/xpath/xpath_operators.asp
Regards,
Bhavesh
Hi Jai,
You can do one thing,
for the first receiver you have specified the codition right... Now ur doubt is if the condition fails, how to check if the condition as failed...
Let's assume that u are checking a field "A" for value "1",now for the first receiver you have checked for A EQUAL 1 right...?
For second receiver check for the condition A NOTEQUAL 1, so this indirectly checks if you first condition has failed.
<b>The mistake ur doing to add a receiver (in Receiver Determination) is, ur clicking on the "+" symbol... Dont do that there is a symbol like "[]"(add new condition), use that and you can give 2 conditions, one for each receiver.This will solve your problem :-)</b>
Regards,
Abhy
Message was edited by: Abhy Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
Those sud help you ... in case of any clarification do get back
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.