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 16:38:45 UTC
svn commit: r582638 - in /ode/trunk:
bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/
bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/api/
bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/
bpel-compiler/src/test/java/org/a...
Author: vanto
Date: Sun Oct 7 07:38:43 2007
New Revision: 582638
URL: http://svn.apache.org/viewvc?rev=582638&view=rev
Log:
OPEN - issue ODE-159: ExtensionActivity and ExtensionAssignOperation: Support for parser and compiler
http://issues.apache.org/jira/browse/ODE-159
Added:
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivityGeneratorMessages.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivtityGenerator.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extension.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionActivity.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionAssignOperation.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extensions.java
ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/ExtensibleAssignNotSupported.bpel
ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionActivityElement.bpel
ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionAssignOperationElement.bpel
ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionActivity.bpel
ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionAssignOperation.bpel
ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OExtensionActivity.java
ode/trunk/bpel-scripts/src/main/resources/2.0/good/assign/AssignExt-2.0.bpel
ode/trunk/bpel-scripts/src/main/resources/2.0/good/extensionActivity/
ode/trunk/bpel-scripts/src/main/resources/2.0/good/extensionActivity/ExtensionActivity1-2.0.bpel
Modified:
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGeneratorMessages.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20Draft.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/api/CompilerContext.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/AssignActivity.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Bpel20QNames.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObject.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Copy.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Process.java
ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/StaticCheckSuite.java
ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java
ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OAssign.java
ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java
ode/trunk/bpel-scripts/src/main/resources/2.0/good/test.wsdl
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestStaticOnMessage/TestStaticOnMessage.wsdl
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java Sun Oct 7 07:38:43 2007
@@ -18,12 +18,15 @@
*/
package org.apache.ode.bpel.compiler;
+import javax.xml.namespace.QName;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ode.bpel.compiler.api.CompilationException;
import org.apache.ode.bpel.compiler.bom.Activity;
import org.apache.ode.bpel.compiler.bom.AssignActivity;
import org.apache.ode.bpel.compiler.bom.Copy;
+import org.apache.ode.bpel.compiler.bom.ExtensionAssignOperation;
import org.apache.ode.bpel.compiler.bom.ExtensionVal;
import org.apache.ode.bpel.compiler.bom.From;
import org.apache.ode.bpel.compiler.bom.LiteralVal;
@@ -31,22 +34,23 @@
import org.apache.ode.bpel.compiler.bom.PropertyVal;
import org.apache.ode.bpel.compiler.bom.To;
import org.apache.ode.bpel.compiler.bom.VariableVal;
+import org.apache.ode.bpel.compiler.bom.AssignActivity.AssignOperation;
import org.apache.ode.bpel.o.DebugInfo;
import org.apache.ode.bpel.o.OActivity;
import org.apache.ode.bpel.o.OAssign;
-import org.apache.ode.bpel.o.OAssign.RValue;
import org.apache.ode.bpel.o.OMessageVarType;
+import org.apache.ode.bpel.o.OAssign.RValue;
import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.SerializableElement;
import org.apache.ode.utils.msg.MessageBundle;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import javax.xml.namespace.QName;
-
/**
* Generates code for <code><assign></code> activities.
*
* @author Maciej Szefler ( m s z e f l e r @ g m a i l . c o m )
+ * @author Tammo van Lessen (University of Stuttgart)
*/
class AssignGenerator extends DefaultActivityGenerator {
private static final Log __log = LogFactory.getLog(AssignGenerator.class);
@@ -61,25 +65,49 @@
public void compile(OActivity dest, Activity source) {
OAssign oassign = (OAssign) dest;
AssignActivity ad = (AssignActivity) source;
- for (Copy scopy : ad.getCopies()) {
- OAssign.Copy ocopy = new OAssign.Copy(_context.getOProcess());
- ocopy.keepSrcElementName = scopy.isKeepSrcElement();
- ocopy.debugInfo = new DebugInfo(_context.getSourceLocation(), scopy.getLineNo(),
- source.getExtensibilityElements());
- try {
- if (scopy.getFrom() == null)
- throw new CompilationException(__cmsgs.errMissingFromSpec().setSource(scopy));
- ocopy.from = compileFrom(scopy.getFrom());
- if (scopy.getTo() == null)
- throw new CompilationException(__cmsgs.errMissingToSpec().setSource(scopy));
- ocopy.to = compileTo(scopy.getTo());
-
- verifyCopy(ocopy);
- oassign.copy.add(ocopy);
-
- } catch (CompilationException ce) {
- _context.recoveredFromError(scopy, ce);
- }
+
+ for (AssignOperation operation : ad.getOperations()) {
+ if (operation instanceof Copy) {
+ Copy scopy = (Copy)operation;
+ OAssign.Copy ocopy = new OAssign.Copy(_context.getOProcess());
+ ocopy.keepSrcElementName = scopy.isKeepSrcElement();
+ ocopy.debugInfo = new DebugInfo(_context.getSourceLocation(), scopy.getLineNo(),
+ source.getExtensibilityElements());
+ try {
+ if (scopy.getFrom() == null)
+ throw new CompilationException(__cmsgs.errMissingFromSpec().setSource(scopy));
+ ocopy.from = compileFrom(scopy.getFrom());
+ if (scopy.getTo() == null)
+ throw new CompilationException(__cmsgs.errMissingToSpec().setSource(scopy));
+ ocopy.to = compileTo(scopy.getTo());
+
+ verifyCopy(ocopy);
+ oassign.operations.add(ocopy);
+
+ } catch (CompilationException ce) {
+ _context.recoveredFromError(scopy, ce);
+ }
+ } else if (operation instanceof ExtensionAssignOperation) {
+ ExtensionAssignOperation sop = (ExtensionAssignOperation)operation;
+ OAssign.ExtensionAssignOperation oext = new OAssign.ExtensionAssignOperation(_context.getOProcess());
+ oext.debugInfo = new DebugInfo(_context.getSourceLocation(), sop.getLineNo(), source.getExtensibilityElements());
+ try {
+ if (source.is20Draft()) {
+ throw new CompilationException(__cmsgs.errExtensibleAssignNotSupported());
+ }
+ Element el = sop.getNestedElement();
+ if (el == null) {
+ throw new CompilationException(__cmsgs.errMissingExtensionAssignOperationElement().setSource(sop));
+ }
+ if (!_context.isExtensionDeclared(el.getNamespaceURI())) {
+ throw new CompilationException(__cmsgs.errUndeclaredExtensionAssignOperation().setSource(sop));
+ }
+ oext.nestedElement = new SerializableElement(el);
+ oassign.operations.add(oext);
+ } catch (CompilationException ce) {
+ _context.recoveredFromError(sop, ce);
+ }
+ }
}
}
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGeneratorMessages.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGeneratorMessages.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGeneratorMessages.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGeneratorMessages.java Sun Oct 7 07:38:43 2007
@@ -86,4 +86,19 @@
return this.formatCompilationMessage("To-spec format is unrecognized.");
}
+ /**ExtensionAssignOperation's nested element missing*/
+ public CompilationMessage errMissingExtensionAssignOperationElement(){
+ return this.formatCompilationMessage("Extensibility element in <extensionAssignOperation> is missing.");
+ }
+
+ /**ExtensionAssignOperation's nested element missing*/
+ public CompilationMessage errUndeclaredExtensionAssignOperation(){
+ return this.formatCompilationMessage("Extension namespace of <extensionAssignOperation> has not been declared.");
+ }
+
+ /**Draft extensibleAssign is not supported.*/
+ public CompilationMessage errExtensibleAssignNotSupported(){
+ return this.formatCompilationMessage("ExtensibleAssign is not supported, please upgrade to BPEL 2.0 final.");
+ }
+
}
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java Sun Oct 7 07:38:43 2007
@@ -18,6 +18,31 @@
*/
package org.apache.ode.bpel.compiler;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Stack;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Part;
+import javax.wsdl.PortType;
+import javax.wsdl.WSDLException;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ode.bpel.compiler.api.CompilationException;
@@ -36,6 +61,7 @@
import org.apache.ode.bpel.compiler.bom.CorrelationSet;
import org.apache.ode.bpel.compiler.bom.Expression;
import org.apache.ode.bpel.compiler.bom.Expression11;
+import org.apache.ode.bpel.compiler.bom.Extension;
import org.apache.ode.bpel.compiler.bom.FaultHandler;
import org.apache.ode.bpel.compiler.bom.Import;
import org.apache.ode.bpel.compiler.bom.LinkSource;
@@ -84,38 +110,16 @@
import org.apache.ode.utils.GUID;
import org.apache.ode.utils.NSContext;
import org.apache.ode.utils.StreamUtils;
-import org.apache.ode.utils.xsd.XSUtils;
-import org.apache.ode.utils.xsd.XsdException;
import org.apache.ode.utils.fs.FileUtils;
import org.apache.ode.utils.msg.MessageBundle;
import org.apache.ode.utils.stl.CollectionsX;
import org.apache.ode.utils.stl.MemberOfFunction;
import org.apache.ode.utils.stl.UnaryFunction;
+import org.apache.ode.utils.xsd.XSUtils;
+import org.apache.ode.utils.xsd.XsdException;
import org.apache.xerces.xni.parser.XMLEntityResolver;
import org.w3c.dom.Node;
-import javax.wsdl.Definition;
-import javax.wsdl.Message;
-import javax.wsdl.Operation;
-import javax.wsdl.Part;
-import javax.wsdl.PortType;
-import javax.wsdl.WSDLException;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Stack;
-
/**
* Compiler for converting BPEL process descriptions (and their associated WSDL and XSD documents) into compiled representations
* suitable for execution by the ODE BPEL Service Provider. TODO: Move process validation into this class.
@@ -164,6 +168,8 @@
private final HashMap<String, OExpressionLanguage> _expLanguages = new HashMap<String, OExpressionLanguage>();
+ private final Set<String> _declaredExtensionNS = new HashSet<String>();
+
private WSDLFactory4BPEL _wsdlFactory;
private OExpressionLanguage _konstExprLang;
@@ -683,6 +689,11 @@
}
}
+ // compile extensions
+ for (Extension e : _processDef.getExtensions()) {
+ compileExtension(e);
+ }
+
OScope procesScope = new OScope(_oprocess, null);
procesScope.name = "__PROCESS_SCOPE:" + process.getName();
procesScope.debugInfo = createDebugInfo(process, null);
@@ -1496,6 +1507,26 @@
return oXslSheet;
}
+ /**
+ * Registers a declared extension.
+ * Since compilation may take place independently of the target
+ * engine configuration, the compiler will not check whether a
+ * extension implementation is registered.
+ */
+ private void compileExtension(Extension ext){
+ OProcess.OExtension oextension = new OProcess.OExtension(_oprocess);
+ oextension.namespaceURI = ext.getNamespaceURI();
+ oextension.mustUnderstand = ext.isMustUnderstand();
+
+ oextension.debugInfo = createDebugInfo(_processDef, "Extension " + ext.getNamespaceURI());
+
+ _oprocess.declaredExtensions.add(oextension);
+ _declaredExtensionNS.add(ext.getNamespaceURI());
+
+ if (__log.isDebugEnabled())
+ __log.debug("Compiled extension " + oextension);
+ }
+
private String loadXsltSheet(URI uri) {
// TODO: lots of null returns, should have some better error messages.
@@ -1527,11 +1558,14 @@
for (OActivity act : _compiledActivities) {
if (act instanceof OAssign) {
OAssign assign = (OAssign) act;
- for (OAssign.Copy copy : assign.copy) {
- if (copy.to instanceof OAssign.PartnerLinkRef) {
- if (((OAssign.PartnerLinkRef) copy.to).partnerLink.getName().equals(plink))
- return true;
- }
+ for (OAssign.OAssignOperation operation: assign.operations) {
+ if (operation instanceof OAssign.Copy) {
+ OAssign.Copy copy = (OAssign.Copy)operation;
+ if (copy.to instanceof OAssign.PartnerLinkRef) {
+ if (((OAssign.PartnerLinkRef) copy.to).partnerLink.getName().equals(plink))
+ return true;
+ }
+ }
}
}
}
@@ -1609,6 +1643,10 @@
protected void registerExpressionLanguage(String expLangUri, String classname) throws Exception {
Class cls = Class.forName(classname);
registerExpressionLanguage(expLangUri, (ExpressionCompiler) cls.newInstance());
+ }
+
+ public boolean isExtensionDeclared(String namespace) {
+ return _declaredExtensionNS.contains(namespace);
}
public List<OActivity> getActivityStack() {
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20.java Sun Oct 7 07:38:43 2007
@@ -23,6 +23,7 @@
import org.apache.ode.bpel.compiler.bom.CompensateActivity;
import org.apache.ode.bpel.compiler.bom.CompensateScopeActivity;
import org.apache.ode.bpel.compiler.bom.EmptyActivity;
+import org.apache.ode.bpel.compiler.bom.ExtensionActivity;
import org.apache.ode.bpel.compiler.bom.FlowActivity;
import org.apache.ode.bpel.compiler.bom.ForEachActivity;
import org.apache.ode.bpel.compiler.bom.IfActivity;
@@ -70,7 +71,8 @@
registerActivityCompiler(TerminateActivity.class, new TerminateGenerator());
registerActivityCompiler(RethrowActivity.class, new RethrowGenerator());
registerActivityCompiler(ForEachActivity.class, new ForEachGenerator());
-
+ registerActivityCompiler(ExtensionActivity.class, new ExtensionActivtityGenerator());
+
registerExpressionLanguage(OASIS_EXPLANG_XPATH_1_0, new XPath10ExpressionCompilerBPEL20());
try {
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20Draft.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20Draft.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20Draft.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler20Draft.java Sun Oct 7 07:38:43 2007
@@ -23,6 +23,7 @@
import org.apache.ode.bpel.compiler.bom.Bpel20QNames;
import org.apache.ode.bpel.compiler.bom.CompensateScopeActivity;
import org.apache.ode.bpel.compiler.bom.EmptyActivity;
+import org.apache.ode.bpel.compiler.bom.ExtensionActivity;
import org.apache.ode.bpel.compiler.bom.FlowActivity;
import org.apache.ode.bpel.compiler.bom.ForEachActivity;
import org.apache.ode.bpel.compiler.bom.IfActivity;
@@ -69,6 +70,7 @@
registerActivityCompiler(TerminateActivity.class, new TerminateGenerator());
registerActivityCompiler(RethrowActivity.class, new RethrowGenerator());
registerActivityCompiler(ForEachActivity.class, new ForEachGenerator());
+ registerActivityCompiler(ExtensionActivity.class, new ExtensionActivtityGenerator());
registerExpressionLanguage(OASIS_EXPLANG_XPATH_1_0, new XPath10ExpressionCompilerBPEL20Draft());
try {
Added: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivityGeneratorMessages.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivityGeneratorMessages.java?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivityGeneratorMessages.java (added)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivityGeneratorMessages.java Sun Oct 7 07:38:43 2007
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+import org.apache.ode.bpel.compiler.api.CompilationMessage;
+import org.apache.ode.bpel.compiler.api.CompilationMessageBundle;
+
+/**
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class ExtensionActivityGeneratorMessages extends CompilationMessageBundle {
+
+ /** ExtensionActivity is empty. */
+ public CompilationMessage errMissingExtensionActivityElement() {
+ return this.formatCompilationMessage("Extensibility element in <extensionActivity> is missing.");
+ }
+
+ /** Extension namespace is not yet declared. */
+ public CompilationMessage errUndeclaredExtensionActivity() {
+ return this.formatCompilationMessage("Extension namespace of <extensionActivity> has not been declared.");
+ }
+
+}
Added: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivtityGenerator.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivtityGenerator.java?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivtityGenerator.java (added)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ExtensionActivtityGenerator.java Sun Oct 7 07:38:43 2007
@@ -0,0 +1,74 @@
+/*
+ * 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;
+
+import org.apache.ode.bpel.compiler.api.CompilationException;
+import org.apache.ode.bpel.compiler.bom.Activity;
+import org.apache.ode.bpel.compiler.bom.CompositeActivity;
+import org.apache.ode.bpel.compiler.bom.ExtensionActivity;
+import org.apache.ode.bpel.o.OActivity;
+import org.apache.ode.bpel.o.OExtensionActivity;
+import org.apache.ode.utils.SerializableElement;
+import org.apache.ode.utils.msg.MessageBundle;
+import org.w3c.dom.Element;
+
+/**
+ * Generates code for <code><empty></code> activities.
+ * @author Tammo van Lessen
+ */
+class ExtensionActivtityGenerator extends DefaultActivityGenerator {
+ private static final ExtensionActivityGeneratorMessages __cmsgs =
+ MessageBundle.getMessages(ExtensionActivityGeneratorMessages.class);
+
+ public void compile(OActivity output, Activity srcx) {
+ ExtensionActivity src = (ExtensionActivity) srcx;
+ OExtensionActivity oactivity = (OExtensionActivity) output;
+ Element child = src.getFirstExtensibilityElement();
+ try {
+ if (child == null) {
+ throw new CompilationException(__cmsgs.errMissingExtensionActivityElement());
+ }
+ if (!_context.isExtensionDeclared(child.getNamespaceURI())) {
+ throw new CompilationException(__cmsgs.errUndeclaredExtensionActivity().setSource(src));
+ }
+ oactivity.nestedElement = new SerializableElement(child);
+ compileChildren(oactivity, (ExtensionActivity) src);
+
+ } catch (CompilationException e) {
+ _context.recoveredFromError(src, e);
+ }
+ }
+
+ public OActivity newInstance(Activity src) {
+ return new OExtensionActivity(_context.getOProcess(), _context.getCurrent());
+ }
+
+ protected void compileChildren(OExtensionActivity dest, CompositeActivity src) {
+ for (Activity child : src.getActivities()) {
+ try {
+ OActivity compiledChild = _context.compile(child);
+ dest.children.add(compiledChild);
+ }
+ catch (CompilationException ce) {
+ _context.recoveredFromError(child, ce);
+ }
+ }
+ }
+
+}
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/api/CompilerContext.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/api/CompilerContext.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/api/CompilerContext.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/api/CompilerContext.java Sun Oct 7 07:38:43 2007
@@ -131,5 +131,5 @@
OActivity getCurrent();
-
+ boolean isExtensionDeclared(String namespace);
}
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/AssignActivity.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/AssignActivity.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/AssignActivity.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/AssignActivity.java Sun Oct 7 07:38:43 2007
@@ -18,6 +18,7 @@
*/
package org.apache.ode.bpel.compiler.bom;
+import java.util.ArrayList;
import java.util.List;
import org.w3c.dom.Element;
@@ -26,6 +27,9 @@
* BOM representation of the BPEL <code><assign></code> activity. The
* <code><assign></code> activity is simply a collection of
* <code><copy></code> entries ({@link Copy}).
+ *
+ * @author Ode team
+ * @author Tammo van Lessen (University of Stuttgart)
*/
public class AssignActivity extends Activity {
@@ -41,4 +45,38 @@
public List<Copy> getCopies() {
return getChildren(Copy.class);
}
+
+ /**
+ * Get the list of <code><extensionAssignOperation></code> entries for this activity.
+ *
+ * @return extensionAssignOperation entries
+ */
+ public List<ExtensionAssignOperation> getExtensionAssignOperations() {
+ return getChildren(ExtensionAssignOperation.class);
+ }
+
+ /**
+ * Get the list of all assign operation entries (<code>copy</code>
+ * and <code>extensionAssignOperation</code>) for this activity.
+ *
+ * @return assign operation entries
+ */
+ public List<AssignOperation> getOperations() {
+ //all children objects
+ List<BpelObject> children = getChildren(BpelObject.class);
+
+ //aggregate only copy and extensionAssignOperation entries
+ List<AssignOperation> ops = new ArrayList<AssignOperation>();
+ for (BpelObject bo: children) {
+ if ((bo instanceof Copy)
+ ||(bo instanceof ExtensionAssignOperation)) {
+ ops.add((AssignOperation)bo);
+ }
+ }
+
+ return ops;
+ }
+
+ /** Marker interface for assign operations */
+ public static interface AssignOperation {}
}
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Bpel20QNames.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Bpel20QNames.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Bpel20QNames.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Bpel20QNames.java Sun Oct 7 07:38:43 2007
@@ -109,6 +109,10 @@
public static final QName FINAL_PROPQUERY = new QName(NS_WSBPEL2_0_FINAL_VARPROP, "query");
public static final QName FINAL_PLINKTYPE = new QName(NS_WSBPEL2_0_FINAL_PLINK, "partnerLinkType");
public static final QName FINAL_PLINKROLE = new QName(NS_WSBPEL2_0_FINAL_PLINK, "role");
+ public static final QName FINAL_EXTENSIONS = newFinalQName("extensions");
+ public static final QName FINAL_EXTENSION = newFinalQName("extension");
+ public static final QName FINAL_EXTENSION_ASSIGN_OPERATION = newFinalQName("extensionAssignOperation");
+ public static final QName FINAL_EXTENSION_ACTIVITY = newFinalQName("extensionActivity");
/** Some BPEL 2.0 Draft Elements **/
public static final QName PROCESS = newQName("process");
@@ -180,6 +184,11 @@
public static final QName LITERAL = newQName("literal");
public static final QName PROPALIAS = newQName("propertyAlias");
public static final QName PROPERTY = newQName("property");
+ public static final QName EXTENSIONS = newQName("extensions");
+ public static final QName EXTENSION = newQName("extension");
+ public static final QName EXTENSIBLE_ASSIGN = newQName("extensibleAssign");
+ public static final QName EXTENSION_ACTIVITY = newQName("extensionActivity");
+
public static final QName PLINKTYPE = new QName(NS_WSBPEL_PARTNERLINK_2004_03, "partnerLinkType");
public static final QName PLINKROLE = new QName(NS_WSBPEL_PARTNERLINK_2004_03, "role");
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObject.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObject.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObject.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObject.java Sun Oct 7 07:38:43 2007
@@ -130,7 +130,7 @@
return e.getElement();
}
- public Element getFirstExtensibilityElementElement() {
+ public Element getFirstExtensibilityElement() {
Element child = null;
NodeList nl = getElement().getChildNodes();
for (int i = 0; i < nl.getLength(); ++i) {
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java Sun Oct 7 07:38:43 2007
@@ -124,6 +124,10 @@
_mappings.put(Bpel20QNames.FINAL_EVENTHANDLERS, BpelObject.class);
_mappings.put(Bpel20QNames.FINAL_TARGETS,Targets.class);
_mappings.put(Bpel20QNames.FINAL_SOURCES,Sources.class);
+ _mappings.put(Bpel20QNames.FINAL_EXTENSIONS,Extensions.class);
+ _mappings.put(Bpel20QNames.FINAL_EXTENSION,Extension.class);
+ _mappings.put(Bpel20QNames.FINAL_EXTENSION_ACTIVITY,ExtensionActivity.class);
+ _mappings.put(Bpel20QNames.FINAL_EXTENSION_ASSIGN_OPERATION,ExtensionAssignOperation.class);
//
// BPEL 2.0 draft Mappings
@@ -197,6 +201,10 @@
_mappings.put(Bpel20QNames.TARGETS,Targets.class);
_mappings.put(Bpel20QNames.SOURCES,Sources.class);
_mappings.put(Bpel20QNames.RDF_LABEL,RdfLabel.class);
+ _mappings.put(Bpel20QNames.EXTENSIONS,Extensions.class);
+ _mappings.put(Bpel20QNames.EXTENSION,Extension.class);
+ _mappings.put(Bpel20QNames.EXTENSION_ACTIVITY,ExtensionActivity.class);
+ _mappings.put(Bpel20QNames.EXTENSIBLE_ASSIGN,ExtensionAssignOperation.class);
//
// BPEL 1.1 Mappings
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Copy.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Copy.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Copy.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Copy.java Sun Oct 7 07:38:43 2007
@@ -18,6 +18,7 @@
*/
package org.apache.ode.bpel.compiler.bom;
+import org.apache.ode.bpel.compiler.bom.AssignActivity.AssignOperation;
import org.w3c.dom.Element;
/**
@@ -25,7 +26,7 @@
* (L-value) and a "right hand side (R-value). The value on the right hand side
* is copied to the location referenced in the left hand side.
*/
-public class Copy extends BpelObject {
+public class Copy extends BpelObject implements AssignOperation {
public Copy(Element el) {
super(el);
Added: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extension.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extension.java?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extension.java (added)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extension.java Sun Oct 7 07:38:43 2007
@@ -0,0 +1,41 @@
+/*
+ * 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 BPEL <code><extension></code> element.
+ *
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class Extension extends BpelObject {
+
+ public Extension(Element el) {
+ super(el);
+ }
+
+ public boolean isMustUnderstand() {
+ return getAttribute("mustUnderstand", "no").equals("yes");
+ }
+
+ public String getNamespaceURI() {
+ return getAttribute("namespace", null);
+ }
+}
Added: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionActivity.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionActivity.java?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionActivity.java (added)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionActivity.java Sun Oct 7 07:38:43 2007
@@ -0,0 +1,97 @@
+/*
+ * 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 java.util.Collections;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * BOM representation of the BPEL <code><extensionActivity></code> activity. The
+ * <code><extensionActivity></code> activity contains a nested DOM element that
+ * represents the actual extension element. According to the BPEL 2.0 PR1 specification,
+ * the standards elements and standards attributes are not located in the extensionActivity
+ * element but in the nested element. Therefore the convenient access methods for standards
+ * attributes/elements are overridden to refer to the nested elements.
+ *
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class ExtensionActivity extends CompositeActivity {
+ private Activity _childActivity;
+
+ public ExtensionActivity(Element el) {
+ super(el);
+ _childActivity = null;
+ Element child = getFirstExtensibilityElement();
+ if (child != null) {
+ _childActivity = new Activity(getFirstExtensibilityElement());
+ }
+ }
+
+ @Override
+ public Expression getJoinCondition() {
+ if (_childActivity == null) {
+ return null;
+ }
+ return _childActivity.getJoinCondition();
+ }
+
+ @Override
+ public List<LinkSource> getLinkSources() {
+ if (_childActivity == null) {
+ return Collections.emptyList();
+ }
+ return _childActivity.getLinkSources();
+ }
+
+ @Override
+ public List<LinkTarget> getLinkTargets() {
+ if (_childActivity == null) {
+ return Collections.emptyList();
+ }
+ return _childActivity.getLinkTargets();
+ }
+
+ @Override
+ public String getName() {
+ if (_childActivity == null) {
+ return null;
+ }
+ return _childActivity.getName();
+ }
+
+ @Override
+ public SuppressJoinFailure getSuppressJoinFailure() {
+ if (_childActivity == null) {
+ return SuppressJoinFailure.NOTSET;
+ }
+ return _childActivity.getSuppressJoinFailure();
+ }
+
+ @Override
+ public List<Activity> getActivities() {
+ if (_childActivity == null) {
+ return Collections.emptyList();
+ }
+
+ return _childActivity.getChildren(Activity.class);
+ }
+
+}
Added: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionAssignOperation.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionAssignOperation.java?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionAssignOperation.java (added)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/ExtensionAssignOperation.java Sun Oct 7 07:38:43 2007
@@ -0,0 +1,53 @@
+/*
+ * 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.apache.ode.bpel.compiler.bom.AssignActivity.AssignOperation;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * BOM representation of the BPEL <code><extensionAssignOperation></code>.
+ *
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class ExtensionAssignOperation extends BpelObject implements AssignOperation {
+ private Element _childElement;
+
+ public ExtensionAssignOperation(Element el) {
+ super(el);
+ }
+
+ public Element getNestedElement() {
+ if (_childElement == null) {
+ NodeList nl = getElement().getChildNodes();
+ for (int i = 0; i < nl.getLength(); ++i) {
+ Node node = nl.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE &&
+ !Bpel20QNames.NS_WSBPEL2_0.equals(node.getNamespaceURI())) {
+ _childElement = (Element)node;
+ break;
+ }
+ }
+ }
+ return _childElement;
+ }
+
+}
Added: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extensions.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extensions.java?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extensions.java (added)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Extensions.java Sun Oct 7 07:38:43 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.compiler.bom;
+
+import org.w3c.dom.Element;
+
+/**
+ * BOM representation of the BPEL <code><extension></code> element.
+ *
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class Extensions extends BpelObject {
+
+ public Extensions(Element el) {
+ super(el);
+ }
+
+}
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Process.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Process.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Process.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Process.java Sun Oct 7 07:38:43 2007
@@ -18,11 +18,12 @@
*/
package org.apache.ode.bpel.compiler.bom;
-import org.w3c.dom.Element;
-
+import java.util.Collections;
import java.util.List;
import java.util.Set;
+import org.w3c.dom.Element;
+
/**
* BPEL Object Model (BOM) representation of a BPEL process.
*/
@@ -111,4 +112,16 @@
return getChildren(Import.class);
}
+ /**
+ * Get the <code><extensions></code>(s) of the process.
+ *
+ * @return {@link Set} of {@link Extension}s
+ */
+ public List<Extension> getExtensions() {
+ Extensions extensions = getFirstChild(Extensions.class);
+ if (extensions == null)
+ return Collections.emptyList();
+ return extensions.getChildren(Extension.class);
+
+ }
}
Modified: ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/StaticCheckSuite.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/StaticCheckSuite.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/StaticCheckSuite.java (original)
+++ ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/StaticCheckSuite.java Sun Oct 7 07:38:43 2007
@@ -39,6 +39,11 @@
suite.addTest(new StaticCheckTCase("LinkMissingSourceActivity"));
suite.addTest(new StaticCheckTCase("LinkMissingTargetActivity"));
suite.addTest(new StaticCheckTCase("DuplicateVariableDecl"));
+ suite.addTest(new StaticCheckTCase("UndeclaredExtensionActivity"));
+ suite.addTest(new StaticCheckTCase("UndeclaredExtensionAssignOperation"));
+ suite.addTest(new StaticCheckTCase("MissingExtensionActivityElement"));
+ suite.addTest(new StaticCheckTCase("MissingExtensionAssignOperationElement"));
+ suite.addTest(new StaticCheckTCase("ExtensibleAssignNotSupported"));
// We simply can't test the next one without using the BOM; both the parser
// and schema validation would rule it out.
//suite.addTest(new StaticCheckTest("CompensateNAtoContext"));
Modified: ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java (original)
+++ ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java Sun Oct 7 07:38:43 2007
@@ -267,4 +267,8 @@
public void recoveredFromError(SourceLocation location,
CompilationException error) {
}
+
+ public boolean isExtensionDeclared(String namespace) {
+ return false;
+ }
}
Modified: ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java (original)
+++ ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java Sun Oct 7 07:38:43 2007
@@ -37,6 +37,7 @@
suite.addTest(new GoodCompileTCase("/2.0/good/assign/Assign7-2.0.bpel"));
suite.addTest(new GoodCompileTCase("/2.0/good/assign/Assign8-2.0.bpel"));
suite.addTest(new GoodCompileTCase("/2.0/good/assign/Assign9-2.0.bpel"));
+ suite.addTest(new GoodCompileTCase("/2.0/good/assign/AssignExt-2.0.bpel"));
suite.addTest(new GoodCompileTCase("/2.0/good/AsyncProcess/AsyncProcess2.bpel"));
suite.addTest(new GoodCompileTCase("/2.0/good/compensation/comp1-2.0.bpel"));
suite.addTest(new GoodCompileTCase("/2.0/good/compensation/comp2-2.0.bpel"));
@@ -75,7 +76,7 @@
suite.addTest(new GoodCompileTCase("/2.0/good/xpath20-func/GetVariableData4-xp2.0.bpel"));
suite.addTest(new GoodCompileTCase("/2.0/good/xpath20-func/GetVariableProperty1-xp2.0.bpel"));
suite.addTest(new GoodCompileTCase("/2.0/good/xsd-import/helloworld-Server.bpel"));
-
+ suite.addTest(new GoodCompileTCase("/2.0/good/extensionActivity/ExtensionActivity1-2.0.bpel"));
return suite;
}
Added: ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/ExtensibleAssignNotSupported.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/ExtensibleAssignNotSupported.bpel?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/ExtensibleAssignNotSupported.bpel (added)
+++ ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/ExtensibleAssignNotSupported.bpel Sun Oct 7 07:38:43 2007
@@ -0,0 +1,33 @@
+<!--
+ ~ 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="UndeclaredExtensionActivity" suppressJoinFailure="yes"
+ targetNamespace="http://jlo/test/compile"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:tns="http://jlo/test/compile"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ext="urn:ode:test-ext">
+ <flow>
+ <sequence>
+ <assign>
+ <extensibleAssign ext:test="xx"/>
+ </assign>
+ </sequence>
+ </flow>
+</process>
Added: ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionActivityElement.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionActivityElement.bpel?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionActivityElement.bpel (added)
+++ ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionActivityElement.bpel Sun Oct 7 07:38:43 2007
@@ -0,0 +1,32 @@
+<!--
+ ~ 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="UndeclaredExtensionActivity" suppressJoinFailure="yes"
+ targetNamespace="http://jlo/test/compile"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://jlo/test/compile"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ext="urn:ode:test-ext">
+ <flow>
+ <sequence>
+ <extensionActivity>
+ </extensionActivity>
+ </sequence>
+ </flow>
+</process>
Added: ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionAssignOperationElement.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionAssignOperationElement.bpel?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionAssignOperationElement.bpel (added)
+++ ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/MissingExtensionAssignOperationElement.bpel Sun Oct 7 07:38:43 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.
+-->
+
+<process name="UndeclaredExtensionActivity" suppressJoinFailure="yes"
+ targetNamespace="http://jlo/test/compile"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://jlo/test/compile"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ext="urn:ode:test-ext">
+ <flow>
+ <sequence>
+ <assign>
+ <extensionAssignOperation>
+ </extensionAssignOperation>
+ </assign>
+ </sequence>
+ </flow>
+</process>
Added: ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionActivity.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionActivity.bpel?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionActivity.bpel (added)
+++ ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionActivity.bpel Sun Oct 7 07:38:43 2007
@@ -0,0 +1,33 @@
+<!--
+ ~ 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="UndeclaredExtensionActivity" suppressJoinFailure="yes"
+ targetNamespace="http://jlo/test/compile"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://jlo/test/compile"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ext="urn:ode:test-ext">
+ <flow>
+ <sequence>
+ <extensionActivity>
+ <ext:unknownExt name="myExt"/>
+ </extensionActivity>
+ </sequence>
+ </flow>
+</process>
Added: ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionAssignOperation.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionAssignOperation.bpel?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionAssignOperation.bpel (added)
+++ ode/trunk/bpel-compiler/src/test/resources/org/apache/ode/bpel/compiler/UndeclaredExtensionAssignOperation.bpel Sun Oct 7 07:38:43 2007
@@ -0,0 +1,35 @@
+<!--
+ ~ 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="UndeclaredExtensionActivity" suppressJoinFailure="yes"
+ targetNamespace="http://jlo/test/compile"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://jlo/test/compile"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ext="urn:ode:test-ext">
+ <flow>
+ <sequence>
+ <assign>
+ <extensionAssignOperation>
+ <ext:unknownExt name="myExt"/>
+ </extensionAssignOperation>
+ </assign>
+ </sequence>
+ </flow>
+</process>
Modified: ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OAssign.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OAssign.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OAssign.java (original)
+++ ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OAssign.java Sun Oct 7 07:38:43 2007
@@ -18,35 +18,49 @@
*/
package org.apache.ode.bpel.o;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
import org.apache.ode.bpel.o.OScope.Variable;
import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.SerializableElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import javax.xml.namespace.QName;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
public class OAssign extends OActivity {
static final long serialVersionUID = -1L ;
- public final List<Copy> copy = new ArrayList<Copy>();
+ public final List<OAssignOperation> operations = new ArrayList<OAssignOperation>();
public OAssign(OProcess owner, OActivity parent) {
super(owner, parent);
}
-
public String toString() {
return "{OAssign : " + name + ", joinCondition=" + joinCondition + "}";
}
+ /**
+ * Base class for assign operations.
+ */
+ public static abstract class OAssignOperation extends OBase {
+ public enum Type {Copy, ExtensionOperation};
+
+ public OAssignOperation(OProcess owner) {
+ super(owner);
+ }
+
+ public abstract Type getType();
+ }
+
/**
- * Assignmenet copy entry, i.e. what the assignment consits of.
+ * Assignment copy entry, i.e. what the assignment consists of.
*/
- public static class Copy extends OBase {
+ public static class Copy extends OAssignOperation {
private static final long serialVersionUID = 1L;
public LValue to;
public RValue from;
@@ -59,6 +73,30 @@
public String toString() {
return "{OCopy " + to + "=" + from + "}";
}
+
+ public Type getType() {
+ return Type.Copy;
+ }
+ }
+
+ /**
+ * Assignment extension operation entry, i.e. what the assignment consists of.
+ */
+ public static class ExtensionAssignOperation extends OAssignOperation {
+ private static final long serialVersionUID = 1L;
+ public SerializableElement nestedElement;
+
+ public ExtensionAssignOperation(OProcess owner) {
+ super(owner);
+ }
+
+ public String toString() {
+ return "{OExtensionAssignOperation; " + nestedElement.getElement().getTagName() + "}";
+ }
+
+ public Type getType() {
+ return Type.ExtensionOperation;
+ }
}
public interface LValue {
Added: ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OExtensionActivity.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OExtensionActivity.java?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OExtensionActivity.java (added)
+++ ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OExtensionActivity.java Sun Oct 7 07:38:43 2007
@@ -0,0 +1,41 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ode.utils.SerializableElement;
+
+
+/**
+ * Compiled representation of the BPEL <code><extensionActivity></code> activity.
+ *
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class OExtensionActivity extends OActivity {
+
+ static final long serialVersionUID = -1L ;
+ public final List<OActivity> children = new ArrayList<OActivity>();
+ public SerializableElement nestedElement;
+
+ public OExtensionActivity(OProcess owner, OActivity parent) {
+ super(owner, parent);
+ }
+}
Modified: ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java (original)
+++ ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java Sun Oct 7 07:38:43 2007
@@ -18,9 +18,6 @@
*/
package org.apache.ode.bpel.o;
-import org.apache.ode.utils.stl.CollectionsX;
-import org.apache.ode.utils.stl.MemberOfFunction;
-
import javax.wsdl.Operation;
import javax.xml.namespace.QName;
import java.io.IOException;
@@ -60,6 +57,9 @@
public final Set<OPartnerLink> allPartnerLinks = new HashSet<OPartnerLink>();
public final List<OProperty> properties = new ArrayList<OProperty>();
+
+ /** All declared extensions in the process. **/
+ public final Set<OExtension> declaredExtensions = new HashSet<OExtension>();
/** Date process was compiled. */
@@ -186,6 +186,18 @@
return buf.toString();
}
+ }
+
+ public static class OExtension extends OBase {
+ static final long serialVersionUID = -1L ;
+ public String namespaceURI;
+ public boolean mustUnderstand;
+
+ public OExtension(OProcess process) { super(process); }
+
+ public String toString() {
+ return "{OExtension " + namespaceURI + (mustUnderstand ? " mustUnderstand" : "") + "}";
+ }
}
public QName getQName() {
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=582638&r1=582637&r2=582638&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 07:38:43 2007
@@ -73,11 +73,15 @@
FaultData faultData = null;
- for (OAssign.Copy aCopy : oassign.copy) {
+ for (OAssign.OAssignOperation operation : oassign.operations) {
try {
- copy(aCopy);
+ if (operation instanceof OAssign.Copy) {
+ copy((OAssign.Copy)operation);
+ } else if (operation instanceof OAssign.ExtensionAssignOperation) {
+ invokeExtensionAssignOperation((OAssign.ExtensionAssignOperation)operation);
+ }
} catch (FaultException fault) {
- faultData = createFault(fault.getQName(), aCopy, fault
+ faultData = createFault(fault.getQName(), operation, fault
.getMessage());
break;
}
@@ -568,6 +572,10 @@
return lvalue;
}
+ private void invokeExtensionAssignOperation(OAssign.ExtensionAssignOperation eao) throws FaultException {
+ throw new UnsupportedOperationException("ExtensionAssignOperations are not yet supported.");
+ }
+
private class EvaluationContextProxy implements EvaluationContext {
private Variable _var;
Modified: ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java (original)
+++ ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java Sun Oct 7 07:38:43 2007
@@ -204,4 +204,9 @@
public void recoveredFromError(SourceLocation location, CompilationException error) {
}
+
+ public boolean isExtensionDeclared(String namespace) {
+ // TODO Auto-generated method stub
+ return false;
+ }
}
Added: ode/trunk/bpel-scripts/src/main/resources/2.0/good/assign/AssignExt-2.0.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-scripts/src/main/resources/2.0/good/assign/AssignExt-2.0.bpel?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-scripts/src/main/resources/2.0/good/assign/AssignExt-2.0.bpel (added)
+++ ode/trunk/bpel-scripts/src/main/resources/2.0/good/assign/AssignExt-2.0.bpel Sun Oct 7 07:38:43 2007
@@ -0,0 +1,76 @@
+<!--
+ ~ 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.
+ -->
+
+<!--
+<assign> Test Case
+DESCRIPTION
+-->
+
+<process name="assignext"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="uri:testing"
+ xmlns:t="uri:testing"
+ xmlns:ext="urn:ode:test-ext">
+
+ <import location="../test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="uri:testing" />
+
+ <partnerLinks>
+ <partnerLink name="testPartnerLink"
+ partnerLinkType="test:PartnerLinkType1"
+ myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="var1" messageType="test:Message1"/>
+ <variable name="var2" type="xsd:string"/>
+ </variables>
+
+ <extensions>
+ <extension namespace="urn:ode:test-ext" mustUnderstand="yes"/>
+ </extensions>
+
+ <sequence>
+ <receive name="startReceive"
+ createInstance="yes"
+ partnerLink="testPartnerLink"
+ portType="test:PortType1"
+ operation="opTwoWay"
+ variable="var1"/>
+
+ <assign name="assign1">
+ <extensionAssignOperation>
+ <ext:customAssignOperation>
+ custom stuff goes here
+ </ext:customAssignOperation>
+ </extensionAssignOperation>
+ </assign>
+
+ <reply name="endReply"
+ operation="opTwoWay"
+ partnerLink="testPartnerLink"
+ portType="test:PortType1"
+ variable="var1"/>
+
+ </sequence>
+
+</process>
Added: ode/trunk/bpel-scripts/src/main/resources/2.0/good/extensionActivity/ExtensionActivity1-2.0.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-scripts/src/main/resources/2.0/good/extensionActivity/ExtensionActivity1-2.0.bpel?rev=582638&view=auto
==============================================================================
--- ode/trunk/bpel-scripts/src/main/resources/2.0/good/extensionActivity/ExtensionActivity1-2.0.bpel (added)
+++ ode/trunk/bpel-scripts/src/main/resources/2.0/good/extensionActivity/ExtensionActivity1-2.0.bpel Sun Oct 7 07:38:43 2007
@@ -0,0 +1,74 @@
+<!--
+ ~ 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.
+ -->
+
+<!--
+<assign> Test Case
+DESCRIPTION
+-->
+
+<process name="extensionActivity"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="uri:testing"
+ xmlns:t="uri:testing"
+ xmlns:ext="urn:ode:test-ext">
+
+ <import location="../test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="uri:testing" />
+
+ <partnerLinks>
+ <partnerLink name="testPartnerLink"
+ partnerLinkType="test:PartnerLinkType1"
+ myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="var1" messageType="test:Message1"/>
+ <variable name="var2" type="xsd:string"/>
+ </variables>
+
+ <extensions>
+ <extension namespace="urn:ode:test-ext" mustUnderstand="no"/>
+ </extensions>
+
+ <sequence>
+ <receive name="startReceive"
+ createInstance="yes"
+ partnerLink="testPartnerLink"
+ portType="test:PortType1"
+ operation="opTwoWay"
+ variable="var1"/>
+
+ <extensionActivity>
+ <ext:customAssignOperation>
+ custom stuff goes here
+ </ext:customAssignOperation>
+ </extensionActivity>
+
+ <reply name="endReply"
+ operation="opTwoWay"
+ partnerLink="testPartnerLink"
+ portType="test:PortType1"
+ variable="var1"/>
+
+ </sequence>
+
+</process>
Modified: ode/trunk/bpel-scripts/src/main/resources/2.0/good/test.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-scripts/src/main/resources/2.0/good/test.wsdl?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-scripts/src/main/resources/2.0/good/test.wsdl (original)
+++ ode/trunk/bpel-scripts/src/main/resources/2.0/good/test.wsdl Sun Oct 7 07:38:43 2007
@@ -26,7 +26,8 @@
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
+ xmlns:plnk2="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
<wsdl:documentation>
WSDL filed used by a lot of the test cases. Provides a message type
@@ -100,6 +101,11 @@
<plnk:role name="me" portType="tns:PortType1"/>
<plnk:role name="you" portType="tns:PortType1"/>
</plnk:partnerLinkType>
+
+ <plnk2:partnerLinkType name="PartnerLinkType1">
+ <plnk2:role name="me" portType="tns:PortType1"/>
+ <plnk2:role name="you" portType="tns:PortType1"/>
+ </plnk2:partnerLinkType>
</wsdl:definitions>
Modified: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestStaticOnMessage/TestStaticOnMessage.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestStaticOnMessage/TestStaticOnMessage.wsdl?rev=582638&r1=582637&r2=582638&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestStaticOnMessage/TestStaticOnMessage.wsdl (original)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestStaticOnMessage/TestStaticOnMessage.wsdl Sun Oct 7 07:38:43 2007
@@ -26,7 +26,7 @@
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop">
<wsdl:types>
@@ -90,19 +90,19 @@
</wsdl:port>
</wsdl:service>
- <bpws:property name="testProbeID" type="xsd:string"/>
- <bpws:propertyAlias propertyName="tns:testProbeID" messageType="tns:requestMessage" part="requestMessageData">
- <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+ <vprop:property name="testProbeID" type="xsd:string"/>
+ <vprop:propertyAlias propertyName="tns:testProbeID" messageType="tns:requestMessage" part="requestMessageData">
+ <vprop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
testMessage/requestID
- </bpws:query>
- </bpws:propertyAlias>
+ </vprop:query>
+ </vprop:propertyAlias>
- <bpws:property name="testProbeData" type="xsd:string"/>
- <bpws:propertyAlias propertyName="tns:testProbeData" messageType="tns:requestMessage" part="requestMessageData">
- <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+ <vprop:property name="testProbeData" type="xsd:string"/>
+ <vprop:propertyAlias propertyName="tns:testProbeData" messageType="tns:requestMessage" part="requestMessageData">
+ <vprop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
testMessage/requestText
- </bpws:query>
- </bpws:propertyAlias>
+ </vprop:query>
+ </vprop:propertyAlias>
<plnk:partnerLinkType name="TestStaticOnMessage1Request">