cancel
Showing results for 
Search instead for 
Did you mean: 

BPM Question: JDBC Sender to RFC to JDBC Receiver

Former Member
0 Kudos

I have the following requirement:

JDBC Sender Adapter (by nature Asynchronous) – SELECT multiple rows from a table

To…

RFC Receiver Adapter (Synchronous)

To…

JDBC Receiver Adapter (Synchronous) – UPDATE multiple rows in a table

Then…

IF <SAP:Error> XML is returned from the JDBC Receiver Adapter, I want to either issue a CCMS alert, or utilize the XI Email Adapter for error notification.

ELSE, if <root_response> XML is returned from the JDBC Receiver Adapter, do nothing.

This obviously requires a BPM. If I use the JDBC Receiver Adapter Asynchronously (with no error handling) this is a piece of cake. But after trying to use it synchronously along with error handling logic, I am stuck.

This issue that I am facing is how to logically handle the JDBC Receiver Adapter Response XML in the BPM. I would like to know what I need to do in the BPM in order to issue a CCMS alert (and/or send a message through the XI Email Adapter) ONLY if the <SAP:Error> XML is returned.

Below are examples of the 2 types of response messages that I would receive back from the JDBC Receiver:

-


Error:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<!-- Call Adapter -->

<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code area="MESSAGE">GENERAL</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_OrderImport' (structure 'StatementName2'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint 'PK_SAP_OrderImport'. Cannot insert duplicate key in object 'SAP_OrderImport'.</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Success:

<?xml version="1.0" encoding="utf-8" ?>

<root_response>

<StatementName1_response>

<update_count>1</update_count>

</StatementName1_response>

</root_response>

-


I have searched SDN for a while but did not find anything that specifically addressed this. I would appreciate any help…

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In ur BPM wrap the jdbc send step with a exception block. in the exception block define a control step to throw an alert.

so when the jdbc step fails, the exception is caught and an alert is generated by the control step.

cheers,

naveen