cancel
Showing results for 
Search instead for 
Did you mean: 

How to call an integration flow from another integration in SAP CPI PI

0 Kudos

Hi Experts,

I have a requirement to build a common integration flow with exception sub process which can be called by any integration flow to store the payload during message failure in CPI PI.

I have created one sample integration flow with exception subprocess. I am passing the input payload in content modifier of exception subprocess. Process direct receiver adapter is used for exception subprocess.

Please refer the image1.

I have created another common exception integration flow in which process direct is the sender.Used content modifier with the same property as that of the sample integration flow.Please refer the image2.

So as per the design when the message fails it should call the interface with exception subprocess and store the payload.

But in my case if I trigger the interface with incorrect payload its calling the exception subprocess but the messages are ending up with 'COMPLETED' status and even the payload is not getting stored.

But if I use the same login in a single integration flow its working. But I would like to have a separate common exception integration which can be reused.

Kindly provide some pointers if anyone has tried this scenario.

Attaching the iflow screenshots.

common-exception-integration.png

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

Hello Ashwini,

In your first iflow please use request reply and error end event to call the Exception Iflow something like below.

Regards,

Sriprasad Shivaram Bhat

Answers (5)

Answers (5)

0 Kudos

Thanks a lot Sriprasad. Its working now:) Thanks for your quick and prompt response.

Much appreciated.

0 Kudos

Hi Sriprasad,

Thanks for the inputs. I tried this and now the payload is getting stored in case of exception.

But still both the message statuses are 'COMPLETED' and not failed.

Attaching the screenshot of the iflows.

Kindly suggest.

main-iflow.pngcommon-exception-integration.png

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Ashwini,

You should follow below process.

1) Create a Common Exception Iflow- Lets say I_COMMON_EXCP

2) Call this iflow I_COMMON_EXCP whenever there is failure in I_ORIGINAL_IFL

3) Whenever there is exception in your first iflow it calls second iflows main integration process not exception sub process of I_COMMON_EXCP( so you should place your logging step in main integration process also so that you can send out an email or do whatever action you want ).

4) Whenever there is a exception in first iflow in message processing you will be able to see 2 entries.

a) Errored message of First Iflow.

b) Successfull message of Exception Handler iflow which is used to just store the exception or send an email alert ( note: you are calling main integration process from your original iflow and there is no failure as such in in your exception flow since it successfully processed your error message )

Regards,

Sriprasad Shivaram Bhat

0 Kudos

Hi Sriprasad,

Thanks for the reply. I tried it and it works if we use it in a single flow.

But I am using process direct receiver in first flow so that the common exception process can be called.

If I use error end event I wont be able to use process direct receiver after error end event.

Kindly suggest.

Thanks,

Ashwini

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Ashwini,

In your main iflow please use error end event instead of end message event inside exception subprocess then everything should work.

Regards,

Sriprasad shivaram Bhat