cancel
Showing results for 
Search instead for 
Did you mean: 

Operation Mapping/Interface Determination - PI Problem

Former Member
0 Kudos

Hello PI Experts,

I have a scenario

Source

Target


Service Interface Rx Pos Trg A


Create Purchase Order Target A
Service Interface Batched Pos
Update Purchase Order Target A
Send Batched POs
Service Interface Rx Pos Trg B


Create Purchase Order Target B


Update Purchase Order Target B



The sender application is creating a batch of Create/Update Purchase Orders for two vendors A and B. This is an xml file, the structure of Create and Update messages is different and both of them have a field Vendor to identify which vendor should be sent a particular message.

The PI interface needs to debatch the complete file, and send out individual messages to the vendors (A and B) based on the Vendor flag in the incoming message.

I have created a single outbound interface and two inbound interfaces. The operations are mentioned in the table above.

What is the most optimum way to solve this problem? The interface should be flexible enough so that one more vendor (e.g Vendor C) with nominal effort.

So far

In ESR : single message mapping (Source to Create/Update vendor A/B) to generate 4 different messages

In ID : three Business components (Source, Vendor A and Vendor B), three communication channels (source, Vendor A and Vendor B), 1 Sender Agreement, 1 interface determination, 1 receiver determination and 2 receiver agreements.

I have created all the above components and configured them. But the configuration is failing because of one or other issue.

Can someone point out, what am I doing wrong?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks Dave and Muniyappan,

I am able to solve my problem. Below are the activities that were required.

ESR

2 message mapping

message mapping (Src Msg to Vendor A (Create and Update) in the same map, 1: N multimapping)

message mapping (Src Msg to Vendor B (Create and Update) in the same map, 1:N multimapping)

2 operation mapping

operation mapping (Outbound Interface to Inbound Interface Vendor A)

operation mapping (Outbound interface to Inbound Interface Vendor B)

ID

3 communication components (Src, Vendor A and Vendor B)

3 communication channels (Src, Vendor A and Vendor B)

1 sender agreement

1 receiver determination with 4 conditions

  • Create PO + Vendor A ---- communication component A
  • Update PO + Vendor A ---- communication component A
  • Create PO + Vendor B ---- communication component B
  • Update PO + Vendor B ---- communication component B

2 interface determinations

  • src comm comp + src interface and vendor A comm component. This refers to the first operation mapping
  • src comm comp + src interface and vendor B comm component. This refers to the second operation mapping

2 receiver agreements one for each vendor.

For adding a third vendor, for example vendor C, the following components are needed

ESR

1 message mapping (Src Message to Create/Update Message)

1 operation mapping for the above message mapping

ID

1 communication component

1 communication channel

existing sender agreement

modified receiver determination (add 2 conditions for the new vendor create/update messages)

1 interface determination, similar to existing interface determinations

1 new receiver agreements.

Thank you everyone for your answers and pointers.

Answers (7)

Answers (7)

Former Member
0 Kudos

I will tell you how I would handle this scenario.

1) Assuming the create and update for each vendor is different, I would create four (4) mappings, and thus four (4) operation mappings.

2) One (1) Receiver Determination, assuming from the incoming message you can determine the vendor and the type.

3) Four (4) Interface Determinations, pointing to each operation mapping.

4) Four (4) Receiver Agreements.

Then in the future, when you have to add an additonal vendor, you will.

1) Create two Mappings and Operational Mappings.

2) Extend the Receiver Determination

3) Create two (2) Interface Determinations

4) Create two (2) Receiver Agreements.

Former Member
0 Kudos

Hi Dave,

This is what I did

ESR

Created 4 different message mappings (Source Message to Create PO Vendor A/Source Message to Create PO Vendor B/Source Message to Update PO Vendor A/Source Message to Update PO Vendor B).
Created 4 different operation mappings one for each message mapping above.

ID

Created 3 business components (Source/Vendor A/Vendor B)

Created 3 communication channels (Source/Vendor A/Vendor B)

Created 1 receiver determination, since it takes the Communication component/Service Interface name. Applied the conditions in configured receiver sections. I dont think we can create another receiver determination.

Created 2 interface determinations, since I can create only one for each target, it takes a combination of (source business component + interface) and (receiver communication component). Gave the conditions based on the message type in the receiver interfaces section.

Created 2 receiver agreements, since I can create only one for each target, it takes a combination of sender communication component and (receiver communicaiton component/interface/receiver).

I am getting an error "Error when determining the inbound interface: Inbound interface found several times (for same sender and receiver) for the outbound interface".

The source message contains both types of messages (Create and Update) for both vendors (A and B).

Muniyappan
Active Contributor
0 Kudos

Hi,

you should have created four inbound services interfaces in the ESR correct?

and you have used those four interfaces in the four operation mapping.

in the receiver agreement you have to create four as you are having 4 interfaces. in each receiver agreement you will be mentioning service interface and communication channel(4 cc, 1 cc for each receiver agreement).

