ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r582571 - in /ode/trunk: bpel-api/src/main/java/org/apache/ode/bpel/evt/ bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ bpel-schemas/src/main/xsd/
Date Sun, 07 Oct 2007 01:03:44 GMT
Author: vanto
Date: Sat Oct  6 18:03:43 2007
New Revision: 582571

URL: http://svn.apache.org/viewvc?rev=582571&view=rev
Log:
Closing ODE-187

Added:
    ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/evt/ActivityDisabledEvent.java
Modified:
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java
    ode/trunk/bpel-schemas/src/main/xsd/pmapi.xsd

Added: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/evt/ActivityDisabledEvent.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/evt/ActivityDisabledEvent.java?rev=582571&view=auto
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/evt/ActivityDisabledEvent.java (added)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/evt/ActivityDisabledEvent.java Sat
Oct  6 18:03:43 2007
@@ -0,0 +1,28 @@
+/*
+ * 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.evt;
+
+/**
+ * Event sent when DPE disables this activity.
+ */
+public class ActivityDisabledEvent extends ActivityEvent {
+
+	private static final long serialVersionUID = 1L;
+  
+}

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java?rev=582571&r1=582570&r2=582571&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java
(original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java
Sat Oct  6 18:03:43 2007
@@ -25,6 +25,7 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.ode.bpel.evt.ActivityDisabledEvent;
 import org.apache.ode.bpel.evt.ActivityEnabledEvent;
 import org.apache.ode.bpel.evt.ActivityEvent;
 import org.apache.ode.bpel.evt.ActivityExecEndEvent;
@@ -87,6 +88,12 @@
                 actinf.getActivityInfo().setDtEnabled(dtEnabled);
                 _activities.put(event.getActivityId(), actinf);
             }
+            if (event instanceof ActivityDisabledEvent) {
+                actinf.getActivityInfo().setStatus(TActivityStatus.DEAD);
+                Calendar dtDied = Calendar.getInstance();
+                dtDied.setTime(event.getTimestamp());
+                actinf.getActivityInfo().setDtDied(dtDied);
+            } 
             if (event instanceof ActivityExecStartEvent) {
                 actinf.getActivityInfo().setStatus(TActivityStatus.STARTED);
                 Calendar dtStarted = Calendar.getInstance();

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java?rev=582571&r1=582570&r2=582571&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java Sat Oct
 6 18:03:43 2007
@@ -18,6 +18,7 @@
  */
 package org.apache.ode.bpel.runtime;
 
+import org.apache.ode.bpel.evt.ActivityDisabledEvent;
 import org.apache.ode.bpel.evt.ActivityEvent;
 import org.apache.ode.bpel.evt.EventContext;
 import org.apache.ode.bpel.evt.ScopeEvent;
@@ -107,6 +108,7 @@
     protected void dpe(OActivity activity) {
         dpe(activity.sourceLinks);
         dpe(activity.outgoingLinks);
+        sendEvent(new ActivityDisabledEvent());
         // TODO: register listeners for target / incoming links
     }
 

Modified: ode/trunk/bpel-schemas/src/main/xsd/pmapi.xsd
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-schemas/src/main/xsd/pmapi.xsd?rev=582571&r1=582570&r2=582571&view=diff
==============================================================================
--- ode/trunk/bpel-schemas/src/main/xsd/pmapi.xsd (original)
+++ ode/trunk/bpel-schemas/src/main/xsd/pmapi.xsd Sat Oct  6 18:03:43 2007
@@ -139,6 +139,11 @@
                     <documentation>Activity is in failure state, recovery required.</documentation>
                 </annotation>
             </enumeration>
+            <enumeration value="DEAD">
+                <annotation>
+                    <documentation>Activity has been disabled by DPE.</documentation>
+                </annotation>
+            </enumeration>
         </restriction>
     </simpleType>
     <simpleType name="tScopeStatus">
@@ -442,6 +447,12 @@
                         completed.</documentation>
                 </annotation>
             </element>
+            <element name="dt-died" type="xs:dateTime" minOccurs="0">
+                <annotation>
+                    <documentation>The date/time when the activity has been
+                        eliminated.</documentation>
+                </annotation>
+            </element>
             <element name="failure" type="pmapi:tFailureInfo" minOccurs="0">
                 <annotation>
                     <documentation>Indicates activity is in the failure state and requires
recovery.</documentation>



Mime
View raw message