cancel
Showing results for 
Search instead for 
Did you mean: 

Calling different response mappings based on the response data field content in synchronous scenario

0 Kudos

Requirement:

Integration Flow:

ECC <-> SAPPI <-> TIBCO <-> Target.

PI receives the request from ECC and forwards the same request to Target system and PI receives Base64 PDF format data based on the request XML in the response via same path.

If the target systems fails or unable to generate the response TIBCO is responding with error code in the response, Based on the error code PI need to generate PDF in base 64 format.

I tried to implement this requirement through NWBPM but still am not getting how to call different operation mappings based on the content in NWBPM.

So Please suggests how to proceed and let me know if my approach is wrong.

Please find the attached BPM approach design.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member190293
Active Contributor
0 Kudos

Hi Kondreddy!

In this case I would try to use Sync-Async bridge (RequestOnewayBean/WaitResponseBean) in sender channel, SOAP lookup and composing response message depending on lookup result in message mapping and NotifyResponseBean in receiver channel (without default module) to send response awaited by sender channel. Thus you can use one ICo and you have access to request message contents during all process steps.

Regards, Evgeniy.

former_member190293
Active Contributor
0 Kudos

Hi Kondreddy!

Maybe I'm missing something but why to use different response mappings? You always get the same message type as response and you can use the same mapping to build result message based on response payload data.

Regards, Evgeniy.

0 Kudos

Hi Komakov,

In case of failure we are getting same structure only but it is having only failure reason in the response.

But in case of failure PI needs to generate PDF using request XML to send back to source system, So now here I need to call XSLT and Java mappings to build PDF using request structure.

former_member190293
Active Contributor
0 Kudos

Hi!

The only problem I see is to save request message in order to use it in response mapping. The rest part could be implemented within the same response mappings using response payload values as indicators.

Regards, Evgeniy.

0 Kudos

Hi,

Actually my requirement

For the same request message mapping PI needs to send as below:

  1. In case of success PI needs to send same response what is coming from target to source.
  2. In case of failure PI needs to generate response and send back to source.

Success and failure is differentiating from one of the field content from the target.

Is it possible to put multiple response mappings for one request message in single operation mapping?

former_member190293
Active Contributor
0 Kudos

Hi Kondreddy!

I would use java mapping for response mapping in which I would build XML document depending on response status. In the same mapping I would generate PDF if needed.

Regards, Evgeniy.

0 Kudos

Hi Evgeniy,

If we are going to use java mapping in response how to get the request data into response mapping to generate PDF in case of failure.

Thanks & Regards,

Nityananada

former_member190293
Active Contributor
0 Kudos

Hi Kondreddy!

What data we are talking about? The whole request message or particular element(s) value?

Regards, Evgeniy.

0 Kudos

The whole request message is required to generate PDF.

anupam_ghosh2
Active Contributor
0 Kudos

Hi,

What is the adapter you are using between PI and TIBCO?

In case of faulty message what kind of response you are receiving from TIBCO.

Regards

Anupam

0 Kudos

Hi Anupam,

we are using soap adapter between PI and TIBCO,

In the response structure of TIBCO we had a filed with "Status" this will populate with "1" in case of failure and it is populated "0" in case of success.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Kondreddy,

What is the adapter used between PI and ECC?

What kind of successful response you are sending back to ECC?

Regards

Anupam

0 Kudos

We are using Proxy (SOAP XI3.0) between ECC and PI.

In case of success PI sending Base64 format data in the response. Please find the attached successful response XML file.successresponse.txt

In the failure case from TIBCO PI will not receive "Correspondence" node, It contains only Header and LOG node.

anupam_ghosh2
Active Contributor
0 Kudos

Hi,

How do you think PI will send PDF response?? in form of file??

Regards

Anupam

0 Kudos
Hi Anupam,

No PI is not sending file, It is converting the data present in the request XML into Base64 PDF format and forwarding the same to one of the field in the response structure.

We are using XSLT and Java mappings to convert into BASE64 PDF format.