cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver Determination conditions

Former Member
0 Kudos

Hi

In receiver determinaiton , need to determine the receiver based on the input payload. Sender Service has to send the file to 4 different receivers and each receiver has to be determined based on the field values in the payload. But, geting error when implementing the conditions.

my source structure is

src_file1_data

file1

Header

field1

field2

Body

field3

field4

need to determine on fields Header/field1 and Body/field3

if

field1 = (01 or 02 or 03) and (field3 = ABC) --> Receiver1

field1 = (01 or 02 or 03) and (field3 = XYZ) --> Receiver2

field1 = 01 and field3 = ABC -


> Receiver3

field1 = 01and field3 = XYZ -


> Receiver4

Tried with OR ,AND conitions in receiver determination but not getting the desired output

Pls help

Thanks in advance

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

my conditions are specified below

if

field1 = (01 or 02 or 03) and (field3 = ABC) --> Receiver1

field1 = (01 or 02 or 03) and (field3 = XYZ) --> Receiver2

field1 = 04 and field3 = ABC -


> Receiver3

field1 = 04 and field3 = XYZ -


> Receiver4

tried various ways giving the AND and OR conditions ,but of no use

pls help

lnirmala
Participant
0 Kudos

Hi Sindhu,

I have tried with whatever conditions you have given in Receiver determination and it is working fine for me.

In SXMB_MONI what is getting displayed for your scenario?Is there any error in any pipeline?In Receiver identification pipeline is your business service getting identified or is it throwing error in that pipeline step?

Rgds,

Lekshmi.

Former Member
0 Kudos

Hi

I am getting error in the Receiver Determination Step , unable to determine the receiver

Pls let me know the sequence of conditions in RD condition editor,i too tried with OR ,AND but not getting the output

after giving OR conditions,when i try to specify AND , the condition is being added with the last OR

Edited by: Sindhu M on Jan 6, 2010 6:59 AM

former_member200962
Active Contributor
0 Kudos

Can you specify how exactly your condition looks like......may be you can upload the screenshot of the condition editor at some commonly accessible website so that someone can help you.....the way the condition is specified seems to be incorrect.

lnirmala
Participant
0 Kudos

Hi Sindhu,

Ok.

So check your condition once again in Receiver determination.

In the condition editor have you used an XPath object or context object?

Is it anything similar to this ???

(/p1:Trial1_MT/file1/Header/field1 = 01) OR (/p1:Trial1_MT/file1/Header/field1 = 02) OR (/p1:Trial1_MT/file1/Header/field1 = 03 AND /p1:Trial1_MT/file1/Header/Body/field3 = ABC)

Rgds,

Lekshmi.

Former Member
0 Kudos

Hi Lekshmi

I am using Xpath

and yes ,the last OR condition is being combined with AND condition, but what i want is the AND condition should be separate

and i didnt use prefix p1

Thanks

lnirmala
Participant
0 Kudos

Hi Sindhu,

When XPath expression is being used it should contain the prefix /p1: followed by the message type and xpath.

Please try with what has been proposed by Abhishek.

It will work for you and make sure that all the operators are in lower case.

Rgds,

Lekshmi.

Former Member
0 Kudos

Also check the conditions your conditions mentioned for Receiver 1 and 3 satisfies for the same...

i.e if receiver 3 is satisfied then receiver 1 also gets called.....

so justcheck whether conditions is as per requirement or not...try giving one by one conditions and test instead of providing all conditions at a shot and testing...will know which exactly causing the error...

HTH

Rajesh

former_member200962
Active Contributor
0 Kudos

May be the condition is not maintained properly.....you either have to maintain each condition separately like field1 = 01 or field1 = 02 and so on...each condition will be on a separate row of the condition editor with the appropriate operator AND/ OR.

Alternately you can write the entire condition for Receiver1 in the single line as shown in this blog:

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination (a better approach)

Just take care that you maintain the brackets properly (and have the required bracket at the appropriate place)...also note that the operators and/ or need to be in lower case.

Regards,

Abhishek.

Former Member
0 Kudos

my source stucture is defined below

src_file1_data

-


file1

-


Header

-


field1

-


field2

-


Body

-


field3

-


field4

Edited by: Sindhu M on Jan 6, 2010 4:00 AM

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

The conditios you defined looks correct,better to check the test data ,check with one condition if it works then add multiple conditions.

Regards,

Raj

former_member200962
Active Contributor
0 Kudos

For Receiver 1:

/p1:src_file1_data/file1/Header[(field1 = "01" or field1 = "02" or field1 = "03") and (Body/field3 = "ABC")]

For Receiver 2:

/p1:src_file1_data/file1/Header[(field1 = "01" or field1 = "02" or field1 = "03") and (Body/field3 = "XYZ")]

For Receiver 3:

/p1:src_file1_data/file1/Header[(field1 = "01") and (Body/field3 = "ABC")]

For Receiver 4:

/p1:src_file1_data/file1/Header[(field1 = "01") and (Body/field3 = "XYZ")]

The above will be your Left operands....Middle operand will be EX.....i am assuming that Body is under Header node.

When source has values field1 = 01 and field3 = ABC, both Receiver1 and Receiver3 will be called.

When source has values field1 = 01 and field3 = XYZ, both Receiver2 and Receiver4 will be called.

Regards,

Abhishek.