Bug 878082 - Please implement mechanisms to compensate for partner link exceptions.
Summary: Please implement mechanisms to compensate for partner link exceptions.
Keywords:
Status: MODIFIED
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: BPEL Integration
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR1
: 6.1.0
Assignee: Rob Cernich
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On: 965037
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-19 16:00 UTC by Rick Wagner
Modified: 2023-05-15 19:52 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1167422 (view as bug list)
Environment:
Last Closed:
Type: Feature Request
Embargoed:


Attachments (Terms of Use)
Reproducer for "null" local part in QName (FSW 6.0.0.CR3) (38.03 KB, application/zip)
2014-01-28 12:51 UTC, Ivo Bek
no flags Details
Updated exchange interceptor (1.80 KB, text/x-java)
2014-02-27 15:33 UTC, Gary Brown
no flags Details

Description Rick Wagner 2012-11-19 16:00:42 UTC
Please define mechanisms to allow graceful handling of a partner link exception.  This will likely require:

- An interceptor that will examine the unexpected failure and provide an appropriate (expected) type to Riftsaw.

- A fault handler capable of receiving information associated with a defined element type (rather than a message fault) when a partner link has trouble.

It is thought that the WSDL will need to reference the element's schema, rather than declare it as a fault.  The BPEL can then expect an anticipated type, which can be interrogated for use in branching logic, etc.

Comment 1 Gary Brown 2012-11-21 17:03:59 UTC
An example of the mechanism used to support this requirement is described in the associated riftsaw jira (https://issues.jboss.org/browse/RIFTSAW-518).

The first part of the solution is the ability for riftsaw to handle undeclared faults as defined by element variables.

The second part is to demonstrate how interceptors (auditor) in switchyard can be used to convert technical faults into meaningful business messages that can be used by the BPEL process definition to branch.

Comment 2 Ivo Bek 2013-05-20 11:33:46 UTC
It seems that a fault variable must have defined faultMessageType to work - but it should be optional (see bug 964987)

Because of bug 965037, I cannot verify that the interceptor can convert the technical fault.

Comment 7 kconner 2013-10-28 17:32:02 UTC
Moving back to ON_QA since bug 965037 was closed as not a bug.  Ivo, could we have this retested?

Comment 8 Ivo Bek 2014-01-28 12:47:12 UTC
There is a problem when the error message is updated in ExchangeInterceptor called BPELErrorHandler. When I send the request SOAP message, I get exception at https://github.com/riftsaw/riftsaw/blob/master/engine/src/main/java/org/riftsaw/engine/internal/MessageExchangeContextImpl.java#L131   that the localName of faultMessage is null and QName local part cannot be null.

IllegalArgumentException: local part cannot be "null" when creating a QName
	at javax.xml.namespace.QName.<init>(QName.java:244) [rt.jar:1.7.0_51]
	at javax.xml.namespace.QName.<init>(QName.java:188) [rt.jar:1.7.0_51]
	at org.riftsaw.engine.internal.MessageExchangeContextImpl.invokePartnerUnreliable(MessageExchangeContextImpl.java:131) [engine-3.0.0.Final-redhat-8.jar:3.0.0.Final-redhat-8]

Comment 9 Ivo Bek 2014-01-28 12:51:21 UTC
Created attachment 856564 [details]
Reproducer for "null" local part in QName (FSW 6.0.0.CR3)

The reproduce steps are following:
 
1) Unzip the reproducer to bpel-service quickstarts in FSW 6.0.0.CR3.
2) Build the reproducer without running tests.
3) Manually deploy the jar file.
4) Send the following SOAP message.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loan="http://example.com/loan-approval/loanService/">
   <soapenv:Header/>
   <soapenv:Body>
      <loan:request>
         <loan:firstName>FirstName</loan:firstName>
         <loan:name>Name</loan:name>
         <loan:amount>1000</loan:amount>
      </loan:request>
   </soapenv:Body>
</soapenv:Envelope>

5) See the exception in the server log.

Comment 10 Gary Brown 2014-02-27 15:33:54 UTC
Created attachment 868598 [details]
Updated exchange interceptor

I've updated the exchange interceptor to return a SOAP message. The problem was that the BPEL engine needs a fault type, to be able to route it to a fault handler.

Once this was fixed, I found that SwitchYard by default sets the transaction to rollback - I think this is when an unchecked exception occurs. This was resulting in an internal Scope DAO being created without its auto-generated id, which resulted in an "java.lang.IllegalArgumentException: id to load is required for loading" exception being reported.

To fix this, I changed the ROLLBACK_ON_FAULT property on the exchange, from within the exchange interceptor, and this allowed the BPEL process to continue and handle the fault itself.

Comment 11 Gary Brown 2014-02-27 15:35:36 UTC
Assigning to Ivo to confirm that the example works with the updated exchange interceptor, and to close the issue.

Comment 13 Gary Brown 2014-12-08 15:47:07 UTC
I've verified this bug against FSW 6.0.0.GA, using the reproducer with the updated exchange handler, and it works.

The reproducer is a modified version of the loan_approval example, where instead of two BPEL processes being included in the same jar, the called BPEL process is removed and therefore not available to the consuming BPEL process - hence resulting in a 404 when called.

The handler exception is intercepted by the exchange handler and converted into a SOAP fault.

Comment 14 kconner 2015-01-28 14:29:38 UTC
This fix was actually included in FSW 6.0.0 so should be verifiable


Note You need to log in before you can comment on or make changes to this bug.