You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2007/10/07 22:45:00 UTC

svn commit: r582679 - in /ode/trunk: bpel-api/src/main/java/org/apache/ode/bpel/eapi/ bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/...

Author: vanto
Date: Sun Oct  7 13:44:58 2007
New Revision: 582679

URL: http://svn.apache.org/viewvc?rev=582679&view=rev
Log:
OPEN - issue ODE-160: ExtensionActivity and ExtensionAssignOperation: Runtime support 
http://issues.apache.org/jira/browse/ODE-160

Added:
    ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/
    ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/AbstractExtensionBundle.java
    ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionContext.java
    ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionOperation.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EXTENSIONACTIVITY.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExtensionContextImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/channels/ExtensionResponse.java
    ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties
Modified:
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ActivityTemplateFactory.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/BpelRuntimeContext.java
    ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/CoreBpelTest.java

Added: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/AbstractExtensionBundle.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/AbstractExtensionBundle.java?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/AbstractExtensionBundle.java (added)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/AbstractExtensionBundle.java Sun Oct  7 13:44:58 2007
@@ -0,0 +1,71 @@
+/*
+ * 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.eapi;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+* Abstract class that bundles and registers <code>&lt;extensionActivity&gt;</code> and
+* <code>&lt;extensionAssignOperation&gt;</code> implementations related to a particular namespace.
+*  
+* @author Tammo van Lessen (University of Stuttgart)
+*/
+public abstract class AbstractExtensionBundle {
+	private Map<String, Class<? extends ExtensionOperation>> extensionsByName = new HashMap<String, Class<? extends ExtensionOperation>>();
+
+	/**
+	 * Returns the extension namespace this bundle provides implementations for.
+	 * @return
+	 */
+	public abstract String getNamespaceURI();
+	
+	/**
+	 * Register extension operations.
+	 */
+	public abstract void registerExtensionActivities();
+
+	/**
+	 * Register an {@link ExtensionOperation} implementation as <code>&lt;extensionActivity&gt;</code>.
+	 *
+	 * @param localName
+	 * @param activity
+	 */
+	protected final void registerExtensionOperation(String localName, Class<? extends ExtensionOperation> operation) {
+		extensionsByName.put(localName, operation);
+	}
+	
+	/**
+	 * Returns a list of the local names of registered extension operations.
+	 */
+	public final Set<String> getExtensionOperationNames() {
+		return Collections.unmodifiableSet(extensionsByName.keySet());
+	}
+
+	public final Class<? extends ExtensionOperation> getExtensionOperationClass(String localName) {
+		return extensionsByName.get(localName);
+	}
+
+	public final ExtensionOperation getExtensionOperationInstance(String localName) throws InstantiationException, IllegalAccessException {
+		return getExtensionOperationClass(localName).newInstance();
+	}
+
+}

Added: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionContext.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionContext.java?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionContext.java (added)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionContext.java Sun Oct  7 13:44:58 2007
@@ -0,0 +1,128 @@
+/*
+ * 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.eapi;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.o.OLink;
+import org.apache.ode.bpel.o.OProcess;
+import org.apache.ode.bpel.o.OScope;
+import org.w3c.dom.Node;
+
+
+/**
+ * Context for executing extension activities or extension assign operations. 
+ * Implementations of the {@link ExtensionOperation} class use this interface to access BPEL
+ * variables, property sets and link status.
+ * 
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public interface ExtensionContext {
+
+	/**
+	 * Returns a list of variables visible in the current scope.
+	 * 
+	 * @return an unmodifiable list of visible variables.
+	 * @throws FaultException
+	 */
+	Map<String, OScope.Variable> getVisibleVariables() throws FaultException;
+	
+	/**
+	 * Returns a list of links.
+	 * 
+	 * @return an unmodifiable list of visible variables.
+	 * @throws FaultException
+	 */
+	List<OLink> getLinks() throws FaultException;
+
+	/**
+     * Read the value of a BPEL variable.
+     *
+     * @param variable
+     *          variable to read
+     * @param part
+     *          the part (or <code>null</code>)
+     * @return the value of the variable, wrapped in a <code>Node</code>
+     */
+    Node readVariable(OScope.Variable variable) throws FaultException;
+    
+	/**
+     * Read the value of a BPEL variable.
+     *
+     * @param variableName
+     *          variable to read
+     * @param part
+     *          the part (or <code>null</code>)
+     * @return the value of the variable, wrapped in a <code>Node</code>
+     */
+    Node readVariable(String variableName) throws FaultException;
+
+    /**
+     * Write the value into a BPEL variable.
+     *
+     * @param variable
+     *          variable to write
+     * @param value
+     *          the value to be stored into the variable
+     * @return the value of the variable, wrapped in a <code>Node</code>
+     */
+    void writeVariable(OScope.Variable variable, Node value) throws FaultException;
+
+    /**
+     * Write the value into a BPEL variable.
+     *
+     * @param variableName
+     *          variable to write
+     * @param value
+     *          the value to be stored into the variable
+     * @return the value of the variable, wrapped in a <code>Node</code>
+     */
+    void writeVariable(String variableName, Node value) throws FaultException;
+
+    /**
+     * Read the value of a BPEL property.
+     *
+     * @param variable
+     *          variable containing property
+     * @param property
+     *          property to read
+     * @return value of the property
+     */
+    String readMessageProperty(OScope.Variable variable, OProcess.OProperty property)
+            throws FaultException;
+    
+    /**
+     * Obtain the status of a control link.
+     *
+     * @param olink
+     *          link to check
+     * @return <code>true</code> if the link is active, <code>false</code>
+     *         otherwise.
+     */
+    boolean isLinkActive(OLink olink) throws FaultException;
+    
+    /**
+     * Reads the current process instance id.
+     * @return instance id
+     */
+    Long getProcessId();
+    
+}

