Author: mriou
Date: Wed Nov 29 10:57:52 2006
New Revision: 480682

URL: http://svn.apache.org/viewvc?view=rev&rev=480682
Log:
Default filtering on some events.

Modified:
    
incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java

Modified: 
incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java?view=diff&rev=480682&r1=480681&r2=480682
==============================================================================
--- 
incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java
 (original)
+++ 
incubator/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java
 Wed Nov 29 10:57:52 2006
@@ -217,15 +217,29 @@
                 if (evtSet.contains(type)) return true;
             }
         }
+        Set<BpelEvent.TYPE> evtSet = _events.get(null);
+        if (evtSet != null) {
+            // Default filtering at the process level for some event types
+            if (evtSet.contains(type)) return true;
+        }
+
         return false;
     }
 
-
     private void initEventList() {
         TProcessEvents processEvents = _pinfo.getProcessEvents();
-        // No filtering, adding all events
-        if (processEvents == null
-                || (processEvents.getGenerate() != null && 
processEvents.getGenerate().equals(TProcessEvents.Generate.ALL))) {
+        // No filtering, using defaults
+        if (processEvents == null) {
+            HashSet<BpelEvent.TYPE> all = new HashSet<BpelEvent.TYPE>();
+            for (BpelEvent.TYPE t : BpelEvent.TYPE.values()) {
+                if (!t.equals(BpelEvent.TYPE.scopeHandling) && 
!t.equals(BpelEvent.TYPE.dataHandling)) all.add(t);
+            }
+            _events.put(null,all);
+            return;
+        }
+
+        // Adding all events
+        if (processEvents.getGenerate() != null && 
processEvents.getGenerate().equals(TProcessEvents.Generate.ALL)) {
             HashSet<BpelEvent.TYPE> all = new HashSet<BpelEvent.TYPE>();
             for (BpelEvent.TYPE t : BpelEvent.TYPE.values())
                 all.add(t);


Reply via email to