You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2007/12/06 23:49:08 UTC
svn commit: r601895 -
/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
Author: boisvert
Date: Thu Dec 6 14:49:08 2007
New Revision: 601895
URL: http://svn.apache.org/viewvc?rev=601895&view=rev
Log:
Better error reporting on invoke failure
(convert reason string to XML fragment since reason is limited in size and might get truncated)
Modified:
ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java?rev=601895&r1=601894&r2=601895&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java Thu Dec 6 14:49:08 2007
@@ -36,6 +36,7 @@
import org.apache.ode.bpel.runtime.channels.TerminationChannelListener;
import org.apache.ode.bpel.runtime.channels.TimerResponseChannel;
import org.apache.ode.bpel.runtime.channels.TimerResponseChannelListener;
+import org.apache.ode.utils.DOMUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -109,8 +110,7 @@
try {
response = getBpelRuntimeContext().getPartnerResponse(mexId);
} catch (Exception e) {
- __log.error(e);
- // TODO: Better error handling
+ __log.error("Exception while processing invoke response", e);
throw new RuntimeException(e);
}
@@ -169,7 +169,14 @@
// because there is no fault, instead we'll re-incarnate the invoke
// and either retry or indicate failure condition.
// admin to resume the process.
- _self.parent.failure(getBpelRuntimeContext().getPartnerFaultExplanation(mexId), null);
+ String reason = getBpelRuntimeContext().getPartnerFaultExplanation(mexId);
+ __log.error("Failure during invoke: " + reason);
+ try {
+ Element el = DOMUtils.stringToDOM("<invokeFailure><![CDATA["+reason+"]]></invokeFailure>");
+ _self.parent.failure(reason, el);
+ } catch (Exception e) {
+ _self.parent.failure(reason, null);
+ }
getBpelRuntimeContext().releasePartnerMex(mexId);
}
});