Added: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionOperation.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionOperation.java?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionOperation.java (added)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/eapi/ExtensionOperation.java Sun Oct  7 13:44:58 2007
@@ -0,0 +1,39 @@
+/*
+ * 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.eapi;
+
+import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.utils.SerializableElement;
+
+/**
+ * This is the basis interface for implementations of  
+ * <code>&lt;extensionAssignOperation&gt;</code> and <code>&lt;extensionActivity&gt;</code>
+ * nodes.
+ * 
+ * Implementations of this interface must provide a default constructor as they are created
+ * using reflection.
+ * 
+ * @see AbstractExtensionBundle
+ * 
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public interface ExtensionOperation {
+
+	void run(ExtensionContext context, SerializableElement element) throws FaultException;
+}

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java Sun Oct  7 13:44:58 2007
@@ -123,6 +123,8 @@
     DebuggerSupport _debugger;
 
     ExpressionLanguageRuntimeRegistry _expLangRuntimeRegistry;
+    
+    Set<String> _mustUnderstandExtensions;
 
     private ReplacementMap _replacementMap;
 
@@ -1157,6 +1159,7 @@
             _endpointToMyRoleMap = null;
             _replacementMap = null;
             _expLangRuntimeRegistry = null;
+            _mustUnderstandExtensions = null;
         }
 
         private void doHydrate() {
@@ -1184,6 +1187,23 @@
                 }
             }
             _expLangRuntimeRegistry = elangRegistry;
+
+            // Checking for registered extension bundles, throw an exception when
+            // a "mustUnderstand" extension is not available
+            _mustUnderstandExtensions = new HashSet<String>();
+            for (OProcess.OExtension extension : _oprocess.declaredExtensions) {
+            	if (extension.mustUnderstand) {
+            		if (_contexts.extensionRegistry.get(extension.namespaceURI) == null) {
+            			String msg = __msgs.msgExtensionMustUnderstandError(_pid, extension.namespaceURI);
+            			__log.error(msg);
+            			throw new BpelEngineException(msg);
+            		} else {
+            			_mustUnderstandExtensions.add(extension.namespaceURI);
+            		}
+            	} else {
+        			__log.warn("The process declares the extension namespace " + extension.namespaceURI + " that is unkown to the engine");
+        		}
+            }
 
             setRoles(_oprocess);
 

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java Sun Oct  7 13:44:58 2007
@@ -42,6 +42,9 @@
 import org.apache.ode.bpel.dao.ProcessInstanceDAO;
 import org.apache.ode.bpel.dao.ScopeDAO;
 import org.apache.ode.bpel.dao.XmlDataDAO;
+import org.apache.ode.bpel.eapi.AbstractExtensionBundle;
+import org.apache.ode.bpel.eapi.ExtensionContext;
+import org.apache.ode.bpel.eapi.ExtensionOperation;
 import org.apache.ode.bpel.evt.*;
 import org.apache.ode.bpel.iapi.BpelEngineException;
 import org.apache.ode.bpel.iapi.ContextException;
@@ -68,6 +71,7 @@
 import org.apache.ode.bpel.runtime.Selector;
 import org.apache.ode.bpel.runtime.VariableInstance;
 import org.apache.ode.bpel.runtime.channels.ActivityRecoveryChannel;
+import org.apache.ode.bpel.runtime.channels.ExtensionResponseChannel;
 import org.apache.ode.bpel.runtime.channels.FaultData;
 import org.apache.ode.bpel.runtime.channels.InvokeResponseChannel;
 import org.apache.ode.bpel.runtime.channels.PickResponseChannel;
@@ -79,6 +83,7 @@
 import org.apache.ode.utils.GUID;
 import org.apache.ode.utils.Namespaces;
 import org.apache.ode.utils.ObjectPrinter;
+import org.apache.ode.utils.SerializableElement;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.Document;
@@ -1184,4 +1189,67 @@
     public void forceFlush() {
         _forceFlush = true;
     }
+    
+	public void executeExtension(QName extensionId, ExtensionContext context, SerializableElement element, ExtensionResponseChannel extResponseChannel) throws FaultException {
+		__log.debug("Execute extension activity");
+		final String channelId = extResponseChannel.export();
+		ExtensionOperation ea = createExtensionActivityImplementation(extensionId);
+		if (ea == null) {
+			if (_bpelProcess._mustUnderstandExtensions.contains(extensionId.getNamespaceURI())) {
+				//TODO
+				__log.warn("Lookup of extension activity " + extensionId + " failed.");
+				throw new FaultException(new QName("urn:bpel20", "extlookup-failed"), "Lookup of extension activity " + extensionId + " failed.");
+			} else {
+				// act like <empty> - do nothing
+				completeExtensionExecution(channelId, null);
+				return;
+			}
+		}
+		
+		try {
+			// should be running in a pooled thread
+			ea.run(context, element);
+			completeExtensionExecution(channelId, null);
+		} catch (RuntimeException e) {
+			__log.error("Error during execution of extension activity.", e);
+			completeExtensionExecution(channelId, e);
+		} 
+	}
+
+	private void completeExtensionExecution(final String channelId, final Throwable t) {
+		if (t != null) {
+	        _vpu.inject(new BpelJacobRunnable() {
+	            private static final long serialVersionUID = -1L;
+
+	            public void run() {
+	               importChannel(channelId, ExtensionResponseChannel.class).onFailure(t);
+	            }
+	        });
+		} else {
+	        _vpu.inject(new BpelJacobRunnable() {
+	            private static final long serialVersionUID = -1L;
+
+	            public void run() {
+	               importChannel(channelId, ExtensionResponseChannel.class).onCompleted();
+	            }
+	        });
+		}
+	}
+
+	private ExtensionOperation createExtensionActivityImplementation(QName name) {
+		if (name == null) {
+			return null;
+		}
+		AbstractExtensionBundle bundle = _contexts.extensionRegistry.get(name.getNamespaceURI());
+		if (bundle == null) {
+			return null;
+		} else {
+			try {
+				return (ExtensionOperation)bundle.getExtensionOperationInstance(name.getLocalPart());
+			} catch (Exception e) {
+				return null;
+			}
+        }
+    }
+
 }

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java Sun Oct  7 13:44:58 2007
@@ -42,6 +42,7 @@
 import org.apache.ode.bpel.dao.BpelDAOConnectionFactory;
 import org.apache.ode.bpel.dao.MessageExchangeDAO;
 import org.apache.ode.bpel.dao.ProcessDAO;
+import org.apache.ode.bpel.eapi.AbstractExtensionBundle;
 import org.apache.ode.bpel.evt.BpelEvent;
 import org.apache.ode.bpel.iapi.BindingContext;
 import org.apache.ode.bpel.iapi.BpelEngineException;
@@ -243,6 +244,15 @@
         for (BpelEventListener l : _contexts.eventListeners) {
             unregisterBpelEventListener(l);
         }
+    }
+
+    public void registerExtensionBundle(AbstractExtensionBundle bundle) {
+    	_contexts.extensionRegistry.put(bundle.getNamespaceURI(), bundle);
+    	bundle.registerExtensionActivities();
+    }
+
+    public void unregisterExtensionBundle(String nsURI) {
+    	_contexts.extensionRegistry.remove(nsURI);
     }
 
     public void stop() {

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java Sun Oct  7 13:44:58 2007
@@ -19,27 +19,29 @@
 
 package org.apache.ode.bpel.engine;
 
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+import javax.transaction.TransactionManager;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.dao.BpelDAOConnectionFactory;
+import org.apache.ode.bpel.eapi.AbstractExtensionBundle;
 import org.apache.ode.bpel.iapi.BindingContext;
 import org.apache.ode.bpel.iapi.BpelEngineException;
 import org.apache.ode.bpel.iapi.BpelEventListener;
-import org.apache.ode.bpel.iapi.ContextException;
 import org.apache.ode.bpel.iapi.EndpointReferenceContext;
 import org.apache.ode.bpel.iapi.MessageExchangeContext;
 import org.apache.ode.bpel.iapi.Scheduler;
 import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
 
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-import javax.transaction.TransactionManager;
-
 /**
  * Aggregation of all the contexts provided to the BPEL engine by the integration layer.
  */
