cancel
Showing results for 
Search instead for 
Did you mean: 

Catching fault exception and triggering alert mail

Former Member
0 Kudos

Hi,

I have an IDOC to Webservice scenario. Third party WSDL file contains request, response and exception structure.

I would like to know if its possible to catch the exception(with soap exception structure) and trigger alert mail.

Thanks

Suma

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

You can try the below.

If source is either RFC or Proxy we can achieve BPM .I think for IDOC we need to go with BPM as below

Use BPM and construct a scenario IDOC-->Webservice-->Mail.

Regards

Venkat

Former Member
0 Kudos

Thanks Venkat. This is what I thought. But here I would like to know in sync send step in BPM, how can I capture fault message? I need the fault content to send alert mail.

Please let me know the steps.

former_member189387
Active Contributor
0 Kudos

Hi ,

You pls refer the File --> SOAP -- > File Using BPM scenario .. then you can easily convert to your requirement

IDOC -> SOAP -- >  File/mail

The following are the helpful links

There are these ways to handlings BPM fault messages:

http://scn.sap.com/people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-...

http://scn.sap.com/community/bpm/blog/2012/01/22/human-exception-handling-pattern-in-sap-netweaver-b...

http://scn.sap.com/docs/DOC-3081

To send emails with alert configuration i recommend you:

http://scn.sap.com/docs/DOC-3804

Regards.,

V.Rangarajan

Former Member
0 Kudos

Hi,

Is it possible to capture soap fault exceptions in BPM?

Regards

Suma

former_member189387
Active Contributor
0 Kudos

Hi ,,

If Application error :

If there is an application error then the fault message will be populated and the interface mapping will handle it so  you can send the response back to the sender.

If System Error :

We can do exception handling for the sync send in BPM. If system error happens then you can handle the exception in the exception branch and take the required action of canceling the process, sending an alert or even creating a message to send back to the sender.

Hope this clairifies

robertot4s
Active Participant
0 Kudos

Hi Suma,

Assign the soap exception defined in the WSDL in you synchronous abstract interface:

And then you can catch this exception from the BPM:

Regards,

Roberto

Former Member
0 Kudos

Thanks Roberto.

But can I get error information and send as an email?

When the there is an soap fault exception, flow will go to exception branch in BPM.

But how do I get what is the exception thrown by Third party webservice and want to send a mail with that info.

Please suggest.

Thanks

Suma

robertot4s
Active Participant
0 Kudos

Hi Suma,

If you need to send information of the fault message, I recommend you to map the fault message from the Inbound to the Abstract interface and send an alert from an UDF.

Inside the UDF you can call the function module ALERT_CREATE and send information of the fault message. Here you have an example of a similar UDF:

http://scn.sap.com/people/dhanya.nair/blog/2006/10/16/simple-steps-to-get-descriptive-alerts-from-bp...

Regards,

Roberto

Former Member
0 Kudos

How do I map fault message from inboud to abstract interface.

My scenario is IDOC to Webservice. If there is any application error in WS call then I need to send alert mail.

And below are the steps in BPM

start

1. Receive IDOC

2. Transformation (IDOC to soap req)

3. Block

   Branch 1:  Sync Send Webservice call (this is an sync abstact interface with request, response and fault)

Branch 2: Exception branch (Here how to get fault message? Do I need to define an abstract asyn interface which have the fault structure?)

stop

robertot4s
Active Participant
0 Kudos

Hi Suma,

In Branch 1 you have a sync abstract interface to send a message to the Web Service. In this communication also you have a sync inbound interface (not inside the BPM) to call the Web Service. You can assign an Operation Mapping between these two interfaces and in the fault Message Mapping implement the UDF in order to send the alert.

In Branch 2 is not possible to send an alert with the fault message information.

Regards,

Roberto

former_member189387
Active Contributor
0 Kudos