Author: assaf
Date: Tue Nov 7 17:55:02 2006
New Revision: 472364
URL: http://svn.apache.org/viewvc?view=rev&rev=472364
Log:
Fixed activity recovery to work with the new compiler.
Added:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java
(with props)
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java
(with props)
incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java
(with props)
Added:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java?view=auto&rev=472364
==============================================================================
---
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java
(added)
+++
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java
Tue Nov 7 17:55:02 2006
@@ -0,0 +1,17 @@
+package org.apache.ode.bpel.compiler.bom;
+
+import javax.xml.namespace.QName;
+
+
+public abstract class ExtensibilityQNames {
+ /**
+ * Activity Recovery extensibility elements.
+ */
+ public static final String NS_ACTIVITY_RECOVERY =
"http://ode.apache.org/activityRecovery";
+ public static final QName FAILURE_HANDLING = new
QName(NS_ACTIVITY_RECOVERY, "failureHandling");
+ public static final QName FAILURE_HANDLING_RETRY_FOR = new
QName(NS_ACTIVITY_RECOVERY, "retryFor");
+ public static final QName FAILURE_HANDLING_RETRY_DELAY = new
QName(NS_ACTIVITY_RECOVERY, "retryDelay");
+ public static final QName FAILURE_HANDLING_FAULT_ON = new
QName(NS_ACTIVITY_RECOVERY, "faultOnFailure");
+
+}
+
Propchange:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensibilityQNames.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java?view=auto&rev=472364
==============================================================================
---
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java
(added)
+++
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java
Tue Nov 7 17:55:02 2006
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ode.bpel.compiler.bom;
+
+import org.w3c.dom.Element;
+
+/**
+ * BOM representation of the failure handling settings extensibility element.
+ */
+public class FailureHandling extends BpelObject {
+
+ public FailureHandling(Element el) {
+ super(el);
+ }
+
+ public int getRetryFor() {
+ RetryFor element = getFirstChild(RetryFor.class);
+ return element == null ? 0 : element.getValue();
+ }
+
+ public int getRetryDelay() {
+ RetryDelay element = getFirstChild(RetryDelay.class);
+ return element == null ? 0 : element.getValue();
+ }
+
+ public boolean getFaultOnFailure() {
+ FaultOnFailure element = getFirstChild(FaultOnFailure.class);
+ return element == null ? false : element.getValue();
+ }
+
+ static class RetryFor extends BpelObject {
+ public RetryFor(Element el) {
+ super(el);
+ }
+
+ public int getValue() {
+ String textValue = getTextValue();
+ return textValue == null ? 0 : Integer.parseInt(textValue);
+ }
+ }
+
+ static class RetryDelay extends BpelObject {
+ public RetryDelay(Element el) {
+ super(el);
+ }
+
+ public int getValue() {
+ String textValue = getTextValue();
+ return textValue == null ? 0 : Integer.parseInt(textValue);
+ }
+ }
+
+ static class FaultOnFailure extends BpelObject {
+ public FaultOnFailure(Element el) {
+ super(el);
+ }
+
+ public boolean getValue() {
+ String textValue = getTextValue();
+ return textValue == null ? false : (textValue.equals("true") ||
textValue.equals("yes"));
+ }
+ }
+}
Propchange:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/FailureHandling.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java?view=auto&rev=472364
==============================================================================
---
incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java
(added)
+++
incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java
Tue Nov 7 17:55:02 2006
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ode.bpel.o;
+
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+
+/**
+ * Holds information about the failure handling of this activity.
+ */
+public class OFailureHandling implements Serializable {
+ private static final long serialVersionUID = 5637366976949702880L;
+
+ public static final String EXTENSION_NS_URI =
"http://ode.apache.org/activityRecovery";
+ public static final QName FAILURE_FAULT_NAME = new
QName(EXTENSION_NS_URI, "activityFailure");
+ public static final QName FAILURE_EXT_ELEMENT = new
QName(EXTENSION_NS_URI, "failureHandling");
+
+ // Number of times to retry the activity if failure occurs.
+ // Defaults to zero.
+ public int retryFor;
+
+ // Time delay between retries of the activity, in seconds.
+ public int retryDelay;
+
+ // If true, fault when failure occurs, otherwise, enter activity recovery
state.
+ public boolean faultOnFailure;
+
+}
Propchange:
incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange:
incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFailureHandling.java
------------------------------------------------------------------------------
svn:mime-type = text/plain