@@ -63,6 +65,9 @@
 
     /** Global event listeners. Must be copy-on-write!!! */
     final List<BpelEventListener> eventListeners = new CopyOnWriteArrayList<BpelEventListener>();
+
+	/** Global extension bundle registry **/
+    final Map<String, AbstractExtensionBundle> extensionRegistry = new ConcurrentHashMap<String, AbstractExtensionBundle>();
 
     public boolean isTransacted() {
         try {

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java Sun Oct  7 13:44:58 2007
@@ -194,4 +194,10 @@
         return format("Database consistency error: {0}", detail);
     }
 
+    public String msgExtensionMustUnderstandError(QName name, String extensionUri) {
+        return format("Deployment of process \"{0}\" failed. The process model requires the " +
+        		"engine to understand language extensions defined by {1}. No extension bundle " +
+        		"has been registered for this namespace.", name, extensionUri);
+    }
+
 }

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java Sun Oct  7 13:44:58 2007
@@ -18,26 +18,36 @@
  */
 package org.apache.ode.bpel.runtime;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.compiler.bom.Bpel20QNames;
+import org.apache.ode.bpel.eapi.ExtensionContext;
 import org.apache.ode.bpel.evt.PartnerLinkModificationEvent;
 import org.apache.ode.bpel.evt.ScopeEvent;
 import org.apache.ode.bpel.evt.VariableModificationEvent;
 import org.apache.ode.bpel.explang.EvaluationContext;
 import org.apache.ode.bpel.o.OAssign;
-import org.apache.ode.bpel.o.OAssign.DirectRef;
-import org.apache.ode.bpel.o.OAssign.LValueExpression;
-import org.apache.ode.bpel.o.OAssign.PropertyRef;
-import org.apache.ode.bpel.o.OAssign.VariableRef;
 import org.apache.ode.bpel.o.OElementVarType;
 import org.apache.ode.bpel.o.OExpression;
 import org.apache.ode.bpel.o.OLink;
 import org.apache.ode.bpel.o.OMessageVarType;
