To implement compensate Handler in bpel?
{color:#3366ff}Hi,
I am invoking two services(i.e,service A,service B{color}) in bpel.Both of them are dealing with diff. database.Now I want to use *{color:#ff0000}compensate hander{color}* such that if one service goes down than the whole transaction should also rolled back.if any one having idea how to implement and configure compensate handler,{color:#3366ff}please let me know.
Thanks
Arvind{color}
Edited by: Avi007 on Jun 23, 2008 9:41 PM
Arvind,
Please post this and any component related questions in the users list of esb. [email protected]
Transactions and compensation are not one and the same. compensation is used more for compensation, meaning business "roll back". If you see your services as units of business work, compensation would take compensatory actions when one of those fails.
In your case, you seem to want to roll-back like in transactions. Then you should use transactions. Have you tried using transactions with BPEL. Try making the BPEL atomic.
If you use compensation here, you could achieve something like this through compensation handler of the second service. That would be by invoking the first service to revert the changes. But this is not as atomic as TXs provide.
So when to use TX Vs compensation handler?
It depends on use case by use case, do you want to do TXs and incur it's overhead, or is your use case happy with few dirty reads. For instance if service A is airline reservtion and service B is car reservation, these don't need to use TXs. Simple compensation would do fine. Airline tickets do get cancelled and users accept the fact that the flight was full this moment, but next day there may be a vacant seat.
hope that helps,
Kiran B.
Similar Messages
-
Best Practice for Implementing Exception Handling in BPEL
Hi All,
what is the best practice and the approach to follow Exception Handling in BPEL.
1) Do we need to implement Exception Handling in BPEL as we do in Java, means
method 3 throws error to method 2 (if any) and
method 2 throws error to method 1 (if any) and
finally method 1 throws error to the main Class.
If we replicate the above scenario to BPEL
In BPEL main Scope have Custom Fault, Catch ALL
Each Invoke is surrounded by a Scope Activity with Remote Fault, Binding Fault & Custom Fault
and follow the paradigm of Java, assuming we have Inner Scopes
[ OR ]
2) In BPEL main Scope have all exceptions defined like
Remote Fault,
Binding Fault,
anyOther System Fault (selectionFailure / forcedTermination),
Custom Fault (if required) and
CatchALL
and also
each Invoke is surrounded by a Scopes Acitivity with Custom Fault (business fault) exception Handling
I feel 1st one may not be a good practice, may be i am wrong...
Any Suggestions from experts.
Thanks in Advance
anvv sharmaHi-
In you can create different scope and use catch branch to catch binding, remote, custom faults, business faults etc. If an error happens in a scope it will not move to the next scope( eg: you have 3 scope, error occured in 2nd scope then it will not propogate to the 3rd scope. One thing to be noticed here is your transaction in the 1st scope doesnt gets commited when an error happens in 2d scope).
You can have a catch all to catch error which are not being caught at catch level. So if any error happens which is not defined in catch block then then it will be caught in catch all branch.
Edited by: 333333 on Apr 12, 2011 9:39 AM -
How to implement Fault Handler in BPEL
Any good material or sample available on ? How to handle exception properly If error does occur in BPEL ?
Hi',
Check this out,
http://rathinasaba.wordpress.com/2011/05/29/fault-handling-in-bpel/
http://rahullahiri.blogspot.com/2011/02/basic-fault-handling-in-soa-11g.html
http://jianmingli.com/wp/?p=2708
-Yatan -
Implement custom fault handling in bpel
Hi,
Can you please provide some link on how to implement custom fault handling in bpel
Thanks,
kprSee the article below for details on implementing custom fault handling.
http://beatechnologies.wordpress.com/2011/07/18/fault-handling-in-oracle-soa-suite-advanced-concepts/ -
How to use the compensate activity in bpel flow
Hi
Can anyone please let me know how to use the compensate activity in bpel flow. Like i have 4 DB adapters in a flow if any one fails i want do the roll back by using compensate activity.
I am femiliar with transactions proparties, I want to do it from compensate
Any suggestions would be appricite.
Thanks in advance.Hi,
wrong forum, please try the SOA forum SOA Suite
Frank -
Never implemented exception handling in Stored Procedures
I have lots of stand alone stored procedures callled from .NET 20 programs that follow the following pattern. They runn against Oracle 10.2 on Win2003. The only deviiation is a couple where I insert to temptables. I specify a parameter for messages but don't know the best way to implement for Oracle as well as any tips on ODP.NET/oracle interactions error handling.
1. Is it recommended to implement exception handling in With Clauses?
2. If there is an exception in one cursor's SQL, how do I still execute the second?
3. Is it best in some circumstances to pass a null back to client and check for null in program?
From .NET programs I have run into a couple of problems.
4. TNS packet failure.
Anyways any suggestions or experiences are welcome.
CREATE OR REPLACE PROCEDURE GET_SALES_DATA
, p_businessdate in date
, p_message out varchar2
, p_rcSales out sys_refcursor
, p_rInventory out sys_refcursor
) is
open p_rcSales for
with somedata as (select ...)
, someMoreData as (selct ...)
-- Main select
Select * from somedata sd inner join somemoredata smd on smd.key = sd.key;
open p_rcInventory for
with somedata as (select ...)
, someMoreData as (selct ...)
-- Main select
Select * from somedata sd inner join somemoredata smd on smd.key = sd.key;
-- CODE NOT IMPLEMENTED
-- exception
-- when TOO_MANY_ROWS then select 'Error handling for future implementations' into p_message from dual ;
-- when NO_DATA_FOUND then select 'Error handling for future implementations. No data' into p_message from dual;
-- when others then raise_application_error(-20011,'Unknown Exception in GET_SALES_DATA Function');
-- WHEN invalid_business_date then select 'Invalid: Business date is in the current work week.' into p_message from dual ;
END GET_SALES_DATA;Pseudocode'ish because Module level variables and properties have not been defined here for brevity.
Public Class WebPage1
PAge_Load
GetData
End Class Data Access Layer
Public Class DAL
Public Sub GetOracleData()
Dim conn As OracleConnection
Try
conn = New OracleConnection
Catch ex As Exception
Throw ex
End Try
Dim cmd As New OracleCommand
With cmd
conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("MyConnectionString").ToString
cmd.CommandText = DATABASE.GetSalesData
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = conn
End With
cmd.Connection = conn
Dim oparam As OracleParameter
oparam = cmd.Parameters.Add("p_businessdate", OracleDbType.Date)
oparam.Value = BusinessDate.ToString("dd-MMM-yy")
oparam = cmd.Parameters.Add("p_message", OracleDbType.Varchar2, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rc_inven_csv", OracleDbType.RefCursor, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcSales", OracleDbType.RefCursor, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcInventory", OracleDbType.RefCursor, ParameterDirection.Output)
Dim Adapter As New OracleDataAdapter(cmd)
Try
Adapter.TableMappings.Add("Table", Sales)
Adapter.TableMappings.Add("Table1", Inventory)
Adapter.Fill(dsOracleData)
Catch ex As OracleException
HandleError("Exception Retrieving Oracle Data", ex, MethodInfo.GetCurrentMethod.Name, True)
Finally
If conn.State = ConnectionState.Open Then
conn.Close()
End If
End Try
dbMessages = cmd.Parameters("p_message").ToString
End If
arrStatusMessages.Add("Retrieved Oracle Data Successfully")
End Sub
' Original Implementation ; No longer used
Public function GetOracleData
Dim conn As New OracleConnection
conn.ConnectionString = dbconn.Connectionstring
Dim cmd As New OracleCommand
With cmd
conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("MyConnectionString").ToString
cmd.CommandText = DATABASE.GetSalesData
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = conn
End With
cmd.Connection = conn
Dim oparam As OracleParameter
oparam = cmd.Parameters.Add("p_businessdate", OracleDbType.Date)
oparam.Value = BusinessDate.ToString("dd-MMM-yy")
oparam = cmd.Parameters.Add("p_message", OracleDbType.Varchar2, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcSales", OracleDbType.RefCursor, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcInventory", OracleDbType.RefCursor, ParameterDirection.Output)
Dim Adapter As New OracleDataAdapter(cmd)
Try
Adapter.TableMappings.Add("Table", Sales)
Adapter.TableMappings.Add("Table1", Inventory)
Adapter.Fill(dsOracleData)
dim dt as datatable = dsoracledata.tables("sales")
If IsDataNull(dt) Then
_errorType = DBErrorType.NullData
End If
If isDataEmpty(dt) Then
_errorType = DBErrorType.EmptyData
End If
_hasError = False
Catch oraEx As OracleException
_ExceptionText = oraEx.Message.ToString
_errorType = DBErrorType.OracleException
#If DEBUG Then
Throw oraEx
#End If
Catch zeroEx As DivideByZeroException
_ExceptionText = zeroEx.Message.ToString
_errorType = DBErrorType.DivideByZeroException
#If DEBUG Then
Throw zeroEx
#End If
Catch oflowEx As OverflowException
_ExceptionText = oflowEx.Message.ToString
_errorType = DBErrorType.OverflowException
#If DEBUG Then
Throw oflowEx
#End If
Catch argEx As InsufficientMemoryException
_ExceptionText = argEx.Message.ToString
_errorType = DBErrorType.InsufficientMemoryException
#If DEBUG Then
Throw argEx
#End If
Catch nomemEx As OutOfMemoryException
_ExceptionText = nomemEx.Message.ToString
_errorType = DBErrorType.OutOfMemoryException
#If DEBUG Then
Throw nomemEx
#End If
Catch Ex As Exception
_ExceptionText = Ex.Message.ToString
_errorType = DBErrorType.GenericException
#If DEBUG Then
Throw Ex
#End If
Finally
If conn.State = ConnectionState.Open Then
conn.Close()
End If
End Try
End class Error Class
Public Class Errors
Public Sub ExitClass()
Return
End Sub
' 'blnWriteNow says when Error is critical and no further processing needs to be done by class, then write to event logs or text files and call exit class
' to return control back to webpage. This is my first time trying this way.
Public Sub HandleError(ByVal friendlyMsg As String, ByVal objEx As Exception, ByVal methodInfo As String, Optional ByVal blnWriteNow As Boolean = False)
If Not blnWriteNow Then Exit Sub
Dim strMessages As String
strMessages = arrStatusMessages
'Send error email
If blnSendEmails Then
SendMail("[email protected], strMessages. applicationname, " has thrown error. ")
End If
'Throw error for debugging
If blnThrowErrors Then
Throw New Exception(strMessages & vbCrLf & objEx.Message)
End If
' Write to event log and if not available (shared hosting environment), write to text log
If blnWriteNow Then
If blnWriteToEvtLog Then
If blnCanWriteToEvtLog Then 'Program has write permission to log
WriteToEventLog(strMessages, _appname, EventLogEntryType.Error, appname)
Else
If Not Directory.Exists( appPath & "\log") Then
Try
Directory.CreateDirectory( appPath & "\log")
Catch ex As Exception
arrStatusMessages.Add("Cant't write to event log or create a directory")
End Try
End If
End If
End If
End If
End Sub
End ClassI have lots of stand alone stored procedures callled from .NET 20 programs that follow the following pattern. They runn against Oracle 10.2 on Win2003. The only deviiation is a couple where I insert to temptables. I specify a parameter for messages but don't know the best way to implement for Oracle as well as any tips on ODP.NET/oracle interactions error handling.
1. Is it recommended to implement exception handling in With Clauses?
2. If there is an exception in one cursor's SQL, how do I still execute the second?
3. Is it best in some circumstances to pass a null back to client and check for null in program?
From .NET programs I have run into a couple of problems.
4. TNS packet failure.
Anyways any suggestions or experiences are welcome.
CREATE OR REPLACE PROCEDURE GET_SALES_DATA
, p_businessdate in date
, p_message out varchar2
, p_rcSales out sys_refcursor
, p_rInventory out sys_refcursor
) is
open p_rcSales for
with somedata as (select ...)
, someMoreData as (selct ...)
-- Main select
Select * from somedata sd inner join somemoredata smd on smd.key = sd.key;
open p_rcInventory for
with somedata as (select ...)
, someMoreData as (selct ...)
-- Main select
Select * from somedata sd inner join somemoredata smd on smd.key = sd.key;
-- CODE NOT IMPLEMENTED
-- exception
-- when TOO_MANY_ROWS then select 'Error handling for future implementations' into p_message from dual ;
-- when NO_DATA_FOUND then select 'Error handling for future implementations. No data' into p_message from dual;
-- when others then raise_application_error(-20011,'Unknown Exception in GET_SALES_DATA Function');
-- WHEN invalid_business_date then select 'Invalid: Business date is in the current work week.' into p_message from dual ;
END GET_SALES_DATA;Pseudocode'ish because Module level variables and properties have not been defined here for brevity.
Public Class WebPage1
PAge_Load
GetData
End Class Data Access Layer
Public Class DAL
Public Sub GetOracleData()
Dim conn As OracleConnection
Try
conn = New OracleConnection
Catch ex As Exception
Throw ex
End Try
Dim cmd As New OracleCommand
With cmd
conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("MyConnectionString").ToString
cmd.CommandText = DATABASE.GetSalesData
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = conn
End With
cmd.Connection = conn
Dim oparam As OracleParameter
oparam = cmd.Parameters.Add("p_businessdate", OracleDbType.Date)
oparam.Value = BusinessDate.ToString("dd-MMM-yy")
oparam = cmd.Parameters.Add("p_message", OracleDbType.Varchar2, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rc_inven_csv", OracleDbType.RefCursor, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcSales", OracleDbType.RefCursor, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcInventory", OracleDbType.RefCursor, ParameterDirection.Output)
Dim Adapter As New OracleDataAdapter(cmd)
Try
Adapter.TableMappings.Add("Table", Sales)
Adapter.TableMappings.Add("Table1", Inventory)
Adapter.Fill(dsOracleData)
Catch ex As OracleException
HandleError("Exception Retrieving Oracle Data", ex, MethodInfo.GetCurrentMethod.Name, True)
Finally
If conn.State = ConnectionState.Open Then
conn.Close()
End If
End Try
dbMessages = cmd.Parameters("p_message").ToString
End If
arrStatusMessages.Add("Retrieved Oracle Data Successfully")
End Sub
' Original Implementation ; No longer used
Public function GetOracleData
Dim conn As New OracleConnection
conn.ConnectionString = dbconn.Connectionstring
Dim cmd As New OracleCommand
With cmd
conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("MyConnectionString").ToString
cmd.CommandText = DATABASE.GetSalesData
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = conn
End With
cmd.Connection = conn
Dim oparam As OracleParameter
oparam = cmd.Parameters.Add("p_businessdate", OracleDbType.Date)
oparam.Value = BusinessDate.ToString("dd-MMM-yy")
oparam = cmd.Parameters.Add("p_message", OracleDbType.Varchar2, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcSales", OracleDbType.RefCursor, ParameterDirection.Output)
oparam = cmd.Parameters.Add("p_rcInventory", OracleDbType.RefCursor, ParameterDirection.Output)
Dim Adapter As New OracleDataAdapter(cmd)
Try
Adapter.TableMappings.Add("Table", Sales)
Adapter.TableMappings.Add("Table1", Inventory)
Adapter.Fill(dsOracleData)
dim dt as datatable = dsoracledata.tables("sales")
If IsDataNull(dt) Then
_errorType = DBErrorType.NullData
End If
If isDataEmpty(dt) Then
_errorType = DBErrorType.EmptyData
End If
_hasError = False
Catch oraEx As OracleException
_ExceptionText = oraEx.Message.ToString
_errorType = DBErrorType.OracleException
#If DEBUG Then
Throw oraEx
#End If
Catch zeroEx As DivideByZeroException
_ExceptionText = zeroEx.Message.ToString
_errorType = DBErrorType.DivideByZeroException
#If DEBUG Then
Throw zeroEx
#End If
Catch oflowEx As OverflowException
_ExceptionText = oflowEx.Message.ToString
_errorType = DBErrorType.OverflowException
#If DEBUG Then
Throw oflowEx
#End If
Catch argEx As InsufficientMemoryException
_ExceptionText = argEx.Message.ToString
_errorType = DBErrorType.InsufficientMemoryException
#If DEBUG Then
Throw argEx
#End If
Catch nomemEx As OutOfMemoryException
_ExceptionText = nomemEx.Message.ToString
_errorType = DBErrorType.OutOfMemoryException
#If DEBUG Then
Throw nomemEx
#End If
Catch Ex As Exception
_ExceptionText = Ex.Message.ToString
_errorType = DBErrorType.GenericException
#If DEBUG Then
Throw Ex
#End If
Finally
If conn.State = ConnectionState.Open Then
conn.Close()
End If
End Try
End class Error Class
Public Class Errors
Public Sub ExitClass()
Return
End Sub
' 'blnWriteNow says when Error is critical and no further processing needs to be done by class, then write to event logs or text files and call exit class
' to return control back to webpage. This is my first time trying this way.
Public Sub HandleError(ByVal friendlyMsg As String, ByVal objEx As Exception, ByVal methodInfo As String, Optional ByVal blnWriteNow As Boolean = False)
If Not blnWriteNow Then Exit Sub
Dim strMessages As String
strMessages = arrStatusMessages
'Send error email
If blnSendEmails Then
SendMail("[email protected], strMessages. applicationname, " has thrown error. ")
End If
'Throw error for debugging
If blnThrowErrors Then
Throw New Exception(strMessages & vbCrLf & objEx.Message)
End If
' Write to event log and if not available (shared hosting environment), write to text log
If blnWriteNow Then
If blnWriteToEvtLog Then
If blnCanWriteToEvtLog Then 'Program has write permission to log
WriteToEventLog(strMessages, _appname, EventLogEntryType.Error, appname)
Else
If Not Directory.Exists( appPath & "\log") Then
Try
Directory.CreateDirectory( appPath & "\log")
Catch ex As Exception
arrStatusMessages.Add("Cant't write to event log or create a directory")
End Try
End If
End If
End If
End If
End Sub
End Class -
Implementing Exception Handling Application Block in custom web parts, event receivers
hi,
I am currently implementing try {} catch(Exception expp) { throw expp;} to handle exceptions in my intranet appln.
I have several custom web parts, event receivers, few console applciations as timer jobs etc. If i want to implement a robust exception handling what should be the approach. by searching, i saw, ms patterns n practices provides the
appln blocks.
But I think[ pls correct me if i am wrong ] those appln blocks are meant for asp.net applns ONLY.
if not, anyone has implemented those appln blocks in SP development? if yes, can anyone provide one sample / link to implement Exception Handling in SP.
help is appreciated!Hi,
Here are some articles for your reference:
Handling Error Centrally in a SharePoint Application
http://www.codeproject.com/Articles/26236/Handling-Error-Centrally-in-a-SharePoint-Applicati
Using Microsoft Enterprise Library Application Block in SharePoint
http://www.codeproject.com/Articles/21389/Using-Microsoft-Enterprise-Library-Application-Blo
Exception Handling in SharePoint
http://spmatt.wordpress.com/2012/02/01/exception-handling-in-sharepoint/
Best Regards
Dennis Guo
TechNet Community Support -
Implementing session handling in servlet controller
how to implementing session handling in servlet controller.
instead of writing isNew() in every jsp page i wanted to write in my central controller ,where each request is passing through controller. can any body give me the solutioni tried it it is failed because first time the request is coming to the controller.it checks for new since of it is a first request it is forwarded to the login page.how to avoid or skip the condition checking when the request is first time.
-
Error Handling in BPEL & ESB - Rejection Handlers
Hi guys
I have been trying to evaluate various ways for handling errors/exceptions in BPEL and ESB in Oracle SOA Suite 10.1.3.4 (Basic installation).
What i have found is that in ESB, errors can be handled at two levels: ESB routing service errors using ERROR_TOPIC and Adapter errors using RejectionHandlers. AND
in BPEL errors can be handled using in built try/catch (calling error hospital from the catch) and adapter erros using RejectionHandlers.
I tried using Rejection handlers (bpel, wsif, file) in BPEL and ESB. In BPEL they all are working fine when registered in bpel.xml.
But in ESB only the file handler is working. What i did in ESB is:
I set up an ESB which is polling a file adapter and simply putting the data into a table in database.
Then i created a BPEL (or a Webservice) which is based on http://localhost:8888/orabpel/xmllib/jca/RejectionMessage.wsdl file, taking
{http://xmlns.oracle.com/pcbpel/errorHandling}RejectedMessage as input.
Then I registered Rejection Handler in ESB's file adapter's .esbsvc (or Enpoint property- rejectedMessageHandlers):
"wsif://http//localhost8888/Error_Service/RejectionHandlerPort?wsdl|handleRejection|message"OR "bpel://default:welcome1|BPEL_Error_Handler|handleRejection|message"
I generated error in ESB by changing a column name of the table
For bpel rejection handler:
i was getting error: "<ERROR> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Rejection handler failed
Error while trying to hand off bad message to Rejection handler bpel://default|BPELProcess2|handleRejection|message due to: java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
at com.evermind.server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)
at com.evermind.server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:256)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:196)
at javax.naming.InitialContext.lookup(InitialContext.java:351)"
It was solved by adding in server.xml - <application-server ... global-jndi-lookup-enabled="true">. But now i am getting
"Error while trying to hand off bad message to Rejection handler bpel://default:welcome1|BPEL_Error_Handler|handleRejection|message due to: java.lang.LinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome. Please address the underlying issue or correct/redeploy the process."
*For wsif rejection handler*:
getting error: "Error while trying to hand off bad message to Rejection handler wsif://http//localhost8888/Error_webservices/RejectionHandlerPort?WSDL|handleRejection|message due to: exception on JaxRpc invoke: serialization error: java.lang.IllegalArgumentException: getSerializer requires a Java type and/or an XML type
Please address the underlying issue or correct/redeploy the process."
I followed: Link:[http://www.oracle.com/technology/products/integration/adapters/pdf/Adapter_TN_004_Adapter_ErrorManagement.pdf]
Same bpel/wsif handlers pointing to same BPEL/J2EE services, if configured for BPEL adapters, works absolutly fine and gives proble in ESB.
Am i missing something in ESB or is there any patch need to be applied? Please help me there.
Thanks in advance.
InderHi
I even installed SOA Suite 10.1.3.4 MLR#5 Advanced installation with Oracle Express dehyderation store.
I was able to use WSIF rejection handler with this upgrade... but bpel rejection handler was still a failure.
So basically i re-visited ESB documentation. it says that ESB will not support bpel rejection handler.
At least not upto now.
So Summary:
For BPEL we can use - file, wsif, bpel & aq rejection and fatal message handler.
For ESB we can use file, WSIF (10.1.3.4 with MLR#5) & aq rejection and fatal message handler.
Thanks
Inder
Keep going... -
Exception Handling In BPEL By using Catch Blocks or Fault Policies Or Both
I have a confusion regarding
Exception handling :
When Should i go for 1)Catch Block (Remote , or binding ) in bpel for exception handling .
2)Fault Policy , Fault binding.xml
Currently iam using catch blocks , but even fault policy is good , but can i use both...
Currently in My bpel ,when any error occurs i have to send a error notification by Email .
Currently i have exposed the email service which shuts emails and write a file with errored Message.
Hence if any error i will catch i in a parent BPEL, i will just invoke the above email, service .
So anybody can help me by giving the suggestion how to go for the best approach
Edited by: anantwag on Mar 23, 2011 6:31 AMCurrently in My bpel ,when any error occurs i have to send a error notification by Email .
Currently i have exposed the email service which shuts emails and write a file with errored Message.Seeing your use case I will suggest you to use fault handling framework (fault policy). Fault handling framework should be used where you need generic error handling framework which handles all the faults occured in any composite component. Generally BPEL catch block should be used to propagate error info/fault back to the client/to fault handling framework or to consume an error
Regards,
Anuj -
Guys,
I have exposed the following class as Web-Service, using Axis.
public class ExceptionCreator {
public ExceptionCreator(){
public ReturnObject generate(boolean flag) throws CustomException{
if(flag){
throw new CustomException("This is a custom exception");
}else{
return new ReturnObject(1,"NO EXCEPTION");
where ReturnObject is a simple JavaClass with two member variables id & name and CustomException is a class extended from Exception superclass in Java.
Using axis, writing appropriate serializers in wsdd, I created a web-service out of this and imported the WSDL from Axis as a Partner Link in BPEL.
If I pass true as Input and if I specify "{http://schemas.oracle.com/bpel/extension}remoteFault as faultName in the catch, the exception does get caught. However, I am unable to access the details of the same which looks like below:
[2005/09/26 18:44:11] "{http://schemas.oracle.com/bpel/extension}remoteFault" has been thrown.
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="code">
<code>Server.userException</code>
</part>
<part name="summary">
<summary>when invoking endpointAddress 'http://kingfisher:9080/axis/services/ExceptionCreatorSewrvice', com.misys.equationcore.tutorials.CustomException: This is a custom exception</summary>
</part>
<part name="detail">
<detail>AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: com.misys.equationcore.tutorials.CustomException: This is a custom exception faultActor: faultNode: faultDetail: {http://kingfisher:9080/axis/services/ExceptionCreatorSewrvice}fault:<exceptionMessage type="soapenc:string">String CustomException Constructor</exceptionMessage> {http://xml.apache.org/axis/}hostname:kingfisher</detail>
</part>
</remoteFault>
I am trying to access the contents of this fault in a Assign activity where I want to display the actual java exception as output.
Any clues as to how I can access the same?
Thanks in advance,
~Soumen.Currently in My bpel ,when any error occurs i have to send a error notification by Email .
Currently i have exposed the email service which shuts emails and write a file with errored Message.Seeing your use case I will suggest you to use fault handling framework (fault policy). Fault handling framework should be used where you need generic error handling framework which handles all the faults occured in any composite component. Generally BPEL catch block should be used to propagate error info/fault back to the client/to fault handling framework or to consume an error
Regards,
Anuj -
Fault Handling in BPEL process
hi
We have to develop an application which involves several BPEL processes and proxy service(OSB) and JMS queue etc.
What is the difference between Fault Management Framework in SOA11g and normal fault handling(using catch and throw activities)?
which one we should prefer for fault handling in our application n why?
Plz help thanks in advance.Hi-
In Normal Fault handling process, you will be able to catch the faluts only but in Fault Management Framework if a fault occurs the framework catches the fault and performs a user-specified action defined in a fault policy file associated with the activity. You can also have a human intervention prescribed in it, where you perform recovery actions from Enterprise Manager.
Pls go throgh the below post for detailed description
http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bp_faults.htm
Fault Management Framework and non BPEL soap faults
Edited by: 333333 on Mar 23, 2011 5:01 PM -
Hi,
Can anyone explain me how do I handle the faults in my BPEL process. What I want to do is whenever any Faults occur in my Invoke activity I want to capture the error messages and send an email to myself with the error messages. Appreciate if anyone can help me out here with the design process. I'm new to BPEL and if there is any step by step design document it would really help me.
Thanks
-PrapoornaPlease read
http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/faults.htm#sthref1186 -
Fault Handling in BPEL - Continue after Catch Block
Hi,
I have a catch block in my BPEL process.
On exception, the catch block catches the error and terminates the BPEL Process.
Is it possible to loop back the flow after the catch sequence?
Thanks,
VenkatHi,
Thanks for your reply
Sorry, I was not clear with my question.
I have a infinite loop in my process. Inside the loop I have an invoke operation(Invokes another BPEL process) and a wait operation. If any exception occurs, my BPEL process terminates. However, I wanted my BPEL process to just continue in the loop.
I solved the issue with the help of this How to handle fault when BPEL process is polling a FTP server which is down
i.e, using the Scope activity. Place my invoke operation inside a scope and put a catchAll block only for that scope. Its working fine
Thanks,
Venkat -
PDF file handling through BPEL
Hi,
We are exploring BPEL as an option to handle PDF files generated by Oracle EBS (BI Publisher). Basically we want to achieve following:
Pick up PDF files from certain location on UNIX box and then
a. Spliting the PDF file into two or more files (depending on some data on PDF file itself, say customer number)
b. FTP few of the splitted files to certain location on UNIX
c. Print few of the splitted files onto a predefined network printer
d. Upload PDF files in Oracle database (BLOB)
e. Email/Fax PDF files as attachment to one or more recipient
I understand this may be a weird requirement but it would be great if we can take advantage of BPEL flexible process management capabilities.
Please give your inputs (whatever possible) as to whether above listed tasks are possible or not?
brHi Vanilla,
I want to process the string that I get from the pdf.What do you mean "process"? What are you planning to do with it?
And it is NOT a String. If you want a String representation (e.g., just the text, with no layout, font, etc. info), then you'd need to interpret the BYTES first and then build a String from the results.
I can not process the bytes. So I think, I have to
convert the bytes into string.Then you need to either learn the PDF spec and write code to interpret those bytes, or you need to find a 3rd party library that does this. You can't just expect to read the bytes into a Java String and have it work.
Maybe you are looking for
-
Can't create a Virtual Machine on new host - Error (2915)
This error is appearing when a Virtual Machine is created from scratch, or from a template. I've tried all of the recommendations I can find. All updates are in place, VMM reports agents are current, server is "OK". VMM Agent is running. Rebooted man
-
How to add a preloader bar to a swf file made in InDesign?
I have created a swf file in InDesign CS4 and now that I added the swf to my website, it takes a little bit to download, but the problem is that it doesn't show a downloading progress or anything. How can I changes this either in InDesign or using p
-
Retrieving value of command-line parameters
Hi experts! Is there any whay to get value of command line parameter supplied with Reports runtime module or by RUN_PRODUCT call? I mean parameters like BATCH, PARAMFORM etc which are not listed among report system parameters. Is it possible somehow
-
How to get automatic plant and shipping point and storage location
hi, sap gurus, how to get automatic plant and shipping point and storage location automatically into the sales order i have done all the config settings for that but its not appearing automatically. regards, balaji.t
-
HT4113 what to do if im locked out of my phone?
how do i unlock my phone from my itunes?