if possible can you share your source xml and interface and receiver determination conditions?

Regards,

Muniyappan.

Former Member
0 Kudos

I agree with Muniyappan.

So let me explain further.

Receiver Determination should be

  • Vendor A and Update      -> CComp - A-U
  • Vendor A and Create      -> CComp - A-C
  • Vendor B and Update      -> CComp - B-U
  • Vendor A and Create      -> CComp - B-C

Interface Determinations

  1. Vendor A and Update -> OM -1 -> SI_out - 1
  2. Vendor A and Create -> OM -2 -> SI_out - 2
  3. Vendor B and Update -> OM -3 -> SI_out - 3
  4. Vendor B and Create -> OM -4 -> SI_out - 4

Receiver Agreements

  1. CComp - A -U SI_in - 1 and FileReceiver1
  2. CComp - A -C SI_in - 2 and FileReceiver2
  3. CComp - B -U SI_in - 3 and FileReceiver3
  4. CComp - B -C SI_in - 4 and FileReceiver4

Now you may be able to get away with using just two Communication components in the Receiver Determination (I think you can) as long as the file name is handled in Dynamic Configuration, etc. But try this like I have show and it should work.

former_member440061
Participant
0 Kudos

Hi Upendra,

As

  

former_member184789
Active Contributor
0 Kudos

Hi,

You can also take help from Configuration Wizard to create objects in ID->Tools-> Configuration Wizard. This way you can avoid any errors in configuration.

iaki_vila
Active Contributor
0 Kudos

Hi Upendra,

Your scenario architecture is right, as  Ambrish said you will need so much interface determinations as different operations. I assume that you are using the condition clausule in the receiver determination to find the vendor in the XML with xpath. Are you sure that the message is right with all the namespaces, respecting lowercase or uppercase data?, could you make an screenshoot of your receiver determination and the XML message?

Regards.

Former Member
0 Kudos

Hi Inaki,

I initially tried using a single interface determination. I have only mapping, that produces four different kind of messages depending on the vendor and the type of the message.

Inside interface determination, this reflects as all the four messages coming as a single entry, thereby making the second interface determination redundant.

Ideally how many message mapping should be created to address the scenario?

I am looking at the scenario, wherein in the future I can add a third system (Target C) with minimum development/configuration.

Unfortunately, I am not getting any option of adding any screenshots here. Not sure what is the problem. Will try again in some time.

Regards

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Upendra,

Inside interface determination, this reflects as all the four messages coming as a single entry, thereby making the second interface determination redundant.

When developing objects, always think of the person that will support it. So there should be 4 message mappings/operation mappings and one interface determination per target.

If you still encounter errors, please update this thread.

Regards,

Mark

iaki_vila
Active Contributor
0 Kudos

Hi Uppendra,

May be i misunderstood something, if you have create and update purchase operations you should to have two mappings (four, if you need a response) independiently if you have 2 or n targets. The service interface schema definition should be enough general to be adaptable to all targets characteristics.

The vendor could come as tag in the request, therefore in configuration time you only need to add receivers in the receiver determination accesing to the XML vendor tag in order to determine the target, from my point of view is the easier way, because you dont change anything in ESR when you add a new target.

Regards.

Muniyappan
Active Contributor
0 Kudos

Hi Upendra,

Let us consider the create message which goes to A and B. the structure of create message is same for both the systems or different.?

if the create or update target messages are same for all the systems then you need two mappings like one is for update and another one is for create. in future if you have extra systems you don't have change the mapping.

if the create message is different for each system (different message type) then for two systems you need four message mapping(four message types ,2 create and 2 update ). in this case you have to create extra mappings in future for upcoming systems.

please confirm.

Regards,

Muniyappan.

Muniyappan
Active Contributor
0 Kudos

Hi,

check if you have mentioned both the receivers in the receiver determination.

Regards,

Muniyappan.

ambrish_mishra
Active Contributor
0 Kudos

Shouldn't there be 2 interface determinations ? One for Create and one for change ?

Ambrish

Former Member
0 Kudos

Hi Ambrish,

I tried creating two interface determinations, one for TargetA and other for Target B. But it is not working.

I am looking for the correct design and some flexibility which will be useful, incase I decide to add a third vendor (Target C) in future.

Regards

PeterJonker
Active Contributor
0 Kudos

You mean Receiver Determinations ?

In there you define to which Vendor the message should go and then next in

Interface determination you define which message type should go to which interface for the receiver (which was already defined in the previous step)

Also did you sort and split the message ? How did you do this,  in a ccBPM (for IDocs) or in your mappings ?

I guess that is where it might go wrong.

former_member184789
Active Contributor
0 Kudos

Hi Upendra,

In the Integration Directory, go to Tools-> Test Configuration. Here provide the details of your configuration & the payload with which you are testing to see the step at which the config is failing.