+import org.apache.ode.bpel.o.OScope;
+import org.apache.ode.bpel.o.OAssign.DirectRef;
+import org.apache.ode.bpel.o.OAssign.LValueExpression;
+import org.apache.ode.bpel.o.OAssign.PropertyRef;
+import org.apache.ode.bpel.o.OAssign.VariableRef;
 import org.apache.ode.bpel.o.OMessageVarType.Part;
 import org.apache.ode.bpel.o.OProcess.OProperty;
-import org.apache.ode.bpel.o.OScope;
 import org.apache.ode.bpel.o.OScope.Variable;
+import org.apache.ode.bpel.runtime.channels.ExtensionResponseChannel;
+import org.apache.ode.bpel.runtime.channels.ExtensionResponseChannelListener;
 import org.apache.ode.bpel.runtime.channels.FaultData;
 import org.apache.ode.utils.DOMUtils;
 import org.apache.ode.utils.Namespaces;
@@ -50,11 +60,11 @@
 import org.w3c.dom.NodeList;
 import org.w3c.dom.Text;
 
-import javax.xml.namespace.QName;
-import java.util.List;
-
 /**
  * Assign activity run-time template.
+ * 
+ * @author Ode team
+ * @author Tammo van Lessen (University of Stuttgart) - extensionAssignOperation
  */
 class ASSIGN extends ACTIVITY {
     private static final long serialVersionUID = 1L;
@@ -573,7 +583,32 @@
     }
 
     private void invokeExtensionAssignOperation(OAssign.ExtensionAssignOperation eao) throws FaultException {
-    	throw new UnsupportedOperationException("ExtensionAssignOperations are not yet supported.");
+    	try {
+	    	final ExtensionContext helper = new ExtensionContextImpl(this._scopeFrame, getBpelRuntimeContext());
+	    	final ExtensionResponseChannel responseChannel = newChannel(ExtensionResponseChannel.class);
+
+    		getBpelRuntimeContext().executeExtension(DOMUtils.getElementQName(eao.nestedElement.getElement()), helper, eao.nestedElement, responseChannel);
+
+    		object(new ExtensionResponseChannelListener(responseChannel) {
+				private static final long serialVersionUID = 1L;
+
+				public void onCompleted() {
+					_self.parent.completed(null, CompensationHandler.emptySet());
+            	}
+            	
+            	public void onFailure(Throwable t) {
+            		StringWriter sw = new StringWriter();
+            		t.printStackTrace(new PrintWriter(sw));
+            		FaultData fault = createFault(new QName(Bpel20QNames.NS_WSBPEL2_0, "subLanguageExecutionFault"), _self.o, sw.getBuffer().toString());
+                    _self.parent.completed(fault, CompensationHandler.emptySet());
+            	};
+            });
+
+    	} catch (FaultException fault) {
+            __log.error(fault);
+            FaultData faultData = createFault(fault.getQName(), _self.o, fault.getMessage());
+            _self.parent.completed(faultData, CompensationHandler.emptySet());
+		}
     }
     
     private class EvaluationContextProxy implements EvaluationContext {

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ActivityTemplateFactory.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ActivityTemplateFactory.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ActivityTemplateFactory.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ActivityTemplateFactory.java Sun Oct  7 13:44:58 2007
@@ -43,7 +43,8 @@
     if (type instanceof OWhile) return new WHILE(ai, scopeFrame, linkFrame);
     if (type instanceof OForEach) return new FOREACH(ai, scopeFrame, linkFrame);
     if (type instanceof ORepeatUntil) return new REPEATUNTIL(ai,scopeFrame,linkFrame);
-
+    if (type instanceof OExtensionActivity) return new EXTENSIONACTIVITY(ai,scopeFrame,linkFrame);
+    
     throw new IllegalArgumentException("Unknown type: " + type);
   }
 

Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/BpelRuntimeContext.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/BpelRuntimeContext.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/BpelRuntimeContext.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/BpelRuntimeContext.java Sun Oct  7 13:44:58 2007
@@ -20,17 +20,20 @@
 
 import org.apache.ode.bpel.common.CorrelationKey;
 import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.eapi.ExtensionContext;
 import org.apache.ode.bpel.evt.ProcessInstanceEvent;
 import org.apache.ode.bpel.o.OMessageVarType;
 import org.apache.ode.bpel.o.OMessageVarType.Part;
 import org.apache.ode.bpel.o.OPartnerLink;
 import org.apache.ode.bpel.o.OProcess;
 import org.apache.ode.bpel.o.OScope;
+import org.apache.ode.bpel.runtime.channels.ExtensionResponseChannel;
 import org.apache.ode.bpel.runtime.channels.FaultData;
 import org.apache.ode.bpel.runtime.channels.InvokeResponseChannel;
 import org.apache.ode.bpel.runtime.channels.PickResponseChannel;
 import org.apache.ode.bpel.runtime.channels.TimerResponseChannel;
 import org.apache.ode.bpel.runtime.channels.ActivityRecoveryChannel;
+import org.apache.ode.utils.SerializableElement;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
@@ -256,4 +259,6 @@
     String getSourceSessionId(String mexId);
 
     void releasePartnerMex(String mexId);
+    
+    void executeExtension(QName extensionId, ExtensionContext context, SerializableElement element, ExtensionResponseChannel extResponseChannel) throws FaultException;
 }

