cancel
Showing results for 
Search instead for 
Did you mean: 

Interface Determination not working

Former Member
0 Kudos

I have a following requirement.

I am using PI 7.11

FTP............XI............Mail

I have to pick up the File from the FTP Server and than email it to the user but the problem is that all the files have same name

I have to pick up all the files and check the file content i.e. field 22 of the file.

Example

If Field22 = XX then I have to use Mapping 1 otherwise Mapping 2.

Is there any way I can check the file before sending it to the mapping ,

I believe it is possible by putting the condition in the Interface Determination.

I have tried that but unfortunately it didn't work and I have got this error.

Error:

Inbound interface found several times (for same sender and receiver) for the outbound interface.

Can somebody please help me solving this issue.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

No Solution

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

try this in the condition Editor: substring(/root/field22, 4,5) = IN

Let Me know

PD:I dont remember i is necessary put the ' '--> 'IN'. please try both.

Rodrigo P.

Edited by: Rodrigo Alejandro Pertierra on Jul 19, 2010 12:35 PM

Former Member
0 Kudos

Hi,

Could you please tell me how can I used 2 = signs in the condition.

I am using Context Object not XPATH.

My current condition

Context Object (File Name) = contains('XXXXX_IN_')

Context Object (File Name) # contains('XXXXX_IN_')

Unfortunately these conditions are not working so I want to know is there any other way I can check the 7th & 8th char of the file and upon which I will decide the adapter.

If the file contains IN word than it will go to adapter 1 otherwise adapter 2.

Former Member
0 Kudos

Hi,

Use can use "Createif" function. The condition of the mapping should check the field value of the respective field 22. If the condition is satisfied then go for message 1 else for message2. If message 1 is created, will ignore about message 2. Try this....

former_member200962
Active Contributor
0 Kudos
If Field22 = XX then I have to use Mapping 1 otherwise Mapping 2.

Implement the decision logic in Mapping program itself.

Have two target messages....make the minimum occurence as 0 for both the target messages.

Use the IF logic and check for the value of Field22 ..... if true create Message1 with required internal logic...Message2 will be neglected in this case......so you will have only one message in the output.

Field22 -->
            --> equalS --> ifWithElse (Then --> Message1......Else Message2)
Constant(XX) -->

Assuming that you will have only one occurence of Field22 node and the target message is also the same.

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

It should work if you have defined the conditions clearly specifying the value for using the different mapping program.

Check whether you have specified the correct xpath and the value, if string give it it quotes and check.

Regards,

Nithiyanandam

Former Member
0 Kudos

Hi,

Checking the condition provided over there...it definitely works...crosscheck the xpath for the source field is correct and the condition is also correct...

check any spaces...blah..blah.. stuff..#

HTH

Rajesh

Former Member
0 Kudos

Hi Rajesh,

Could you please tell me how to put condition in Receiver Determination.

I have to pick up the file and send it to the Adapter 1 and Adapter 2 depends on the file name.

If source file contains the word IN then file will go to Adapter 1 otherwise go to Adapter 2

Context Object

FileName = contains('XXXXX_IN_X') Adapter1

FileName # contains('XXXXX_IN_X') Adapter2

Unfortunately the condition is not working because I am not sure whether it is correct or not.

Can somebody please tell me how to check the context Object.

Thanks,