Join wMUsers | Blog at wMUsers | Edit my wMUsers Profile | Site Map | webMethods Jobs |For Employers

wMUsers  
  #1  
Old 02-02-2010, 16:03
jmboren jmboren is offline
Junior Member
 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Handling

I am using the Webmethods SAP Business Connector Server verion 4.8. We have a very basic setup. We have an RFC call from SAP to the BC server that passes a SQL statement. The BC Server connects to an Oracle database and returns an Updatecount (for insert statements) or a Rowcount and results table for select statements. I used the standard delivered service execSQL to connect to the database. I am using the JDBC OCI driver provided by Oracle.

The problem is that if the DB passes an error back to the BC server, then the BC server does not forward that error on to SAP. Instead, SAP just gets a SYSTEM_FAILURE error with no details. It doesn't matter what error.

For example: If I pass an insert statement and don't provide a key field in the table, then Oracle passes an error message back to the BC Server. From SAP I just get a SYSTEM_FAILURE message with no details. From the BC Developer I get a popup window with a detailed error message from the Database. The service does not return anything.

It seems like the service shoule pass the database error back in the $dbMessage field. Instead, the service fails and exits the flow. Since the flow is lost there is no link back to SAP and SAP receives the SYSTEM_FAILURE message.

I have no custom code in the flow. Only the standard delivered service "execSQL" and a map to map the execSQL service to the RFC.

Does anybody have a suggestion on how to capture this error message without exiting the flow?
Reply With Quote
Advertisement
  #2  
Old 02-02-2010, 16:20
jmboren jmboren is offline
Junior Member
 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

One more example. I execute a valid insert statement. No problems. Then I execute the exact same insert statement again. I would expect an error because this violate the unique record in the database table key rule.
-SAP would then recieve a SYSTEM_FAILURE from the BC Server.
-The BC Developer gets a pop-up window with the following error message: "java.sql.SQLException: ORA-00001: unique constraint (TSMGR.PKMVMS_TRANS) violated". The flow exits and there are no results.

What I want is to not have the flow exit. Instead I want to pass the database error message back to the RFC.
Reply With Quote
  #3  
Old 02-02-2010, 18:29
jmboren jmboren is offline
Junior Member
 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found something on my own. Inside of pachage WmSamples, folders sample-errorHandling-util there are several sample approaches. I followed the second approach theory.
Sequence -exit on success
>Sequence - exit on failure
>> enter flow info I was using previously here with execSQL
>Sequence - exit when done
>>getLastError service

It also gave me a good idea for status updates with commit and rollback flows.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 00:37.


.
All Content Copyright ©2002-2009, Conneva, Inc. DBA wMUsers.Com

wMUsers is an independent organization and is not sponsored in any manner by Software AG or webMethods, Inc.

Page generated in 0.06986 seconds with 15 queries