on 10-09-2007 12:35 PM
hi friends,
i want to put a user defined function for sending the data into multiple receivers.. in that function i need to write the simple coding like.. if the source data is not null then moves data into all the receivers..
for example see my coding..
-
int i;
for(i=0; i<a.length;i++)
{
if( !a.equals(" ") )
{
result.addValue("RECEIVER1" );
result.addValue("RECEIVER2" );
result.addValue("RECEIVER3" );
}
}
-
but this is not working fine.. because.. data will moves into one receiver only only.. SO, PLZ CORRECT THIS.. AND SEND ME THE EXACT CODING..
THANKS
BABU>
Hi Babu,
Why can't you use receiver determination in the integration directory ? This is what it is for.
I cannot see why you would need to use a UDF to send a message to multiple receivers.
Please explain - I'm confused.
Cheers
Colin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Babu,
You must be using the Receivers message type if i'm correct.
In this message type, the occurence of the Receiver tag is 0--unbounded and the occurence of service is 1.
So in this case the code
result.addValue("RECEIVER1" );
result.addValue("RECEIVER2" );
result.addValue("RECEIVER3" );
won't work for service node in the output.
modify the code in this way
result.addValue("RECEIVER1" );
result.addValue(ResultList.CC);
result.addValue("RECEIVER2" );
result.addValue(ResultList.CC);
result.addValue("RECEIVER3" );
Please test your mapping first with a sample payload...
Also please give the source payload structure with occurence if you can here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
use this you have to declare the i as 0
int i=0 ;
for(i=0; i<a.length;i++)
{
if( !a.equals(" ") )
{
result.addValue("RECEIVER1" );
result.addValue("RECEIVER2" );
result.addValue("RECEIVER3" );
}
}
and if you want to the multiple receivers then you can use the configured receivers in the receiver determination.in that based on the condition you can send to different receivers..
if you still have the problem please reply me back
Thanks
Rinku
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BABU,
I guess there is no need to write any UDF, only for checking null data you can validate it mapping very easily. and once you validate it you will get the data.
Sending to many receiver can be handled in RECEIVER DETERMINATION.
If I have not understood your point, plz explain me with your requirement in detail.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Set the context of the source node to the very very first parent node of your source message.
It will work.
Regards,
AKshay.
Reward points if find useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.