Added: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EXTENSIONACTIVITY.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EXTENSIONACTIVITY.java?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EXTENSIONACTIVITY.java (added)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EXTENSIONACTIVITY.java Sun Oct  7 13:44:58 2007
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.compiler.bom.Bpel20QNames;
+import org.apache.ode.bpel.eapi.ExtensionContext;
+import org.apache.ode.bpel.o.OExtensionActivity;
+import org.apache.ode.bpel.runtime.channels.ExtensionResponseChannel;
+import org.apache.ode.bpel.runtime.channels.ExtensionResponseChannelListener;
+import org.apache.ode.bpel.runtime.channels.FaultData;
+import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.SerializableElement;
+
+/**
+ * JacobRunnable that delegates the work of the <code>extensionActivity</code> activity
+ * to a registered extension implementation.
+ * 
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class EXTENSIONACTIVITY extends ACTIVITY {
+	private static final long serialVersionUID = 1L;
+	private static final Log __log = LogFactory.getLog(EXTENSIONACTIVITY.class);
+
+    private OExtensionActivity _oext;
+    
+	public EXTENSIONACTIVITY(ActivityInfo self, ScopeFrame scopeFrame,
+			LinkFrame linkFrame) {
+        super(self, scopeFrame, linkFrame);
+        _oext = (OExtensionActivity) _self.o;
+	}
+
+    public final void run() {
+        try {
+        	final ExtensionResponseChannel responseChannel = newChannel(ExtensionResponseChannel.class);
+        	final ExtensionContext helper = new ExtensionContextImpl(_scopeFrame, getBpelRuntimeContext());
+        	
+        	getBpelRuntimeContext().executeExtension(DOMUtils.getElementQName(_oext.nestedElement.getElement()), helper, new SerializableElement(_oext.nestedElement.getElement()), responseChannel);
+        	
+            object(new ExtensionResponseChannelListener(responseChannel) {
+				private static final long serialVersionUID = -1L;
+
+				public void onCompleted() {
+					_self.parent.completed(null, CompensationHandler.emptySet());
+            	}
+            	
+            	public void onFailure(Throwable t) {
+            		StringWriter sw = new StringWriter();
+            		t.printStackTrace(new PrintWriter(sw));
+            		FaultData fault = createFault(new QName(Bpel20QNames.NS_WSBPEL2_0, "subLanguageExecutionFault"), _oext, sw.getBuffer().toString());
+                    _self.parent.completed(fault, CompensationHandler.emptySet());
+            	};
+            });
+
+		} catch (FaultException fault) {
+            __log.error(fault);
+            FaultData faultData = createFault(fault.getQName(), _oext, fault.getMessage());
+            _self.parent.completed(faultData, CompensationHandler.emptySet());
+		}
+
+    }
+
+}

Added: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExtensionContextImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExtensionContextImpl.java?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExtensionContextImpl.java (added)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExtensionContextImpl.java Sun Oct  7 13:44:58 2007
@@ -0,0 +1,112 @@
+/*
+ * 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.runtime;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.eapi.ExtensionContext;
+import org.apache.ode.bpel.o.OActivity;
+import org.apache.ode.bpel.o.OLink;
+import org.apache.ode.bpel.o.OScope;
+import org.apache.ode.bpel.o.OProcess.OProperty;
+import org.apache.ode.bpel.o.OScope.Variable;
+import org.w3c.dom.Node;
+
+
+/**
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class ExtensionContextImpl implements ExtensionContext {
+
+	private BpelRuntimeContext _context;
+	private ScopeFrame _scopeFrame;
+
+	public ExtensionContextImpl(ScopeFrame scopeFrame, BpelRuntimeContext context) {
+		_context = context;
+		_scopeFrame = scopeFrame;
+	}
+	
+	public List<OLink> getLinks() throws FaultException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Long getProcessId() {
+		return _context.getPid();
+	}
+
+	public Map<String, Variable> getVisibleVariables() throws FaultException {
+		Map<String, Variable> visVars = new HashMap<String, Variable>();
+		
+        OActivity current = _scopeFrame.oscope;
+        while (current != null) {
+            if (current instanceof OScope) {
+                for (String varName : ((OScope)current).variables.keySet()) {
+                	if (!visVars.containsKey(varName)) {
+                		visVars.put(varName, ((OScope)current).variables.get(varName));
+                	}
+                }
+            }
+            current = current.getParent();
+        }
+		
+		return visVars;
+	}
+
+	public boolean isLinkActive(OLink olink) throws FaultException {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public String readMessageProperty(Variable variable, OProperty property)
+			throws FaultException {
+		VariableInstance vi = _scopeFrame.resolve(variable);
+		return _context.readProperty(vi, property);
+	}
+
+	public Node readVariable(Variable variable)
+			throws FaultException {
+		VariableInstance vi = _scopeFrame.resolve(variable);
+		return _context.fetchVariableData(vi, true);
+	}
+
+	public void writeVariable(String variableName, Node value)
+			throws FaultException {
+		VariableInstance vi = _scopeFrame.resolve(getVisibleVariable(variableName));
+		_context.commitChanges(vi, value);
+	}
+
+	public Node readVariable(String variableName) throws FaultException {
+		VariableInstance vi = _scopeFrame.resolve(getVisibleVariable(variableName));
+		return _context.fetchVariableData(vi, true);
+	}
+
+	public void writeVariable(Variable variable, Node value)
+			throws FaultException {
+		VariableInstance vi = _scopeFrame.resolve(variable);
+		_context.commitChanges(vi, value);
+	}
+
+	private Variable getVisibleVariable(String varName) {
+    	return _scopeFrame.oscope.getVisibleVariable(varName);
+    }
+}

Added: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/channels/ExtensionResponse.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/channels/ExtensionResponse.java?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/channels/ExtensionResponse.java (added)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/channels/ExtensionResponse.java Sun Oct  7 13:44:58 2007
@@ -0,0 +1,34 @@
+/*
+ * 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.runtime.channels;
+
+import org.apache.ode.jacob.ap.ChannelType;
+
+/**
+ * Response channel for extension activity executions.
+ *
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+@ChannelType
+public interface ExtensionResponse {
+
+	void onCompleted();
+	void onFailure(Throwable t);
+	
+}

Modified: ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/CoreBpelTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/CoreBpelTest.java?rev=582679&r1=582678&r2=582679&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/CoreBpelTest.java (original)
+++ ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/CoreBpelTest.java Sun Oct  7 13:44:58 2007
@@ -21,6 +21,7 @@
 import junit.framework.TestCase;
 import org.apache.ode.bpel.common.CorrelationKey;
 import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.eapi.ExtensionContext;
 import org.apache.ode.bpel.evt.ProcessInstanceEvent;
 import org.apache.ode.bpel.o.OCatch;
 import org.apache.ode.bpel.o.OEmpty;
@@ -33,6 +34,7 @@
 import org.apache.ode.bpel.o.OScope;
 import org.apache.ode.bpel.o.OSequence;
 import org.apache.ode.bpel.o.OThrow;
+import org.apache.ode.bpel.runtime.channels.ExtensionResponseChannel;
 import org.apache.ode.bpel.runtime.channels.FaultData;
 import org.apache.ode.bpel.runtime.channels.InvokeResponseChannel;
 import org.apache.ode.bpel.runtime.channels.PickResponseChannel;
@@ -40,6 +42,7 @@
 import org.apache.ode.bpel.runtime.channels.ActivityRecoveryChannel;
 import org.apache.ode.jacob.vpu.ExecutionQueueImpl;
 import org.apache.ode.jacob.vpu.JacobVPU;
+import org.apache.ode.utils.SerializableElement;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
@@ -413,5 +416,12 @@
         // TODO Auto-generated method stub
         
     }
+
+	public void executeExtension(QName extensionId, ExtensionContext context,
+			SerializableElement element,
+			ExtensionResponseChannel extResponseChannel) throws FaultException {
+		// TODO Auto-generated method stub
+		
+	}
 
 }

Added: ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java (added)
+++ ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java Sun Oct  7 13:44:58 2007
@@ -0,0 +1,129 @@
+/*
+ * 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.test;
+
+import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.eapi.AbstractExtensionBundle;
+import org.apache.ode.bpel.eapi.ExtensionContext;
+import org.apache.ode.bpel.eapi.ExtensionOperation;
+import org.apache.ode.bpel.iapi.BpelEngineException;
+import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.SerializableElement;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test ODE's extensibility
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class ExtensibilityTest extends BPELTestAbstract {
+	
+	private TestExtensionBundle teb;
+	
+	@Before
+	public void setUp() throws Exception {
+		super.setUp();
+		teb = new TestExtensionBundle();
+		//BasicConfigurator.configure();
+	}
+	
+	@Test public void testExtensionActivityWOMustUnderstandWOBundle() throws Throwable {
+		go("/bpel/2.0/TestExtensionActivity");
+	}
+
+	@Test public void testExtensionActivityWithMustUnderstandWOBundle() throws Throwable {
+        Deployment deployment = new Deployment(makeDeployDir("/bpel/2.0/TestExtensionActivityMustUnderstand"));
+        deployment.expectedException = BpelEngineException.class;
+        doDeployment(deployment);
+	}
+
+	@Test public void testExtensionActivityWOMustUnderstandWithBundle() throws Throwable {
+		_server.registerExtensionBundle(teb);
+		Assert.assertFalse(teb.wasExecuted());
+		go("/bpel/2.0/TestExtensionActivity");
+		Assert.assertTrue(teb.wasExecuted());
+		_server.unregisterExtensionBundle(teb.getNamespaceURI());
+		teb.recycle();
+	}
+	
+	@Test public void testExtensionActivityWithMustUnderstandWithBundle() throws Throwable {
+		_server.registerExtensionBundle(teb);
+		Assert.assertFalse(teb.wasExecuted());
+		go("/bpel/2.0/TestExtensionActivityMustUnderstand");
+		Assert.assertTrue("ExtensionActivity has not been executed", teb.wasExecuted());
+		_server.unregisterExtensionBundle(teb.getNamespaceURI());
+		teb.recycle();
+	}
+
+	@Test public void testExtensionAssignOperation() throws Throwable {
+		_server.registerExtensionBundle(teb);
+		go("/bpel/2.0/TestExtensionAssignOperation");
+		_server.unregisterExtensionBundle(teb.getNamespaceURI());
+		teb.recycle();
+	}
+
+	private static class TestExtensionBundle extends AbstractExtensionBundle {
+		private static boolean wasExecuted = false;
+		
+		public String getNamespaceURI() {
+			return "urn:ode:test-extension-bundle";
+		}
+
+		public void registerExtensionActivities() {
+			registerExtensionOperation("doIt", TestExtensionActivity.class);
+			registerExtensionOperation("doAssign", TestExtensionAssignOperation.class);
+		}
+		
+		public boolean wasExecuted() {
+			return wasExecuted;
+		}
+		
+		public void recycle() {
+			wasExecuted = false;
+		}
+	}
+
+	public static class TestExtensionActivity implements ExtensionOperation {
+		private static final long serialVersionUID = 1L;
+
+		public void run(ExtensionContext context,
+				SerializableElement element) throws FaultException {
+			TestExtensionBundle.wasExecuted = true;
+		}
+	}
+	
+	public static class TestExtensionAssignOperation implements ExtensionOperation {
+		private static final long serialVersionUID = 1L;
+
+		public void run(ExtensionContext context, SerializableElement element)
+				throws FaultException {
+			//Node val = context.readVariable("myVar");
+			StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+			sb.append("<message><TestPart>Small</TestPart></message>");
+			try {
+				context.writeVariable("tmpVar", DOMUtils.stringToDOM(sb.toString()));
+			} catch (Exception e) {
+				e.printStackTrace();
+				Assert.fail();
+			}
+		}
+	}
+
+}

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel Sun Oct  7 13:44:58 2007
@@ -0,0 +1,78 @@
+<!--
+  ~ 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.
+-->
+<process name="ExtensionActivity"
+    targetNamespace="http://ode/bpel/unit-test" 
+    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+    xmlns:tns="http://ode/bpel/unit-test"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:test="http://ode/bpel/unit-test.wsdl"
+    xmlns:ext="urn:ode:test-extension-bundle">
+
+  <import location="ExtensionActivity.wsdl"
+     namespace="http://ode/bpel/unit-test.wsdl"
+     importType="http://schemas.xmlsoap.org/wsdl/" />
+
+   <partnerLinks>
+      <partnerLink name="helloPartnerLink" 
+         partnerLinkType="test:HelloPartnerLinkType" 
+         myRole="me" />
+   </partnerLinks>
+
+   <extensions>
+      <extension namespace="urn:ode:test-extension-bundle" mustUnderstand="no"/>
+   </extensions>
+
+   <variables>
+     <variable name="myVar" messageType="test:HelloMessage"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+        
+   <sequence>   
+       <receive 
+          name="start"
+          partnerLink="helloPartnerLink"
+          portType="test:HelloPortType"
+          operation="hello"
+          variable="myVar"
+          createInstance="yes"/>
+
+      <assign name="assign1">
+         <copy>
+            <from variable="myVar" part="TestPart"/>
+            <to variable="tmpVar"/>
+         </copy>
+         <copy>
+             <from>concat($tmpVar,' World')"</from>
+             <to variable="myVar" part="TestPart"/>
+         </copy>
+      </assign>
+	  <flow>
+
+      <extensionActivity>
+      	<ext:doIt/>
+      </extensionActivity>
+
+	  </flow>
+       <reply name="end"  
+              partnerLink="helloPartnerLink"
+              portType="test:HelloPortType" 
+              operation="hello"
+              variable="myVar"/>
+   </sequence>
+</process>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl Sun Oct  7 13:44:58 2007
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  ~ 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.
+-->
+<wsdl:definitions 
+    targetNamespace="http://ode/bpel/unit-test.wsdl"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:tns="http://ode/bpel/unit-test.wsdl"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <soap:operation soapAction="" style="rpc"/>
+            <wsdl:input>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl"
+                    use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl" 
+                    use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="HelloService">
+		<wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+     		<soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+		</wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="HelloPartnerLinkType">
+       <plnk:role name="me" portType="tns:HelloPortType"/>
+       <plnk:role name="you" portType="tns:HelloPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
+

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml Sun Oct  7 13:44:58 2007
@@ -0,0 +1,12 @@
+<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd" 
+	xmlns:pns="http://ode/bpel/unit-test" 
+	xmlns:wns="http://ode/bpel/unit-test.wsdl">
+
+
+	<process name="pns:ExtensionActivity">
+		<active>true</active>
+		<provide partnerLink="helloPartnerLink">
+			<service name="wns:HelloService" port="HelloPort"/>
+		</provide>
+	</process>
+</deploy>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties Sun Oct  7 13:44:58 2007
@@ -0,0 +1,6 @@
+namespace=http://ode/bpel/unit-test.wsdl
+service=HelloService
+operation=hello
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*Hello World.*
+

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel Sun Oct  7 13:44:58 2007
@@ -0,0 +1,75 @@
+<!--
+  ~ 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.
+-->
+
+<process name="ExtensionActivityMustUnderstand"
+    targetNamespace="http://ode/bpel/unit-test" 
+	xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+    xmlns:tns="http://ode/bpel/unit-test"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:test="http://ode/bpel/unit-test.wsdl"
+    xmlns:ext="urn:ode:test-extension-bundle">
+
+  <import location="ExtensionActivity.wsdl"
+     namespace="http://ode/bpel/unit-test.wsdl"
+     importType="http://schemas.xmlsoap.org/wsdl/" />
+
+   <partnerLinks>
+      <partnerLink name="helloPartnerLink" 
+         partnerLinkType="test:HelloPartnerLinkType" 
+         myRole="me" />
+   </partnerLinks>
+
+   <extensions>
+      <extension namespace="urn:ode:test-extension-bundle" mustUnderstand="yes"/>
+   </extensions>
+
+   <variables>
+     <variable name="myVar" messageType="test:HelloMessage"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+        
+   <sequence>   
+       <receive 
+          name="start"
+          partnerLink="helloPartnerLink"
+          portType="test:HelloPortType"
+          operation="hello"
+          variable="myVar"
+          createInstance="yes"/>
+
+      <assign name="assign1">
+         <copy>
+            <from variable="myVar" part="TestPart"/>
+            <to variable="tmpVar"/>
+         </copy>
+         <copy>
+             <from>concat($tmpVar,' World')"</from>
+             <to variable="myVar" part="TestPart"/>
+         </copy>
+      </assign>
+      <extensionActivity>
+      	<ext:doIt/>
+      </extensionActivity>
+       <reply name="end"  
+              partnerLink="helloPartnerLink"
+              portType="test:HelloPortType" 
+              operation="hello"
+              variable="myVar"/>
+   </sequence>
+</process>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl Sun Oct  7 13:44:58 2007
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<wsdl:definitions 
+    targetNamespace="http://ode/bpel/unit-test.wsdl"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:tns="http://ode/bpel/unit-test.wsdl"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <soap:operation soapAction="" style="rpc"/>
+            <wsdl:input>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl"
+                    use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl" 
+                    use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="HelloService">
+		<wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+     		<soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+		</wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="HelloPartnerLinkType">
+       <plnk:role name="me" portType="tns:HelloPortType"/>
+       <plnk:role name="you" portType="tns:HelloPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
+

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml Sun Oct  7 13:44:58 2007
@@ -0,0 +1,12 @@
+<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd" 
+	xmlns:pns="http://ode/bpel/unit-test" 
+	xmlns:wns="http://ode/bpel/unit-test.wsdl">
+
+
+	<process name="pns:ExtensionActivityMustUnderstand">
+		<active>true</active>
+		<provide partnerLink="helloPartnerLink">
+			<service name="wns:HelloService" port="HelloPort"/>
+		</provide>
+	</process>
+</deploy>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties Sun Oct  7 13:44:58 2007
@@ -0,0 +1,6 @@
+namespace=http://ode/bpel/unit-test.wsdl
+service=HelloService
+operation=hello
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*Hello World.*
+

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel Sun Oct  7 13:44:58 2007
@@ -0,0 +1,56 @@
+<process name="ExtensionAssign"
+    targetNamespace="http://ode/bpel/unit-test" 
+    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+    xmlns:tns="http://ode/bpel/unit-test"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:test="http://ode/bpel/unit-test.wsdl"
+    xmlns:ext="urn:ode:test-extension-bundle">
+
+  <import location="ExtensionAssign.wsdl"
+     namespace="http://ode/bpel/unit-test.wsdl"
+     importType="http://schemas.xmlsoap.org/wsdl/" />
+
+   <partnerLinks>
+      <partnerLink name="helloPartnerLink" 
+         partnerLinkType="test:HelloPartnerLinkType" 
+         myRole="me" />
+   </partnerLinks>
+
+   <extensions>
+      <extension namespace="urn:ode:test-extension-bundle" mustUnderstand="yes"/>
+   </extensions>
+
+   <variables>
+     <variable name="myVar" messageType="test:HelloMessage"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+        
+   <sequence>   
+       <receive 
+          name="start"
+          partnerLink="helloPartnerLink"
+          portType="test:HelloPortType"
+          operation="hello"
+          variable="myVar"
+          createInstance="yes"/>
+
+      <assign name="assign1">
+         <copy>
+            <from variable="myVar" part="TestPart"/>
+            <to variable="tmpVar"/>
+         </copy>
+		 <extensionAssignOperation>
+	     	<ext:doAssign/> <!-- assigns 'Small' to tmpVar -->
+	     </extensionAssignOperation>
+         <copy>
+             <from>concat($tmpVar,' World')"</from>
+             <to variable="myVar" part="TestPart"/>
+         </copy>
+      </assign>
+       <reply name="end"  
+              partnerLink="helloPartnerLink"
+              portType="test:HelloPortType" 
+              operation="hello"
+              variable="myVar"/>
+   </sequence>
+</process>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl Sun Oct  7 13:44:58 2007
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  ~ 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.
+-->
+
+<wsdl:definitions 
+    targetNamespace="http://ode/bpel/unit-test.wsdl"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:tns="http://ode/bpel/unit-test.wsdl"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <soap:operation soapAction="" style="rpc"/>
+            <wsdl:input>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl"
+                    use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl" 
+                    use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="HelloService">
+		<wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+     		<soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+		</wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="HelloPartnerLinkType">
+       <plnk:role name="me" portType="tns:HelloPortType"/>
+       <plnk:role name="you" portType="tns:HelloPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
+

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml Sun Oct  7 13:44:58 2007
@@ -0,0 +1,12 @@
+<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd" 
+	xmlns:pns="http://ode/bpel/unit-test" 
+	xmlns:wns="http://ode/bpel/unit-test.wsdl">
+
+
+	<process name="pns:ExtensionAssign">
+		<active>true</active>
+		<provide partnerLink="helloPartnerLink">
+			<service name="wns:HelloService" port="HelloPort"/>
+		</provide>
+	</process>
+</deploy>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties?rev=582679&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties Sun Oct  7 13:44:58 2007
@@ -0,0 +1,6 @@
+namespace=http://ode/bpel/unit-test.wsdl
+service=HelloService
+operation=hello
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*Small World.*
+