Test Conditions in BPEL Fault Policy
Per the ORacle 10.1.3.3 SOA Suite techical document, under the Fault Policy Framework section you can use an XPath expression in the <test> section of a fault policy. The example provided is +<test>$fault.code/code="WSDLReadingError"</test>+
Instead of using an equals sign, I am trying to figure out the syntax to use a "contains" or "starts-with" expression. I want to filter out a particular remoteFault using the "summary".
I have tried:
+<Conditions>+
+ <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">+
+ <condition>+
+*<test>contains($fault.summary/summary,"exception on JaxRpc")</test>*+
+<action ref="ora-retry"/>+
+ </condition>+
+ </faultName>+
+ </Conditions>+
+ <Actions>...+
but this does not seem to work.
Anyone know what "tests" are possible, and\or have used a "contains" expression in their Fault Policy?
Thanks in advance,
Eric
Example of the fault that I am trying to "catch".
+<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">+
+<part name="code">+
+<code>ESBMessageProcessingFailed</code>+
+</part><part name="summary"><summary>exception on JaxRpc invoke:+
start fault message:
+801 Error validating amount. Must be numerical and greater than 0 [000]+
+:end fault message</summary>+
+</part><part name="detail"><detail>null</detail>+
+</part></remoteFault>+
I did try to add namespace but it still didn't catch the fault.
I contacted Oracle support and they indicated that the syntax is: $fault.part/<xpath expression>
So for my purposes I needed to put: <test>$fault.summary/contains(summary, "xyz")</test>
HOWEVER this did not work. We recontacted Oracle and this time they admitted there is a bug that they will document. Only = or != can be used at this time.
Thanks for all who responded. I'm closing this question.
For reference, here's a list of what I tried:
The following did NOT catch my fault
<test>$fault.summary/contains(summary, "JaxRpc invoke")</test>
<test>$fault.summary/contains(summary, 'start fault message:')</test>
<test>$fault.code/contains(code, "ProcessingFail")</test>
<test>$fault.code/contains(code, "ESBMessageProcessingFailed")</test>
<test>$fault.code/contains(code/code, "ESBMessageProcessingFailed")</test>
<test>$fault.code/contains($fault.code, "ESBMessageProcessingFailed")</test>
<test>$fault.code/contains($fault.code/code, "ESBMessageProcessingFailed")</test>
<test>$fault.code/code/contains(code, "ESBMessageProcessingFailed")</test>
<test>$fault.code/code/contains($fault.code/code/, "ESBMessageProcessingFailed")</test>
<test>$fault.code/code/contains(code/code/, "ESBMessageProcessingFailed")</test>
<test>$fault.code/contains(/remoteFault/part[1]/code/, "ESBMessageProcessingFailed")</test>
<test>contains($fault.code/code,"ESB")</test>
<test>contains($fault.summary/summary,"ESB")</test>
<test>contains($fault.summary, "ESB")</test>
<test>contains($fault.summary/summary, 
)</test>
<test>xp20:matches($fault.summary/summary,'.*fault message.*')</test>
<test>xp20:matches($fault.summary/summary,'*fault message*')</test>
<test>not(xp20:matches($fault.summary/summary,'.*xyz.*'))</test>
<test>true()</test>
Similar Messages
-
BPEL fault policy takes more time, when rethrowing
Hi All,
I have a scenario where BPEL fault policy is taking more time to re-throw the fault back to BPEL
Scenario:
1) Partner link service throws as business exception
2) This exception is first caught by BPEL fault policy, this in-turn will invoke "oracle.apps.aia.core.eh.BPELJavaAction" & then it is re-throw's back to BPEL process. Then time while rethrow'n back to BPEL process it taking too much time.
Environment:
SOA suite : Version 10.1.3.4.0 with AIA
Hi all , any updates on this
Edited by: user535670 on Aug 19, 2009 7:43 PMAbap team debugged and found out that there was an issue with RFC in ECC system.
RFC connection was not working. it was causing the flow to wait for 1 mins. Basis fixed the issue to make RFC working. now interface works without connection time out. -
BPEL - Fault Policy Management
Hi All
I trying to implement the fault policy management in oracle soa suite 10.1.3.5 and
I am facing a problem in it.
I have defined the process level policies in the fault-bindings.xml file as shown below and its not working.
<faultPolicyBindings>
<process faultPolicy="NICBPELFaultPolicy">
<name>mainCalcProcess2</name>
</process>
<process faultPolicy="RetryPolicy">
<name>addMainProcess</name>
</process>
</faultPolicyBindings>
is it a correct way of fault handling?
Regards
Senthil RSathish Venkatr... wrote:
Hi,
Could you provide me the details of testing this Fault policy.
You can handle the fault policy at process level and domain level, it looks like you are trying to have fault policy at <font face="tahoma,verdana,sans-serif" size="1" color="#000">Domain</font> level.
You have defined the Fauilt at domain level by defining in fault-bindings.xml file.
Have you restarted the server after defining this fault? If yes how are you testing this fault?
Thanks
SathishI got more deep understanding about this part, Thanks for your explanation! Nice writing. -
BPEL 10.1.3.5 Fault Management - Using Xpath in Fault Policy conditions
Hi all.
I have a requirement to use the xpath functions "contais" and "upper-case" inside a condition in a fault policy file. I've done some tests and didn't get successful results so far.
My first test using the policy file was the following:
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:ebsv1="http://www.claro.com.br/EBS/Claro/v1"
xmlns:ebov1="http://www.claro.com.br/EBO/Claro/v1"
name="ebsv1:TechnicalFault">
<condition>
*<test>$fault.TechnicalFault/ebsv1:TechnicalFault/ebov1:message = 'TE-0001'</test>*
<action ref="ora-human-intervention" />
</condition>
In this first test I used a simple expression just to test the overall namespace declarations and xpath navigation. It worked as expected.
Second, I modified the test to use the "contais" function. I need to use this function because my message will eventually contain the value 'TE-0001' mixed with other string:
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:ebsv1="http://www.claro.com.br/EBS/Claro/v1"
xmlns:ebov1="http://www.claro.com.br/EBO/Claro/v1"
name="ebsv1:TechnicalFault">
<condition>
*<test>contains($fault.TechnicalFault/ebsv1:TechnicalFault/ebov1:message, 'TE-0001')</test>*
<action ref="ora-human-intervention" />
</condition>
In this second test I allways get FALSE results, meaning that this expression may not be correct. I'm certain that this should be evaluated to TRUE as the test scenario is the same as the first test. Is there something missing?? I turned on debug level log in the domain but didn't find any hint about the fault management processing.
Besides the use of the contains function, it would be nice if I'm able use the function upper-case. Something like this:
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:ebsv1="http://www.claro.com.br/EBS/Claro/v1"
xmlns:ebov1="http://www.claro.com.br/EBO/Claro/v1"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
name="ebsv1:TechnicalFault">
<condition>
*<test>contains(xp20:upper-case($fault.TechnicalFault/ebsv1:TechnicalFault/ebov1:message), 'TE-0001')</test>*
<action ref="ora-human-intervention" />
</condition>
Any ideas???
Thanks
DenisHi again.
Has anyone been able to use any kind of Xpath function inside a policy file? If so, could you please share the code fragment including the namespace declarations and the conditions?
Does anyone know if Fault Management Framework at least support the use of Xpath functions?
Thanks.
Denis -
EDN not available throws runtimeFault - Fault Policy Framework unable to catch it
Hi Team,
I have been working on some error handling scenarios for EDN .
From my observation if BPEL is used to publish the event, BPEL Fault policy cannot catch EDN errors (e.g., EDN unavailable) but BPEL catch activity can catch it.
Steps performed :
1. Create a BPEL to publish the event to EDN.
2.Create fault policy to catch BPEL runtime fault .
3.Go to weblogic console to change EDNdatasource target to get "EDN datasource not available error".
4.Test your BPEL.
My requirement is to retry such faults and invoke human intervention after retry failure using BPEL.
Please let me know how to achieve thisFollow the oracle documentation
- http://docs.oracle.com/cd/E28271_01/dev.1111/e10224/bp_faults.htm#BABIGGIB
*The fault management framework catches all faults (business and runtime) for an invoke activity.*
Hope that helps.
P.S. The fault management framework main purpose is to define a enterprise wide standard policies to handle the faults that will be applied to various/all composite. Hence your specific fault that is specific to a composite should not creep into to fault management framework as this is not the enterprise standard i.e., every composite may have to handle the invalid variable, based on where it occurred and for what variable it occurred. -
Wht happens when we say retry and rethrow in fault policy?
Hi All,
Can any one explain me on retry and rethrow in bpel fault policy?
wht i mean if a binding/remote fault occurs then how the flow of a fault will be executed. if a retry is there then how many retries? and if that retries r finished then wht happens?Please refer to this thread, Re: wht is retry and rethrow in AIA fault policies
-
BPEL 11g fault policy action java class not sending email
Hi All,
I am trying to attach fault policy to my bpel process. The fault conditions are working fine but the email part from the action class is not able to send email. The code execute properly , i can't see any error message in the log but I cant access the email in my inbox.
I am able to send email from using email bpel activity and also test work flow notification from em console.
I have used both the java options for sending email like javax.mail and oracle.sdp.messaging .
JAVA CODE FOR EMAIL javax.mail
public String handleFault(IFaultRecoveryContext iFaultRecoveryContext){
//Print Fault Meta Data to Console
System.out.println("****************Fault Metadata********************************");
System.out.println("Fault policy id: " + iFaultRecoveryContext.getPolicyId());
System.out.println("Fault type: " + iFaultRecoveryContext.getType());
System.out.println("Partnerlink: " + iFaultRecoveryContext.getReferenceName());
System.out.println("Port type: " + iFaultRecoveryContext.getPortType());
System.out.println("**************************************************************");
//print all properties defined in the fault-policy file
System.out.println("Properties Set for the Fault");
//Print Fault Details to Console if it exists
System.out.println("****************Fault Details********************************");
// if(iFaultRecoveryContext instanceof BPELFaultRecoveryContextImpl)
BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
System.out.println("Fault: " + bpelCtx.getFault());
System.out.println("Activity: " + bpelCtx.getActivityName());
System.out.println("Composite Instance: " + bpelCtx.getCompositeInstanceId());
System.out.println("Composite Name: " + bpelCtx.getCompositeName());
System.out.println("***********************************************************");
try {
bpelCtx.addAuditTrailEntry("Sending Email...");
Map props = iFaultRecoveryContext.getProperties();
if (props != null && props.size() > 0) {
setFrom(getParameterValue((ArrayList)props.get("from")));
setTo(getParameterValue((ArrayList)props.get("to")));
setSubject(getParameterValue((ArrayList)props.get("subject")) + bpelCtx.getTitle());
setText(getParameterValue((ArrayList)props.get("text")) + "\n" + "BPEL Process Instance: " + bpelCtx.getInstanceId() + " needs intervention to recover from a technical exception: " + bpelCtx.getFault().getMessage() + ".\n" + "Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.\n" + "This message was automatically generated, please do not reply to it.");
setHost(getParameterValue((ArrayList)props.get("host")));
setPort(getParameterValue((ArrayList)props.get("port")));
bpelCtx.addAuditTrailEntry("to Email getFrom..."+getFrom());
bpelCtx.addAuditTrailEntry("to Email getTo..."+getTo());
bpelCtx.addAuditTrailEntry("to Email getText..."+getText());
bpelCtx.addAuditTrailEntry("to Email getHost..."+getHost());
bpelCtx.addAuditTrailEntry("to Email getPort..."+getPort());
Session mailSession = Session.getDefaultInstance(properties);
Message simpleMessage = new MimeMessage(mailSession);
bpelCtx.addAuditTrailEntry("to Email toAddresses2...");
InternetAddress fromAddress = new InternetAddress(from);
bpelCtx.addAuditTrailEntry("to Email fromAddress..."+fromAddress);
simpleMessage.setFrom(fromAddress);
String[] toAddresses = to.split(";");
if (toAddresses != null && toAddresses.length > 0)
bpelCtx.addAuditTrailEntry("to Email toAddresses3...");
InternetAddress[] toInternetAddresses =new InternetAddress[toAddresses.length];
for (int i = 0; i < toAddresses.length; i++)
bpelCtx.addAuditTrailEntry("to Email toAddresses4444..."+ toAddresses);
toInternetAddresses[i] = new InternetAddress(toAddresses[i]);
bpelCtx.addAuditTrailEntry("to Email toInternetAddresses..."+ toInternetAddresses[i]);
simpleMessage.setRecipients(RecipientType.TO,toInternetAddresses);
simpleMessage.setSubject(subject);
simpleMessage.setText(text);
Transport.send(simpleMessage);
bpelCtx.addAuditTrailEntry("After Email...");
} catch (Exception e) {
bpelCtx.addAuditTrailEntry("fault Message:" + e.getMessage());
//Custom Code to Log Fault to File/DB/JMS or send Emails etc.
return "Manual";
private String getParameterValue(ArrayList parameterList) {
String value = null;
if (parameterList != null && parameterList.size() > 0)
value = (String)parameterList.get(0);
return value;
JAVA CODE FOR EMAIL oracle.sdp.messaging
private void sendMail(IFaultRecoveryContext iFaultRecoveryContext) {
BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
bpelCtx.addAuditTrailEntry("In sendMail...");
Map<String, Object> params = new HashMap<String, Object>();
// params.put(key, value); // if optional parameters need to be specified.
MessagingClient messagingClient;
try {
bpelCtx.addAuditTrailEntry("In sendMail111...");
messagingClient =
MessagingClientFactory.createMessagingClient(params);
Message newMessage = MessagingFactory.createMessage();
// newMessage.setContent(createEventPayload(iFaultRecoveryContext),"text/plain");
newMessage.setContent("Component Name :"+bpelCtx.getComponentName()+ "\n Instacne Id :"+bpelCtx.getComponentInstanceId()+
"\n Composite Instance Id :"+bpelCtx.getCompositeInstanceId()+ "\n Composite Name :" bpelCtx.getCompositeName()
"\n Activity name :"+bpelCtx.getActivityName() + "\n Activity Id :" bpelCtx.getActivityId() "\n ECID :" bpelCtx.getECID()
"\n Reference Name :"+bpelCtx.getReferenceName()+ "\n Title :" bpelCtx.getTitle()
"\n Fault :" + bpelCtx.getFault()+ "\n Port Name :"+bpelCtx.getPortType(), "text/plain");
bpelCtx.addAuditTrailEntry("In sendMail222...");
Address sender = MessagingFactory.createAddress(getFrom());
bpelCtx.addAuditTrailEntry("In sendMail sender..."+sender.toString());
bpelCtx.addAuditTrailEntry("from Email..."+getFrom());
String recipientsStr[] = to.split(";");
bpelCtx.addAuditTrailEntry("to Email..."+getTo());
bpelCtx.addAuditTrailEntry("In sendMail333...");
Address[] recipients = MessagingFactory.createAddress(recipientsStr);
bpelCtx.addAuditTrailEntry("In sendMail444...");
newMessage.addSender(sender);
messagingClient.registerAccessPoint(MessagingFactory.createAccessPoint(sender));
newMessage.addAllRecipients(recipients);
bpelCtx.addAuditTrailEntry("In sendMail5555...");
newMessage.getMessageInfo().setSession(MessageSessionType.INBOUND_SESSION);
newMessage.setSubject(getSubject());
bpelCtx.addAuditTrailEntry("Subject..."+getSubject());
String messageId = "";
bpelCtx.addAuditTrailEntry("In sendMail666...");
synchronized (this) {
bpelCtx.addAuditTrailEntry("In sendMail777...");
messageId = messagingClient.send(newMessage);
bpelCtx.addAuditTrailEntry("In sendMail888...");
Status[] statuses = messagingClient.getStatus(messageId);
bpelCtx.addAuditTrailEntry("In sendMail999...");
} catch (MessagingException e) {
bpelCtx.addAuditTrailEntry("inside exception email fault Message:" + e.getMessage());
//e.printStackTrace();
MESSAGES FROM SOA SERVER OUT LOG after test the bpel process:
===========================================
****************Fault?Metadata********************************
Fault?policy?id:?SimpleFaultPolicy
Fault?type:?bpel
Partnerlink:?Service1
Port?type:?{http://kacst.edu.sa/process/nstip/coPINotifyProcess}kacst_process_nstipCoPIMotifyProcess
Properties?Set?for?the?Fault
****************Fault?Details********************************
Fault:?com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
,detail=<detail><exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</exception>
</detail>
,code=<code>env:Server</code>}
Activity:?Invoke1
Composite?Instance:?740332
Composite?Name:?TestBPELFaultPolicy
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
220 taisirsit.kacst.edu.sa ESMTP Sendmail 8.14.4+Sun/8.14.4; Fri, 12 Oct 2012 13:00:45 +0300 (AST)
DEBUG SMTP: connected to host "localhost", port: 25
EHLO taisirsit.kacst.edu.sa
250-taisirsit.kacst.edu.sa Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "EXPN", arg ""
DEBUG SMTP: Found extension "VERB", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "DELIVERBY", arg ""
DEBUG SMTP: Found extension "HELP", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<[email protected]>
250 2.1.0 <[email protected]>... Sender ok
RCPT TO:<[email protected]>
250 2.1.5 <[email protected]>... Recipient ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: [email protected]
DATA
354 Enter mail, end with "." on a line by itself
From: [email protected]
To: [email protected]
Message-ID: <[email protected].sa>
Subject: SOA EXCEPTIONInstance #890381 of BPELProcess1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Testing Email From Fault
BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
,detail=<detail><exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</exception>
</detail>
,code=<code>env:Server</code>}
Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.
This message was automatically generated, please do not reply to it.
250 2.0.0 q9CA0j30012424 Message accepted for delivery
QUIT
221 2.0.0 taisirsit.kacst.edu.sa closing connection
Details from Instance of BPEL PROCESS :
Started invocation of operation "process" on partner "Service1".
Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Invoked handleBPELFault on custom java action class "com.kacst.fault.CustomFaultHandler".
Oct 12, 2012 10:00:45 AM Sending Email...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email getText...Testing Email From Fault BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary> ,detail=<detail><exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</exception> </detail> ,code=<code>env:Server</code>} . Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible. This message was automatically generated, please do not reply to it.
Oct 12, 2012 10:00:45 AM to Email getHost...smtp.kacst.edu.sa
Oct 12, 2012 10:00:45 AM to Email getPort...25
Oct 12, 2012 10:00:45 AM to Email toAddresses2...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email toAddresses3...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM After Email...
Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Marked Invoke activity as "pending manual recovery".
Oct 12, 2012 10:00:45 AM Faulted while invoking operation "process" on provider "Service1".
Please suggest.
ThanksHi,
I got the solution. our email server is sending email to the mail accounts those are in the same domain but for different domains its not able to send the email.
you can try with the email those are created on the same email server.
Thanks
Tuku -
XPath expression test possibilities in Fault Policy file
Hi All,
It would be a great help if someone can show me a way to implement the next case:
I have the next scenario, in a fault policies file I have different actions to execute for the same fault andI have to choose what action will be executed checking a value that has not relation with the $fault variable. The value indicates the number of retries that I have to try the invocation. This is the code, but this code is not working. Anybody knows how to declare the variable to be accesible in the fault policy?
Thanks in advance,
<Conditions>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
<condition>
<test>$Var=1</test>
<action ref="ora-retry-one"/>
</condition>
<condition>
<test>$Var=2</test>
<action ref="ora-retry-two"/>
</condition>
<condition>
<test>$Var=3</test>
<action ref="ora-retry-three"/>
</condition>
</faultName>
<Conditions>
<Actions>
<Action id="ora-retry-one">
<retry>
<retryCount>5</retryCount>
<retryInterval>2</retryInterval>
<exponentialBackoff>1</exponentialBackoff>
</retry>
</Action>
<Action id="ora-retry-two">
<retry>
<retryCount>7</retryCount>
<retryInterval>2</retryInterval>
<exponentialBackoff>1</exponentialBackoff>
</retry>
</Action>
<Action id="ora-retry-three">
<retry>
<retryCount>9</retryCount>
<retryInterval>2</retryInterval>
<exponentialBackoff>1</exponentialBackoff>
</retry>
</Action>
</Actions>
</faultPolicy>
</faultPolicies>Hi,
Here is an example of the possible solution:
In fault policy file:
<Conditions>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:remoteFault">
<condition>
<test>"my_xpath:getRetryCount()=number(1)"</test> (getRetryCount is a custom XPath that returns the number of retries)
<action ref="ora-retry_1"/>
</condition>
<condition>
<test>"my_xpath:getRetryCount()=number(2)"</test>
<action ref="ora-retry_2"/>
</condition>
<condition>
<test>"my_xpath:getRetryCount()=number(3)"</test>
<action ref="ora-retry_3"/>
</condition>
<Actions>
<Action id="ora-retry_1">
<retry>
<retryCount>1</retryCount>
<retryInterval>1</retryInterval>
<exponentialBackoff>1</exponentialBackoff>
</retry>
</Action>
<Action id="ora-retry_2">
<retry>
<retryCount>2</retryCount>
<retryInterval>1</retryInterval>
<exponentialBackoff>1</exponentialBackoff>
</retry>
</Action>
<Action id="ora-retry_3">
<retry>
<retryCount>3</retryCount>
<retryInterval>1</retryInterval>
<exponentialBackoff>1</exponentialBackoff>
</retry>
</Action>
The problem of this solution is that the number of retries is finite but I don't know other way to do it.
Cheers -
Fault Management Framework - How to use test conditions
I am building a fault policy file based on an external service that generates custom SOAP faults. I want to query a value in these faults but I don't know how to construct the test condition.
I can find plenty of documented examples e.g.
<Conditions>
<faultName
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:remoteFault”>
<condition>
*<test>$fault.code="3220"</test>*
<action ref="ora-retry"/>
</condition>
</faultName>
But where can I find the $fault object to know how to create the xpath expression?
This is my business fault logged in Enterprise Manager -
<bpelFault>
<faultType>1</faultType>
<FaultManagementFrameworkService xmlns="http://yorkshirewater.com/faultmanagementframeworkservice/">
<part name="fault">
<ns0:FaultManagementFrameworkServiceFault xmlns:ns0="http://yorkshirewater.com/faultmanagementframeworkservice/">
*<FaultCode>001</FaultCode>*
<FaultCategory>ConnectionException</FaultCategory>
<FaultDescription>Not Found</FaultDescription>
<ServiceName>FaultManagementFrameworkService</ServiceName>
<Operation>CreateConnectionError</Operation>
<User><anonymous></User>
</ns0:FaultManagementFrameworkServiceFault>
</part>
</FaultManagementFrameworkService>
</bpelFault>
I want to access the FaultCode value but can only currently capture all errors e.g.
<Conditions>
<faultName xmlns:osb="http://yorkshirewater.com/faultmanagementframeworkservice/" name="osb:FaultManagementFrameworkService">
<condition>
<action ref="ora-human-intervention"/>
</condition>
</faultName>The code 3220 is just a copy from some Oracle documentation of an example test case.
What I really want to do is get a value from my own business error e.g.
<bpelFault>
<faultType>1</faultType>
<FaultManagementFrameworkService xmlns="http://yorkshirewater.com/faultmanagementframeworkservice/">
<part name="fault">
<ns0:FaultManagementFrameworkServiceFault xmlns:ns0="http://yorkshirewater.com/faultmanagementframeworkservice/">
<FaultCode>001</FaultCode>
<FaultCategory>ConnectionException</FaultCategory>
<FaultDescription>Not Found</FaultDescription>
<ServiceName>FaultManagementFrameworkService</ServiceName>
<Operation>CreateConnectionError</Operation>
<User><anonymous></User>
</ns0:FaultManagementFrameworkServiceFault>
</part>
</FaultManagementFrameworkService>
</bpelFault>
If I use the following in my fault policy it will pick up all errors on the service (using Oracle Service Bus and a service call) -
<Conditions>
<faultName xmlns:osb="http://yorkshirewater.com/faultmanagementframeworkservice/" name="osb:FaultManagementFrameworkService">
<condition>
<action ref="ora-human-intervention"/>
</condition>
</faultName>
But I would actually like to drill down further and query the FaultCode value (001 in the above example) -
<Conditions>
<faultName xmlns:osb="http://yorkshirewater.com/faultmanagementframeworkservice/" name="osb:FaultManagementFrameworkService">
<condition>
<test>$fault.fault/osb:FaultManagementFrameworkServiceFault/osb:FaultCode="001"</test>
<action ref="ora-human-intervention"/>
</condition>
</faultName>
Am I trying to do something that's not possible? If so how do you apply test conditions for business errors? -
Fault policy doesn't fire when asynchronous calls to BPEL in soa11g
Hi,
I have created mainporcess and subprocess both are asynchronous process . exceptions thrown by subprocess are caught in mainprocess using call back operation and fault policy defined in fault-polacy/binding doesn't fire .
if the subprocess is synchronous exceptions thrown by subprocess are caught in mainprocess and creating human-intervention job for Retry action as defined in fault-polacy/binding.
Generally how we can handle custom Faults in A asynchronous calls to composites/BPEL processes?
Thanks
RaviHi ,Milan
Thanks for your response . in subprocess callback port having two operations processResponse,callbackexception
<wsdl:portType name="BPELProcessAsynchDetailsCallback">
<wsdl:operation name="processResponse">
<wsdl:input message="client:BPELProcessAsynchDetailsResponseMessage"/>
</wsdl:operation>
<wsdl:operation name="callbackexception">
<wsdl:input message="client:FaultMessage"/>
</wsdl:operation>
</wsdl:portType>>
Any exeptions thrown by suborocess is calling callbackexception operation and main process having pick activity for receiving both processResponse and callbackexception operations.
subprocessdetails:
<faultHandlers>
<catch faultName="bpelx:remoteFault" faultVariable="FaultVar">
<sequence>
<assign name="Assign2">
<copy>
<from expression="'code'"/>
<to variable="Invoke1_callbackexception_InputVariable"
part="payload"
query="/client:FaultElement/client:code"/>
</copy>
<copy>
<from expression="'summary'"/>
<to variable="Invoke1_callbackexception_InputVariable"
part="payload"
query="/client:FaultElement/client:summary"/>
</copy>
<copy>
<from expression="'details'"/>
<to variable="Invoke1_callbackexception_InputVariable"
part="payload"
query="/client:FaultElement/client:detail"/>
</copy>
</assign>
<invoke name="Invoke1"
inputVariable="Invoke1_callbackexception_InputVariable"
partnerLink="bpelprocessasynchdetails_client"
portType="client:BPELProcessAsynchDetailsCallback"
operation="callbackexception"
bpelx:invokeAsDetail="no"/>
</sequence>
</catch>
</faultHandlers>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcessAsynchDetails.wsdl) -->
<receive name="receiveInput" partnerLink="bpelprocessasynchdetails_client" portType="client:BPELProcessAsynchDetails" operation="process" variable="inputVariable" createInstance="yes"/>
<!--
Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
-->
<switch name="Switch1">
<case condition="bpws:getVariableData('inputVariable','payload','/client:process/client:input')='test'">
<bpelx:annotation>
<bpelx:pattern>test</bpelx:pattern>
<bpelx:general>
<bpelx:property name="userLabel">test</bpelx:property>
</bpelx:general>
</bpelx:annotation>
<sequence>
<empty name="Empty1"/>
<throw name="Throw1" faultName="bpelx:remoteFault"
faultVariable="FaultVar"/>
</sequence>
</case>
<otherwise>
<assign name="Assign1">
<copy>
<from variable="inputVariable" part="payload"
query="/client:process/client:input"/>
<to variable="outputVariable" part="payload"
query="/client:processResponse/client:result"/>
</copy>
</assign>
</otherwise>
</switch>
<invoke name="Invoke2" bpelx:invokeAsDetail="no"
inputVariable="outputVariable"
partnerLink="bpelprocessasynchdetails_client"
portType="client:BPELProcessAsynchDetailsCallback"
operation="processResponse"/>
</sequence>
mainprocesdetails:
<faultHandlers>
<catch faultName="bpelx:remoteFault" faultVariable="Variable1"/>
</faultHandlers>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1ASynch.wsdl) -->
<receive name="receiveInput" partnerLink="bpelprocess1asynch_client" portType="client:BPELProcess1ASynch" operation="process" variable="inputVariable" createInstance="yes"/>
<!--
Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
-->
<assign name="Assign1">
<copy>
<from variable="inputVariable" part="payload"
query="/client:process/client:input"/>
<to variable="Invoke1_process_InputVariable" part="payload"
query="/ns1:process/ns1:input"/>
</copy>
</assign>
<invoke name="Invoke1" bpelx:invokeAsDetail="no"
inputVariable="Invoke1_process_InputVariable"
partnerLink="BPELProcessAsynchDetails.bpelprocessasynchdetails_client"
portType="ns1:BPELProcessAsynchDetails" operation="process"/>
<pick name="Pick1">
<onMessage variable="OnMessage_processResponse_InputVariable"
partnerLink="BPELProcessAsynchDetails.bpelprocessasynchdetails_client"
portType="ns1:BPELProcessAsynchDetailsCallback"
operation="processResponse">
<sequence name="Sequence2">
<assign name="Assign3">
<copy>
<from variable="OnMessage_processResponse_InputVariable"
part="payload"
query="/ns1:processResponse/ns1:result"/>
<to variable="outputVariable" part="payload"
query="/client:processResponse/client:result"/>
</copy>
</assign>
</sequence>
</onMessage>
<onMessage variable="OnMessage_callbackexception_InputVariable"
partnerLink="BPELProcessAsynchDetails.bpelprocessasynchdetails_client"
portType="ns1:BPELProcessAsynchDetailsCallback"
operation="callbackexception">
<sequence name="Sequence1">
<throw name="Throw1" faultName="bpelx:remoteFault"
faultVariable="Variable1"/>
</sequence>
</onMessage>
</pick>
<invoke name="callbackClient" partnerLink="bpelprocess1asynch_client" portType="client:BPELProcess1ASynchCallback" operation="processResponse" inputVariable="outputVariable"/>
</sequence> -
Hi,
We are using oracle SOA suite 11g (11.1.1.3.0)
I'm trying to configure a fault-policy file so that it first retries 20 times every 20 secs, then reties 20 times every 10 minutes, then retries 23 times every hour, then retries 24 times every 6 hours and if the fault persists call a java action to send an email and then go to human-intervention. It seems however that only the first retry is executed. The rest ones are ignored and the action following the first retry failure is the Java Action. The fault-policy is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<faultPolicy version="0.0.1" id="TransferResponsibilityRequestProcessFaults"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Conditions>
<faultName xmlns:freeze="http://rom/cosmote/bpel/webservice/util" name="freeze:BpelWSFault">
<condition>
<action ref="ora-human-intervention"/>
</condition>
</faultName>
<faultName xmlns:retry="http://rom/cosmote/bpel/webservice" name="retry:PendingRequestsFault">
<condition>
<action ref="ora-retry-20sec"/>
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="ora-retry-20sec">
<retry>
<retryCount>10</retryCount>
<retryInterval>20</retryInterval>
<retryFailureAction ref="ora-retry-10min"/>
</retry>
</Action>
<Action id="ora-retry-10min">
<retry>
<retryCount>10</retryCount>
<retryInterval>600</retryInterval>
<retryFailureAction ref="ora-retry-1hour"/>
</retry>
</Action>
<Action id="ora-retry-1hour">
<retry>
<retryCount>23</retryCount>
<retryInterval>3600</retryInterval>
<retryFailureAction ref="ora-retry-6hour"/>
</retry>
</Action>
<Action id="ora-retry-6hour">
<retry>
<retryCount>24</retryCount>
<retryInterval>21600</retryInterval>
<retryFailureAction ref="ora-java"/>
</retry>
</Action>
<Action id="ora-java">
<javaAction className="gr.cosmote.bpel.util.JavaActionInCaseOfRetryFails"
defaultAction="ora-human-intervention">
<returnValue value="RETURNED" ref="ora-human-intervention"/>
</javaAction>
</Action>
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>
</Actions>
</faultPolicy>
</faultPolicies>
Is retrying with various intervals only done by using the tag <exponentialBackoff/>?
Thanks for any response.I had a similar requirement, although not as elaborate as yours. After I failed to figure it out myself I filed a SR. Basically, you cannot restart a retry block after the first execution to avoid an infinite loop.
If you need to send the e-mail after the 23rd hour, why not just retry until the 23rd hour and send an e-mail? -
Hello,
i configured the fault policy with the folllowing values:
<Action id="ora-retry">
<retry>
<retryCount>60</retryCount>
<retryInterval>1</retryInterval>
</retry>
</Action>
But when i look at the audit-tab in the BPEL-Console, i see only 50 retries, until the action fails.
Has retryCount a maximum of 50 retries?
Best regards and thanks for your help
FriedrichHi again.
Has anyone been able to use any kind of Xpath function inside a policy file? If so, could you please share the code fragment including the namespace declarations and the conditions?
Does anyone know if Fault Management Framework at least support the use of Xpath functions?
Thanks.
Denis -
Fault policy does not work when throwing remoteFault in bpel
Hi
I have a BPEL-proces in which I throw a remoteFault.
In the fault-policy there is a condition for this fault
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:remoteFault">
<condition>
<action ref="ora-java"/>
</condition>
</faultName>
But the fault-policy does not work if I throw this remoteFault in de bpel. But when I invoke another service (which is shutdown), then I get a remoteFault and for this remoteFault the fault-policy works well.
Any idea why the fault-policy does not work when I throw the remoteFault?
RegardsBPEL fault works only on invocation failures.
Fault management will work based on the remote fault from the remote service, you cannot throw remote fault from bpel and capture that in fault management and process.
The following are the actions that we can take on faults.
1. Human Intervention
2. Rethrow [rethrowFault]
3. Termination [abort]
4. Replay Fault [replayScope]
5. Custom Java Action [javaAction]
6. Retry [retry]
Hope this helps !!!
Thanks,
Vijay -
Why is Fault Policy working only when the BPEL's transaction is requiresNew
Hi All
I've defined Fault policy & fault bindings files for faults in my BPEL process. I'm using Oracle SOA Suite 11g.
But the fault management framework is properly working only when the transaction property(bpel.config.transaction) of the BPEL is set to "requiresNew" in composite.xml
When i modify it ot required, its not working, i.e. it is waiting for some period and erroring out. I could not manage these errors from the EM as we do for those in Fault Management Framework.
Why is this behavior?
I went thru this article, but could not understand it
Transaction and Fault Propagation Semantics in BPEL Processes(http://docs.oracle.com/cd/E21764_01/integration.1111/e10224/soa_transactions.htm)
Can someone pls explain this.
Regards
RaviKiran.Please refer http://docs.oracle.com/cd/E21764_01/integration.1111/e10224/soa_transactions.htm
Thanks,
S -
Hi,
Can we use BPEL Console/Admin to edit fault policy file? I didn't find a way though.. I assume it should be possible using Console/Admin ...
Please let me know ..
RanjithI believe it is not possible atleast in 10.1.3.3 version, Oracle might support this in later version.
Have you seen the demo of Oracle CAB, I believe they wrote some JSP to view/edit these policies. (Not sure it may be just for ESB).
Regards,
Chintan
Maybe you are looking for
-
Fonts in PDF created from Pages doesn't present correctly on Windows PCs
The fonts documents that I'm creating in Pages and then converting to PDF, aren't presenting properly to people using Windows PC's. Some of the fonts are "wonky". What I'm doing is creating documents in Pages and then creating PDF's either by Print,
-
Video mix mixer mixing software for Mac
I need to mix text slides (jpg) with live video before it is recorded or sent to Ustream. I need a video mixing software for Mac.
-
Event id 8010 - Document Management Server
Still got issues with this 8010 event id : "Content Organizer processing for site http://mysite/personal/<username> encountered an error. Error: Exception of type 'System.ArgumentException' was thrown." and this: "Content Organizer processing for s
-
Shiiping/Export mapping problem in SAP B1
Hi all: My present client(SE) has a case of transaction where in for the case of Export they based on Sales Order they directly use to create A/R Invoice (Commercial) after which they send this Commercial Invoice to Exporter(agent) who further book t
-
Deactivating a particular Account Assignment Category for a Pur. Orgn.
Hi, We want to deactivate a particular account assignment category for a particular purchasing organisation. Can any one please throw some light on it??