You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ms...@apache.org on 2007/09/06 07:46:57 UTC

svn commit: r573153 [7/9] - in /ode/trunk: ./ axis2/src/main/java/org/apache/ode/axis2/ bpel-api/src/ bpel-api/src/main/java/org/apache/ode/bpel/explang/ bpel-api/src/main/java/org/apache/ode/bpel/iapi/ bpel-api/src/main/java/org/apache/ode/bpel/pmapi/...

Modified: ode/trunk/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java (original)
+++ ode/trunk/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java Wed Sep  5 22:46:42 2007
@@ -1,169 +1,181 @@
-/*
- * 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.
- */
-
-/*
- * 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.iapi.BpelEngineException;
-import org.apache.ode.bpel.iapi.ContextException;
-import org.apache.ode.bpel.iapi.Message;
-import org.apache.ode.bpel.iapi.MessageExchange.Status;
-import org.apache.ode.bpel.iapi.MessageExchangeContext;
-import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
-import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
-import org.apache.ode.utils.DOMUtils;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-import javax.xml.namespace.QName;
-import java.io.IOException;
-
-/**
- * This is a simple MessageExchangeContext implementation
- * that only supports a set of "well known" portTypes used
- * for testing.
- *
- *
- */
-public class MessageExchangeContextImpl implements MessageExchangeContext {
-	
-	private static final String PROBE_NS = "http://ode/bpel/unit-test/ProbeService.wsdl";
-	private static final String FAULT_NS = "http://ode/bpel/unit-test/FaultService.wsdl";
-
-	// Probe Service is a simple concatination service
-	private static final QName probePT = new QName(PROBE_NS,"probeMessagePT");
-	private static final QName faultPT = new QName(FAULT_NS,"faultMessagePT");
-	
-	private Message currentResponse;
-	
-	public void invokePartner(PartnerRoleMessageExchange mex)
-			throws ContextException {
-		QName calledPT = mex.getPortType().getQName();
-		
-		if (calledPT.equals(probePT)) {
-			invokeProbeService(mex);
-		}
-		
-		if (calledPT.equals(faultPT)) {
-			invokeFaultService(mex);
-		}
-
-	}
-
-	public void onAsyncReply(MyRoleMessageExchange myRoleMex)
-			throws BpelEngineException {
-		Status mStat = myRoleMex.getStatus();
-        if ( mStat == Status.RESPONSE ) {
-			currentResponse = myRoleMex.getResponse();
-		}
-		myRoleMex.complete();
-	}
-	
-	private void invokeProbeService(PartnerRoleMessageExchange prmx) {
-		Message msg = prmx.getRequest();
-		Element elm1 = prmx.getRequest().getPart("probeName");
-		Element elm2 = prmx.getRequest().getPart("probeData");
-		
-		if ( elm1 != null && elm2 != null ) {
-			String cat = elm2.getTextContent()+" -> "+elm1.getTextContent();
-			elm2.setTextContent(cat);
-			msg.setMessagePart("probeData", elm2);
-            final Message response = prmx.createMessage(prmx.getOperation().getOutput().getMessage().getQName());
-
-            response.setMessage(msg.getMessage());
-			prmx.reply(response);
-		}
-	}
-	
-	private void invokeFaultService(PartnerRoleMessageExchange prmx) {
-		QName errorMsgType = new QName(FAULT_NS,"errorMessage");
-		QName responseMsgType = new QName(FAULT_NS,"faultMessage");
-		Message faultMsg = prmx.createMessage(errorMsgType);
-		Message responseMsg = prmx.createMessage(responseMsgType);
-
-		String ind1 = prmx.getRequest().getPart("faultIndicator1").getTextContent();
-		String ind2 = prmx.getRequest().getPart("faultIndicator2").getTextContent();
-		String inputData = prmx.getRequest().getPart("faultData").getTextContent();
-		
-		StringBuffer faultData = new StringBuffer("<message><errorID>FA-1</errorID><errorText>");
-		faultData.append(inputData);
-		faultData.append("</errorText></message>");
-		
-		StringBuffer responseData = new StringBuffer("<message><faultName>FA-NoFault</faultName><faultData>");
-		responseData.append(inputData);
-		responseData.append("</faultData></message>");
-		
-		
-		Element faultResponse = null;
-		Element response = null;
-		try {
-			faultResponse = DOMUtils.stringToDOM(faultData.toString());
-			response = DOMUtils.stringToDOM(responseData.toString());
-		} catch (SAXException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		
-		
-		// TODO: Question - how does one set parts that are of a simple xsd type?
-		faultMsg.setMessage(faultResponse);
-		responseMsg.setMessage(response);
-		
-		if ( ind1.equals("yes")){
-			prmx.replyWithFault(new QName(FAULT_NS,"FaultMessage1"), faultMsg);
-		} else {
-			if ( ind2.equals("yes")){
-				prmx.replyWithFault(new QName(FAULT_NS,"FaultMessage2"), faultMsg);
-			} else {
-				prmx.replyWithFault(new QName(FAULT_NS,"UnKnownFault"), faultMsg);
-			}
-		}
-
-	}
-	
-	public Message getCurrentResponse() {
-		return currentResponse;
-	}
-	
-	public void clearCurrentResponse() {
-		currentResponse = null;
-	}
-
-}
+/*
+ * 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.
+ */
+
+/*
+ * 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 java.io.IOException;
+import java.util.Collections;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.apache.ode.bpel.iapi.BpelEngineException;
+import org.apache.ode.bpel.iapi.ContextException;
+import org.apache.ode.bpel.iapi.EndpointReference;
+import org.apache.ode.bpel.iapi.InvocationStyle;
+import org.apache.ode.bpel.iapi.Message;
+import org.apache.ode.bpel.iapi.MessageExchangeContext;
+import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
+import org.apache.ode.bpel.iapi.PartnerRoleChannel;
+import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
+import org.apache.ode.utils.DOMUtils;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+/**
+ * This is a simple MessageExchangeContext implementation
+ * that only supports a set of "well known" portTypes used
+ * for testing.
+ *
+ *
+ */
+public class MessageExchangeContextImpl implements MessageExchangeContext {
+	
+	private static final String PROBE_NS = "http://ode/bpel/unit-test/ProbeService.wsdl";
+	private static final String FAULT_NS = "http://ode/bpel/unit-test/FaultService.wsdl";
+
+	// Probe Service is a simple concatination service
+	private static final QName probePT = new QName(PROBE_NS,"probeMessagePT");
+	private static final QName faultPT = new QName(FAULT_NS,"faultMessagePT");
+
+	
+	public void invokePartnerUnreliable(PartnerRoleMessageExchange mex)
+			throws ContextException {
+		QName calledPT = mex.getPortType().getQName();
+		
+		if (calledPT.equals(probePT)) {
+			invokeProbeService(mex);
+		}
+		
+		if (calledPT.equals(faultPT)) {
+			invokeFaultService(mex);
+		}
+
+	}
+
+	public void onMyRoleMessageExchangeStateChanged(MyRoleMessageExchange myRoleMex)
+			throws BpelEngineException {
+
+	}
+	
+	private void invokeProbeService(PartnerRoleMessageExchange prmx) {
+		Message msg = prmx.getRequest();
+		Element elm1 = prmx.getRequest().getPart("probeName");
+		Element elm2 = prmx.getRequest().getPart("probeData");
+		
+		if ( elm1 != null && elm2 != null ) {
+			String cat = elm2.getTextContent()+" -> "+elm1.getTextContent();
+			elm2.setTextContent(cat);
+            final Message response = prmx.createMessage(prmx.getOperation().getOutput().getMessage().getQName());
+            response.setMessage(msg.getMessage());
+            response.setMessagePart("probeData", elm2);
+			prmx.reply(response);
+		}
+	}
+	
+	private void invokeFaultService(PartnerRoleMessageExchange prmx) {
+		QName errorMsgType = new QName(FAULT_NS,"errorMessage");
+		QName responseMsgType = new QName(FAULT_NS,"faultMessage");
+		Message faultMsg = prmx.createMessage(errorMsgType);
+		Message responseMsg = prmx.createMessage(responseMsgType);
+
+		String ind1 = prmx.getRequest().getPart("faultIndicator1").getTextContent();
+		String ind2 = prmx.getRequest().getPart("faultIndicator2").getTextContent();
+		String inputData = prmx.getRequest().getPart("faultData").getTextContent();
+		
+		StringBuffer faultData = new StringBuffer("<message><errorID>FA-1</errorID><errorText>");
+		faultData.append(inputData);
+		faultData.append("</errorText></message>");
+		
+		StringBuffer responseData = new StringBuffer("<message><faultName>FA-NoFault</faultName><faultData>");
+		responseData.append(inputData);
+		responseData.append("</faultData></message>");
+		
+		
+		Element faultResponse = null;
+		Element response = null;
+		try {
+			faultResponse = DOMUtils.stringToDOM(faultData.toString());
+			response = DOMUtils.stringToDOM(responseData.toString());
+		} catch (SAXException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		
+		// TODO: Question - how does one set parts that are of a simple xsd type?
+		faultMsg.setMessage(faultResponse);
+		responseMsg.setMessage(response);
+		
+		if ( ind1.equals("yes")){
+			prmx.replyWithFault(new QName(FAULT_NS,"FaultMessage1"), faultMsg);
+		} else {
+			if ( ind2.equals("yes")){
+				prmx.replyWithFault(new QName(FAULT_NS,"FaultMessage2"), faultMsg);
+			} else {
+				prmx.replyWithFault(new QName(FAULT_NS,"UnKnownFault"), faultMsg);
+			}
+		}
+
+	}
+
+
+    public void cancel(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public Set<InvocationStyle> getSupportedInvocationStyle(PartnerRoleChannel prc, EndpointReference partnerEpr) {
+        return Collections.singleton(InvocationStyle.UNRELIABLE);
+    }
+
+    public void invokePartnerReliable(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void invokePartnerTransacted(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+
+}

Modified: ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java (original)
+++ ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java Wed Sep  5 22:46:42 2007
@@ -18,16 +18,18 @@
  */
 package org.apache.ode.test;
 
-import org.apache.ode.bpel.iapi.ContextException;
-import org.apache.ode.bpel.iapi.MessageExchange;
 import org.junit.Ignore;
 import org.junit.Test;
-
-import javax.xml.namespace.QName;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import javax.xml.namespace.QName;
+
+import org.apache.ode.bpel.iapi.ContextException;
+import org.apache.ode.bpel.iapi.MessageExchange.AckType;
+import org.junit.Test;
+
 public class BasicActivities20Test extends BPELTestAbstract {
 	
 	@Test public void testHelloWorld2() throws Throwable {
@@ -64,9 +66,9 @@
             null);
         inv.minimumWaitMs=5*1000L;
         inv.maximumWaitMs=7*1000L;
-        inv.expectedStatus = MessageExchange.Status.ASYNC;
-        inv.expectedFinalStatus = MessageExchange.Status.RESPONSE;
-        
+        inv.expectedFinalStatus = AckType.RESPONSE;
+
+
         go();
     }
     
@@ -82,8 +84,8 @@
             null);
         inv.minimumWaitMs=4*1000L;
         inv.maximumWaitMs=7*1000L;
-        inv.expectedStatus = MessageExchange.Status.ASYNC;
-        inv.expectedFinalStatus = MessageExchange.Status.RESPONSE;
+        inv.expectedFinalStatus = AckType.RESPONSE;
+        
         
         go();
     }
@@ -98,8 +100,8 @@
             "<message><body><start xmlns=\"http://ode.apache.org/example\">start</start></body></message>",
             null);
         inv.maximumWaitMs=20*1000L;
-        inv.expectedStatus = MessageExchange.Status.ASYNC;
-        inv.expectedFinalStatus = MessageExchange.Status.RESPONSE;
+        inv.expectedFinalStatus = AckType.RESPONSE;
+
 
         go();
     }

Modified: ode/trunk/bpel-test/src/test/java/org/apache/ode/test/CompensationHandling20Test.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/CompensationHandling20Test.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/java/org/apache/ode/test/CompensationHandling20Test.java (original)
+++ ode/trunk/bpel-test/src/test/java/org/apache/ode/test/CompensationHandling20Test.java Wed Sep  5 22:46:42 2007
@@ -23,6 +23,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.ode.bpel.iapi.MessageExchange;
+import org.apache.ode.bpel.iapi.MessageExchange.AckType;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -56,7 +57,7 @@
 						"testImplicitFaultHandlerService"), "request", 
 						"<message><requestID>Start TestImplicitFaultHandler</requestID><requestText>Event TestImplicitFaultHandler</requestText><faultIndicator1>yes</faultIndicator1><faultIndicator2>no</faultIndicator2></message>",
 						null);
-		inv.expectedFinalStatus = MessageExchange.Status.FAULT;
+		inv.expectedFinalStatus = AckType.FAULT;
 		inv.expectedResponsePattern = Pattern.compile(".*Event TestFaultWithVariable1 -&gt; caught FaultMessage1 -&gt; Event TestFaultWithVariable1 -&gt; process complete.*");
 
 		go();

Modified: ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java (original)
+++ ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java Wed Sep  5 22:46:42 2007
@@ -1,59 +1,59 @@
-/*
- * 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.junit.Test;
-
-public class DataHandling20Test extends BPELTestAbstract {
-
-    @Test public void testXPathNamespace1() throws Throwable {
-        go("/bpel/2.0/TestXPathNamespace1");
-    }
-    @Test public void testXPathNamespace2() throws Throwable {
-        go("/bpel/2.0/TestXPathNamespace2");
-    }
-    @Test public void testSubTreeAssign() throws Throwable {
-        go("/bpel/2.0/TestSubTreeAssign");
-    }
-    @Test public void testAssignActivity1() throws Throwable {
-        go("/bpel/2.0/TestAssignActivity1");
-    }
-    @Test public void testAssignActivity2() throws Throwable {
-        go("/bpel/2.0/TestAssignActivity2");
-    }
-    @Test public void testAssignComplex() throws Throwable {
-        go("/bpel/2.0/TestAssignComplex");
-    }
-    @Test public void testSimpleTypeParts() throws Throwable {
-        go("/bpel/2.0/TestSimpleTypeParts");
-    }
-    @Test public void testSimpleVariableType() throws Throwable {
-        go("/bpel/2.0/TestSimpleVariableType");
-    }
-    @Test public void testXslTransform() throws Throwable {
-        go("/bpel/2.0/TestXslTransform");
-    }
-    @Test public void testSplit() throws Throwable {
-        go("/bpel/2.0/TestSplit");
-    }
-    @Test public void testCounter() throws Throwable {
-        go("/bpel/2.0/TestCounter");
-    }
-
-}
+/*
+ * 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.junit.Test;
+
+public class DataHandling20Test extends BPELTestAbstract {
+
+    @Test public void testXPathNamespace1() throws Throwable {
+        go("/bpel/2.0/TestXPathNamespace1");
+    }
+    @Test public void testXPathNamespace2() throws Throwable {
+        go("/bpel/2.0/TestXPathNamespace2");
+    }
+    @Test public void testSubTreeAssign() throws Throwable {
+        go("/bpel/2.0/TestSubTreeAssign");
+    }
+    @Test public void testAssignActivity1() throws Throwable {
+        go("/bpel/2.0/TestAssignActivity1");
+    }
+    @Test public void testAssignActivity2() throws Throwable {
+        go("/bpel/2.0/TestAssignActivity2");
+    }
+    @Test public void testAssignComplex() throws Throwable {
+        go("/bpel/2.0/TestAssignComplex");
+    }
+    @Test public void testSimpleTypeParts() throws Throwable {
+        go("/bpel/2.0/TestSimpleTypeParts");
+    }
+    @Test public void testSimpleVariableType() throws Throwable {
+        go("/bpel/2.0/TestSimpleVariableType");
+    }
+    @Test public void testXslTransform() throws Throwable {
+        go("/bpel/2.0/TestXslTransform");
+    }
+    @Test public void testSplit() throws Throwable {
+        go("/bpel/2.0/TestSplit");
+    }
+    @Test public void testCounter() throws Throwable {
+        go("/bpel/2.0/TestCounter");
+    }
+
+}

Modified: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFaultHandlers/testFaultHandlers.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFaultHandlers/testFaultHandlers.bpel?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFaultHandlers/testFaultHandlers.bpel (original)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFaultHandlers/testFaultHandlers.bpel Wed Sep  5 22:46:42 2007
@@ -1,40 +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.
--->
-
-<process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable ../../../../../../../bpel-schemas/src/main/resources/wsbpel_executable.xsd"
-	xmlns:tns="http://ode/bpel/unit-test/testFaultHandlers"
-	xmlns:wns="http://ode/bpel/unit-test/testFaultHandlers.wsdl"
-	xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
- xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
- name="TestFaultHandlersProcess"
-	targetNamespace="http://ode/bpel/unit-test/testFaultHandlers"
-	queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
-	expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+<!--
+	~ 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable ../../../../../../../bpel-schemas/src/main/resources/wsbpel_executable.xsd"
+	xmlns:tns="http://ode/bpel/unit-test/testFaultHandlers"
+	xmlns:wns="http://ode/bpel/unit-test/testFaultHandlers.wsdl"
+	xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ name="TestFaultHandlersProcess"
+	targetNamespace="http://ode/bpel/unit-test/testFaultHandlers"
+	queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+	expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
  suppressJoinFailure="yes">
-
-	<import location="testFaultHandlers.wsdl"
-		namespace="http://ode/bpel/unit-test/testFaultHandlers.wsdl"
-		importType="http://schemas.xmlsoap.org/wsdl/" />
-	<import location="../ProbeService/probeService.wsdl"
-		namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
-		importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+	<import location="testFaultHandlers.wsdl"
+		namespace="http://ode/bpel/unit-test/testFaultHandlers.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/" />
+	<import location="../ProbeService/probeService.wsdl"
+		namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/"/>
 
 <!-- Unit test fault handlers	-->
 <!--	throw 					-->
@@ -59,9 +59,9 @@
 	<catchAll>
 	   <sequence>
 	   	  	<assign>
-	      		<copy>
-	      			<from>
-	      				<literal><![CDATA[caught fault with catchAll]]></literal>
+	      		<copy>
+	      			<from>
+	      				<literal><![CDATA[caught fault with catchAll]]></literal>
 	      			</from>
 	        		<to variable="probeInput" part="probeName"/>
 	      		</copy>
@@ -120,9 +120,9 @@
 	   			<sequence>
 	   			
 	   				  <assign>
-	      				<copy>
-	      					<from>
-	      						<literal><![CDATA[caught testFault]]></literal>
+	      				<copy>
+	      					<from>
+	      						<literal><![CDATA[caught testFault]]></literal>
 	      					</from>
 	        				<to variable="probeInput" part="probeName"/>
 	      				</copy>
@@ -152,54 +152,56 @@
 		</faultHandlers>
 
 	  <if>
-		<!-- throws a named fault -->
+		<!-- throws a named fault -->
 		<condition>$request.faultIndicator1 = 'yes'</condition>
-        <sequence>
-            <assign>
-                    <copy>
-                        <from>
-                            <literal><![CDATA[throw testFault]]></literal>
-                        </from>
-                        <to variable="probeInput" part="probeName"/>
-                    </copy>
-            </assign> 
-            <invoke name="probe1" partnerLink="probe" 
-                        portType="prb:probeMessagePT" 
-                        operation="probe"
-                        inputVariable="probeInput"  
-                        outputVariable="probeInput">
-            </invoke>
-            <throw faultName="tns:testFault"/>
-        </sequence>
-		<!-- throws an unknown fault -->
-		<elseif>
-			<condition>$request.faultIndicator2 = 'yes'</condition>
-			<sequence>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[throw unknown fault]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign> 
-				<invoke name="probe1" partnerLink="probe" 
-					portType="prb:probeMessagePT" 
-					operation="probe"
-					inputVariable="probeInput"  
-					outputVariable="probeInput">
-				</invoke>
-				
-				<throw faultName="tns:unknownFault"/>
-			</sequence>
+	  	<then>
+	  		<sequence>
+	  			<assign>
+	      				<copy>
+	      					<from>
+	      						<literal><![CDATA[throw testFault]]></literal>
+	      					</from>
+	        				<to variable="probeInput" part="probeName"/>
+	      				</copy>
+	  			</assign> 
+	    		<invoke name="probe1" partnerLink="probe" 
+	            			portType="prb:probeMessagePT" 
+	            			operation="probe"
+	            			inputVariable="probeInput"  
+	            			outputVariable="probeInput">
+	    		</invoke>
+	  			<throw faultName="tns:testFault"/>
+	  		</sequence>
+	  	</then>
+		<!-- throws an unknown fault -->
+		<elseif>
+			<condition>$request.faultIndicator2 = 'yes'</condition>
+			<sequence>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[throw unknown fault]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign> 
+				<invoke name="probe1" partnerLink="probe" 
+					portType="prb:probeMessagePT" 
+					operation="probe"
+					inputVariable="probeInput"  
+					outputVariable="probeInput">
+				</invoke>
+				
+				<throw faultName="tns:unknownFault"/>
+			</sequence>
 		</elseif>
 	  </if>
 	  </scope>
 
 	  			<assign>
-	      				<copy>
-	      					<from>
-	      						<literal><![CDATA[process complete]]></literal>
+	      				<copy>
+	      					<from>
+	      						<literal><![CDATA[process complete]]></literal>
 	      					</from>
 	        				<to variable="probeInput" part="probeName"/>
 	      				</copy>

Modified: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity1/TestActivityFlow.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity1/TestActivityFlow.bpel?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity1/TestActivityFlow.bpel (original)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity1/TestActivityFlow.bpel Wed Sep  5 22:46:42 2007
@@ -1,308 +1,310 @@
-<!--
-	~ 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable ../../../../../../../bpel-schemas/src/main/resources/wsbpel_executable.xsd"
-	xmlns:tns="http://ode/bpel/unit-test/testFlowActivity1"
-	xmlns:wns="http://ode/bpel/unit-test/testFlowActivity1.wsdl"
-	xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
- 	xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
-	xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
- 	name="TestActivityFlow"
-	targetNamespace="http://ode/bpel/unit-test/testFlowActivity1"
- 	suppressJoinFailure="yes"
-	queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
-	expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
-
-	<!-- Test Flow using XPath 20 -->
- 
-	<import location="TestActivityFlow.wsdl"
-		namespace="http://ode/bpel/unit-test/testFlowActivity1.wsdl"
-		importType="http://schemas.xmlsoap.org/wsdl/" />
-	<import location="../ProbeService/probeService.wsdl"
-		namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
-		importType="http://schemas.xmlsoap.org/wsdl/"/>
-		
-	<!-- test control flow elements -->
-	<!--	sequence 				-->
-	<!--	flow ( links ) 			-->
-	<!--	swith 					-->
-	<!--	while 					-->
-	<partnerLinks>
-		<partnerLink name="request" partnerLinkType="wns:testFlowActivityRequest" myRole="testFlowActivityService"/>
-		<partnerLink name="probe" partnerLinkType="wns:probeRequest" partnerRole="probeService" initializePartnerRole="yes"/>
-	</partnerLinks>
-	<variables>
-		<variable name="request" messageType="wns:requestMessage"/>
-		<variable name="probeInput" messageType="prb:probeMessage"/>
-		<variable name="reply" messageType="wns:replyMessage"/>
-		<variable name="internalState" messageType="wns:internalProcessData"/>
-	</variables>
-	<sequence>
-		<flow>
-			<links>
-				<link name="receive-to-assign1"/>
-				<link name="assign1-to-probe1"/>
-				<link name="assign1-to-probe2"/>
-				<link name="probe1-to-probe3"/>
-				<link name="probe2-to-probe3"/>
-			</links>
-			<receive name="receive1" partnerLink="request" portType="wns:testFlowActivityPT"
-				operation="request" variable="request" createInstance="yes">
-				<sources>
-					<source linkName="receive-to-assign1"/>
-				</sources>
-			</receive>
-			<!-- Copy input variables to internal accumulators -->
-			<!-- After the copy the process splits into two execution paths -->
-			<sequence>
-				<targets>
-					<target linkName="receive-to-assign1"/>
-				</targets>
-				<sources>
-					<source linkName="assign1-to-probe1"/>
-					<source linkName="assign1-to-probe2"/>
-				</sources>
-				<assign name="assign1">
-					<copy>
-						<from>$request.requestMessageData/requestID</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-					<copy>
-						<from variable="request" property="wns:testProbeData"/>
-						<to variable="probeInput" part="probeData"/>
-					</copy>
-				</assign>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[root process splits into A and B]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe2" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-			<!-- probe1 outbound status is dependent on the request input testFlow1 -->
-			<sequence>
-				<targets>
-					<target linkName="assign1-to-probe1"/>
-				</targets>
-				<sources>
-					<source linkName="probe1-to-probe3">
-						<transitionCondition>bpws:getVariableProperty("request", "wns:testFlow1") =
-							'yes'</transitionCondition>
-					</source>
-				</sources>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[process A completes]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe3" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-			<!-- probe2 outbound status is dependent on the request input testFlow2 -->
-			<sequence>
-				<targets>
-					<target linkName="assign1-to-probe2"/>
-				</targets>
-				<sources>
-					<source linkName="probe2-to-probe3">
-						<transitionCondition>$request.requestMessageData/flowIndicators/indicatorTwo =
-							'yes'</transitionCondition>
-					</source>
-				</sources>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[process B completes]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe4" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-			<!-- The split execution path from assign1 joins on probe3 -->
-			<!-- Probe3 will only fire if the transition condition from probe1 and probe2 both evaluate to true -->
-			<sequence>
-				<targets>
-					<joinCondition>$probe1-to-probe3 and $probe2-to-probe3</joinCondition>
-					<target linkName="probe1-to-probe3"/>
-					<target linkName="probe2-to-probe3"/>
-				</targets>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[processes A and B merge on process C]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe5" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-		</flow>
-		<assign>
-			<copy>
-				<from>
-					<literal><![CDATA[merge into root process]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe6" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<!-- from the input data loopIndicator set the number of loop interations -->
-		<assign>
-			<copy>
-				<from>
-					<literal><![CDATA[test switch statement]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe7" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<if>
-			<condition>bpws:getVariableProperty("request", "wns:loopInd") = 'min'</condition>
-            <sequence>
-                <assign name="flow1-min-assign">
-                    <copy>
-                        <from>5</from>
-                        <to variable="internalState" part="loop1"/>
-                    </copy>
-                    <copy>
-                        <from>
-                            <literal><![CDATA[case min: set loop iterations = 5]]></literal>
-                        </from>
-                        <to variable="probeInput" part="probeName"/>
-                    </copy>
-                </assign>
-                <invoke name="probe8" partnerLink="probe" portType="prb:probeMessagePT"
-                    operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-                > </invoke>
-            </sequence>
-			<elseif>
-				<condition>$request.requestMessageData/loopIndicator = 'max'</condition>
-				<sequence>
-					<assign name="flow1-max-assign">
-						<copy>
-							<from>10</from>
-							<to variable="internalState" part="loop1"/>
-						</copy>
-						<copy>
-							<from>
-								<literal><![CDATA[case max: set loop iterations = 10]]></literal>
-							</from>
-							<to variable="probeInput" part="probeName"/>
-						</copy>
-					</assign>
-					<invoke name="probe9" partnerLink="probe" portType="prb:probeMessagePT"
-						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-						> </invoke>
-				</sequence>
-			</elseif>
-			<else>
-				<sequence>
-					<assign name="flow1-default-assign">
-						<copy>
-							<from>0</from>
-							<to variable="internalState" part="loop1"/>
-						</copy>
-						<copy>
-							<from>
-								<literal><![CDATA[otherwise: set loop iterations = 0]]></literal>
-							</from>
-							<to variable="probeInput" part="probeName"/>
-						</copy>
-					</assign>
-					<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT"
-						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-					> </invoke>
-				</sequence>
-			</else>
-		</if>
-		
-		<assign name="while-increment-initialize">
-			<copy>
-				<from>0</from>
-				<to variable="internalState" part="loop1Counter"></to>
-			</copy>
-			<copy>
-				<from>
-					<literal><![CDATA[test loop iterations]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<while>
-			<condition>$internalState.loop1Counter &lt; $internalState.loop1</condition>
-			<sequence>
-				<assign name="while-increment">
-					<copy>
-						<from>$internalState.loop1Counter + 1</from>
-						<to variable="internalState" part="loop1Counter"/>
-					</copy>
-					<copy>
-						<from>$internalState.loop1Counter + 1</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe11" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"/>
-
-			</sequence>
-		</while>
-		<!-- copy internal accumulators to the reply message -->
-		<assign>
-			<copy>
-				<from>
-					<literal><![CDATA[test1Process complete]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe12" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<assign name="assign2">
-			<copy>
-				<from variable="probeInput" part="probeName"/>
-				<to variable="reply" part="replyID"/>
-			</copy>
-			<copy>
-				<from variable="probeInput" part="probeData"/>
-				<to variable="reply" part="replyText"/>
-			</copy>
-		</assign>
-		<reply name="reply" partnerLink="request" portType="wns:testFlowActivityPT" operation="request"
-			variable="reply"> </reply>
-	</sequence>
+<!--
+	~ 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable ../../../../../../../bpel-schemas/src/main/resources/wsbpel_executable.xsd"
+	xmlns:tns="http://ode/bpel/unit-test/testFlowActivity1"
+	xmlns:wns="http://ode/bpel/unit-test/testFlowActivity1.wsdl"
+	xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+ 	xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+	xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ 	name="TestActivityFlow"
+	targetNamespace="http://ode/bpel/unit-test/testFlowActivity1"
+ 	suppressJoinFailure="yes"
+	queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+	expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+	<!-- Test Flow using XPath 20 -->
+ 
+	<import location="TestActivityFlow.wsdl"
+		namespace="http://ode/bpel/unit-test/testFlowActivity1.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/" />
+	<import location="../ProbeService/probeService.wsdl"
+		namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/"/>
+		
+	<!-- test control flow elements -->
+	<!--	sequence 				-->
+	<!--	flow ( links ) 			-->
+	<!--	swith 					-->
+	<!--	while 					-->
+	<partnerLinks>
+		<partnerLink name="request" partnerLinkType="wns:testFlowActivityRequest" myRole="testFlowActivityService"/>
+		<partnerLink name="probe" partnerLinkType="wns:probeRequest" partnerRole="probeService" initializePartnerRole="yes"/>
+	</partnerLinks>
+	<variables>
+		<variable name="request" messageType="wns:requestMessage"/>
+		<variable name="probeInput" messageType="prb:probeMessage"/>
+		<variable name="reply" messageType="wns:replyMessage"/>
+		<variable name="internalState" messageType="wns:internalProcessData"/>
+	</variables>
+	<sequence>
+		<flow>
+			<links>
+				<link name="receive-to-assign1"/>
+				<link name="assign1-to-probe1"/>
+				<link name="assign1-to-probe2"/>
+				<link name="probe1-to-probe3"/>
+				<link name="probe2-to-probe3"/>
+			</links>
+			<receive name="receive1" partnerLink="request" portType="wns:testFlowActivityPT"
+				operation="request" variable="request" createInstance="yes">
+				<sources>
+					<source linkName="receive-to-assign1"/>
+				</sources>
+			</receive>
+			<!-- Copy input variables to internal accumulators -->
+			<!-- After the copy the process splits into two execution paths -->
+			<sequence>
+				<targets>
+					<target linkName="receive-to-assign1"/>
+				</targets>
+				<sources>
+					<source linkName="assign1-to-probe1"/>
+					<source linkName="assign1-to-probe2"/>
+				</sources>
+				<assign name="assign1">
+					<copy>
+						<from>$request.requestMessageData/requestID</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+					<copy>
+						<from variable="request" property="wns:testProbeData"/>
+						<to variable="probeInput" part="probeData"/>
+					</copy>
+				</assign>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[root process splits into A and B]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe2" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+			<!-- probe1 outbound status is dependent on the request input testFlow1 -->
+			<sequence>
+				<targets>
+					<target linkName="assign1-to-probe1"/>
+				</targets>
+				<sources>
+					<source linkName="probe1-to-probe3">
+						<transitionCondition>bpws:getVariableProperty("request", "wns:testFlow1") =
+							'yes'</transitionCondition>
+					</source>
+				</sources>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[process A completes]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe3" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+			<!-- probe2 outbound status is dependent on the request input testFlow2 -->
+			<sequence>
+				<targets>
+					<target linkName="assign1-to-probe2"/>
+				</targets>
+				<sources>
+					<source linkName="probe2-to-probe3">
+						<transitionCondition>$request.requestMessageData/flowIndicators/indicatorTwo =
+							'yes'</transitionCondition>
+					</source>
+				</sources>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[process B completes]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe4" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+			<!-- The split execution path from assign1 joins on probe3 -->
+			<!-- Probe3 will only fire if the transition condition from probe1 and probe2 both evaluate to true -->
+			<sequence>
+				<targets>
+					<joinCondition>$probe1-to-probe3 and $probe2-to-probe3</joinCondition>
+					<target linkName="probe1-to-probe3"/>
+					<target linkName="probe2-to-probe3"/>
+				</targets>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[processes A and B merge on process C]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe5" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+		</flow>
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[merge into root process]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe6" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<!-- from the input data loopIndicator set the number of loop interations -->
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[test switch statement]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe7" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<if>
+			<condition>bpws:getVariableProperty("request", "wns:loopInd") = 'min'</condition>
+			<then>
+				<sequence>
+					<assign name="flow1-min-assign">
+						<copy>
+							<from>5</from>
+							<to variable="internalState" part="loop1"/>
+						</copy>
+						<copy>
+							<from>
+								<literal><![CDATA[case min: set loop iterations = 5]]></literal>
+							</from>
+							<to variable="probeInput" part="probeName"/>
+						</copy>
+					</assign>
+					<invoke name="probe8" partnerLink="probe" portType="prb:probeMessagePT"
+						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+					> </invoke>
+				</sequence>
+			</then>
+			<elseif>
+				<condition>$request.requestMessageData/loopIndicator = 'max'</condition>
+				<sequence>
+					<assign name="flow1-max-assign">
+						<copy>
+							<from>10</from>
+							<to variable="internalState" part="loop1"/>
+						</copy>
+						<copy>
+							<from>
+								<literal><![CDATA[case max: set loop iterations = 10]]></literal>
+							</from>
+							<to variable="probeInput" part="probeName"/>
+						</copy>
+					</assign>
+					<invoke name="probe9" partnerLink="probe" portType="prb:probeMessagePT"
+						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+						> </invoke>
+				</sequence>
+			</elseif>
+			<else>
+				<sequence>
+					<assign name="flow1-default-assign">
+						<copy>
+							<from>0</from>
+							<to variable="internalState" part="loop1"/>
+						</copy>
+						<copy>
+							<from>
+								<literal><![CDATA[otherwise: set loop iterations = 0]]></literal>
+							</from>
+							<to variable="probeInput" part="probeName"/>
+						</copy>
+					</assign>
+					<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT"
+						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+					> </invoke>
+				</sequence>
+			</else>
+		</if>
+		
+		<assign name="while-increment-initialize">
+			<copy>
+				<from>0</from>
+				<to variable="internalState" part="loop1Counter"></to>
+			</copy>
+			<copy>
+				<from>
+					<literal><![CDATA[test loop iterations]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<while>
+			<condition>$internalState.loop1Counter &lt; $internalState.loop1</condition>
+			<sequence>
+				<assign name="while-increment">
+					<copy>
+						<from>$internalState.loop1Counter + 1</from>
+						<to variable="internalState" part="loop1Counter"/>
+					</copy>
+					<copy>
+						<from>$internalState.loop1Counter + 1</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe11" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"/>
+
+			</sequence>
+		</while>
+		<!-- copy internal accumulators to the reply message -->
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[test1Process complete]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe12" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<assign name="assign2">
+			<copy>
+				<from variable="probeInput" part="probeName"/>
+				<to variable="reply" part="replyID"/>
+			</copy>
+			<copy>
+				<from variable="probeInput" part="probeData"/>
+				<to variable="reply" part="replyText"/>
+			</copy>
+		</assign>
+		<reply name="reply" partnerLink="request" portType="wns:testFlowActivityPT" operation="request"
+			variable="reply"> </reply>
+	</sequence>
 </process>

Modified: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/TestActivityFlow.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/TestActivityFlow.bpel?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/TestActivityFlow.bpel (original)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/TestActivityFlow.bpel Wed Sep  5 22:46:42 2007
@@ -1,306 +1,308 @@
-<!--
-	~ 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable ../../../../../../../bpel-schemas/src/main/resources/wsbpel_executable.xsd"
-	xmlns:tns="http://ode/bpel/unit-test/testFlowActivity2"
-	xmlns:wns="http://ode/bpel/unit-test/testFlowActivity2.wsdl"
-	xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
- xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
-	xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
- name="TestActivityFlow"
-	targetNamespace="http://ode/bpel/unit-test/testFlowActivity2"
- suppressJoinFailure="yes">
- 
- <!-- Test Flow using XPath 10 -->
- 
-	<import location="TestActivityFlow.wsdl"
-		namespace="http://ode/bpel/unit-test/testFlowActivity2.wsdl"
-		importType="http://schemas.xmlsoap.org/wsdl/" />
-	<import location="../ProbeService/probeService.wsdl"
-		namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
-		importType="http://schemas.xmlsoap.org/wsdl/"/>
-		
-	<!-- test control flow elements -->
-	<!--	sequence 				-->
-	<!--	flow ( links ) 			-->
-	<!--	swith 					-->
-	<!--	while 					-->
-	<partnerLinks>
-		<partnerLink name="request" partnerLinkType="wns:testFlowActivityRequest" myRole="testFlowActivityService"/>
-		<partnerLink name="probe" partnerLinkType="wns:probeRequest" partnerRole="probeService" initializePartnerRole="yes"/>
-	</partnerLinks>
-	<variables>
-		<variable name="request" messageType="wns:requestMessage"/>
-		<variable name="probeInput" messageType="prb:probeMessage"/>
-		<variable name="reply" messageType="wns:replyMessage"/>
-		<variable name="internalState" messageType="wns:internalProcessData"/>
-	</variables>
-	<sequence>
-		<flow>
-			<links>
-				<link name="receive-to-assign1"/>
-				<link name="assign1-to-probe1"/>
-				<link name="assign1-to-probe2"/>
-				<link name="probe1-to-probe3"/>
-				<link name="probe2-to-probe3"/>
-			</links>
-			<receive name="receive1" partnerLink="request" portType="wns:testFlowActivityPT"
-				operation="request" variable="request" createInstance="yes">
-				<sources>
-					<source linkName="receive-to-assign1"/>
-				</sources>
-			</receive>
-			<!-- Copy input variables to internal accumulators -->
-			<!-- After the copy the process splits into two execution paths -->
-			<sequence>
-				<targets>
-					<target linkName="receive-to-assign1"/>
-				</targets>
-				<sources>
-					<source linkName="assign1-to-probe1"/>
-					<source linkName="assign1-to-probe2"/>
-				</sources>
-				<assign name="assign1">
-					<copy>
-						<from>$request.requestMessageData/requestID</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-					<copy>
-						<from variable="request" property="wns:testProbeData"/>
-						<to variable="probeInput" part="probeData"/>
-					</copy>
-				</assign>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[root process splits into A and B]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe2" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-			<!-- probe1 outbound status is dependent on the request input testFlow1 -->
-			<sequence>
-				<targets>
-					<target linkName="assign1-to-probe1"/>
-				</targets>
-				<sources>
-					<source linkName="probe1-to-probe3">
-						<transitionCondition>bpws:getVariableProperty("request", "wns:testFlow1") =
-							'yes'</transitionCondition>
-					</source>
-				</sources>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[process A completes]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe3" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-			<!-- probe2 outbound status is dependent on the request input testFlow2 -->
-			<sequence>
-				<targets>
-					<target linkName="assign1-to-probe2"/>
-				</targets>
-				<sources>
-					<source linkName="probe2-to-probe3">
-						<transitionCondition>$request.requestMessageData/flowIndicators/indicatorTwo =
-							'yes'</transitionCondition>
-					</source>
-				</sources>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[process B completes]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe4" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-			<!-- The split execution path from assign1 joins on probe3 -->
-			<!-- Probe3 will only fire if the transition condition from probe1 and probe2 both evaluate to true -->
-			<sequence>
-				<targets>
-					<joinCondition>$probe1-to-probe3 and $probe2-to-probe3</joinCondition>
-					<target linkName="probe1-to-probe3"/>
-					<target linkName="probe2-to-probe3"/>
-				</targets>
-				<assign>
-					<copy>
-						<from>
-							<literal><![CDATA[processes A and B merge on process C]]></literal>
-						</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe5" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-				> </invoke>
-			</sequence>
-		</flow>
-		<assign>
-			<copy>
-				<from>
-					<literal><![CDATA[merge into root process]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe6" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<!-- from the input data loopIndicator set the number of loop interations -->
-		<assign>
-			<copy>
-				<from>
-					<literal><![CDATA[test switch statement]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe7" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<if>
-			<condition>bpws:getVariableProperty("request", "wns:loopInd") = 'min'</condition>
-            <sequence>
-                <assign name="flow1-min-assign">
-                    <copy>
-                        <from>5</from>
-                        <to variable="internalState" part="loop1"/>
-                    </copy>
-                    <copy>
-                        <from>
-                            <literal><![CDATA[case min: set loop iterations = 5]]></literal>
-                        </from>
-                        <to variable="probeInput" part="probeName"/>
-                    </copy>
-                </assign>
-                <invoke name="probe8" partnerLink="probe" portType="prb:probeMessagePT"
-                    operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-                > </invoke>
-            </sequence>
-			<elseif>
-				<condition>$request.requestMessageData/loopIndicator = 'max'</condition>
-				<sequence>
-					<assign name="flow1-max-assign">
-						<copy>
-							<from>10</from>
-							<to variable="internalState" part="loop1"/>
-						</copy>
-						<copy>
-							<from>
-								<literal><![CDATA[case max: set loop iterations = 10]]></literal>
-							</from>
-							<to variable="probeInput" part="probeName"/>
-						</copy>
-					</assign>
-					<invoke name="probe9" partnerLink="probe" portType="prb:probeMessagePT"
-						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-						> </invoke>
-				</sequence>
-			</elseif>
-			<else>
-				<sequence>
-					<assign name="flow1-default-assign">
-						<copy>
-							<from>0</from>
-							<to variable="internalState" part="loop1"/>
-						</copy>
-						<copy>
-							<from>
-								<literal><![CDATA[otherwise: set loop iterations = 0]]></literal>
-							</from>
-							<to variable="probeInput" part="probeName"/>
-						</copy>
-					</assign>
-					<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT"
-						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
-					> </invoke>
-				</sequence>
-			</else>
-		</if>
-		
-		<assign name="while-increment-initialize">
-			<copy>
-				<from>0</from>
-				<to variable="internalState" part="loop1Counter"></to>
-			</copy>
-			<copy>
-				<from>
-					<literal><![CDATA[test loop iterations]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<while>
-			<condition>$internalState.loop1Counter &lt; $internalState.loop1</condition>
-			<sequence>
-				<assign name="while-increment">
-					<copy>
-						<from>$internalState.loop1Counter + 1</from>
-						<to variable="internalState" part="loop1Counter"/>
-					</copy>
-					<copy>
-						<from>$internalState.loop1Counter + 1</from>
-						<to variable="probeInput" part="probeName"/>
-					</copy>
-				</assign>
-				<invoke name="probe11" partnerLink="probe" portType="prb:probeMessagePT"
-					operation="probe" inputVariable="probeInput" outputVariable="probeInput"/>
-
-			</sequence>
-		</while>
-		<!-- copy internal accumulators to the reply message -->
-		<assign>
-			<copy>
-				<from>
-					<literal><![CDATA[test1Process complete]]></literal>
-				</from>
-				<to variable="probeInput" part="probeName"/>
-			</copy>
-		</assign>
-		<invoke name="probe12" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
-			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
-		<assign name="assign2">
-			<copy>
-				<from variable="probeInput" part="probeName"/>
-				<to variable="reply" part="replyID"/>
-			</copy>
-			<copy>
-				<from variable="probeInput" part="probeData"/>
-				<to variable="reply" part="replyText"/>
-			</copy>
-		</assign>
-		<reply name="reply" partnerLink="request" portType="wns:testFlowActivityPT" operation="request"
-			variable="reply"> </reply>
-	</sequence>
+<!--
+	~ 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable ../../../../../../../bpel-schemas/src/main/resources/wsbpel_executable.xsd"
+	xmlns:tns="http://ode/bpel/unit-test/testFlowActivity2"
+	xmlns:wns="http://ode/bpel/unit-test/testFlowActivity2.wsdl"
+	xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+	xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ name="TestActivityFlow"
+	targetNamespace="http://ode/bpel/unit-test/testFlowActivity2"
+ suppressJoinFailure="yes">
+ 
+ <!-- Test Flow using XPath 10 -->
+ 
+	<import location="TestActivityFlow.wsdl"
+		namespace="http://ode/bpel/unit-test/testFlowActivity2.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/" />
+	<import location="../ProbeService/probeService.wsdl"
+		namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/"/>
+		
+	<!-- test control flow elements -->
+	<!--	sequence 				-->
+	<!--	flow ( links ) 			-->
+	<!--	swith 					-->
+	<!--	while 					-->
+	<partnerLinks>
+		<partnerLink name="request" partnerLinkType="wns:testFlowActivityRequest" myRole="testFlowActivityService"/>
+		<partnerLink name="probe" partnerLinkType="wns:probeRequest" partnerRole="probeService" initializePartnerRole="yes"/>
+	</partnerLinks>
+	<variables>
+		<variable name="request" messageType="wns:requestMessage"/>
+		<variable name="probeInput" messageType="prb:probeMessage"/>
+		<variable name="reply" messageType="wns:replyMessage"/>
+		<variable name="internalState" messageType="wns:internalProcessData"/>
+	</variables>
+	<sequence>
+		<flow>
+			<links>
+				<link name="receive-to-assign1"/>
+				<link name="assign1-to-probe1"/>
+				<link name="assign1-to-probe2"/>
+				<link name="probe1-to-probe3"/>
+				<link name="probe2-to-probe3"/>
+			</links>
+			<receive name="receive1" partnerLink="request" portType="wns:testFlowActivityPT"
+				operation="request" variable="request" createInstance="yes">
+				<sources>
+					<source linkName="receive-to-assign1"/>
+				</sources>
+			</receive>
+			<!-- Copy input variables to internal accumulators -->
+			<!-- After the copy the process splits into two execution paths -->
+			<sequence>
+				<targets>
+					<target linkName="receive-to-assign1"/>
+				</targets>
+				<sources>
+					<source linkName="assign1-to-probe1"/>
+					<source linkName="assign1-to-probe2"/>
+				</sources>
+				<assign name="assign1">
+					<copy>
+						<from>$request.requestMessageData/requestID</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+					<copy>
+						<from variable="request" property="wns:testProbeData"/>
+						<to variable="probeInput" part="probeData"/>
+					</copy>
+				</assign>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[root process splits into A and B]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe2" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+			<!-- probe1 outbound status is dependent on the request input testFlow1 -->
+			<sequence>
+				<targets>
+					<target linkName="assign1-to-probe1"/>
+				</targets>
+				<sources>
+					<source linkName="probe1-to-probe3">
+						<transitionCondition>bpws:getVariableProperty("request", "wns:testFlow1") =
+							'yes'</transitionCondition>
+					</source>
+				</sources>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[process A completes]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe3" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+			<!-- probe2 outbound status is dependent on the request input testFlow2 -->
+			<sequence>
+				<targets>
+					<target linkName="assign1-to-probe2"/>
+				</targets>
+				<sources>
+					<source linkName="probe2-to-probe3">
+						<transitionCondition>$request.requestMessageData/flowIndicators/indicatorTwo =
+							'yes'</transitionCondition>
+					</source>
+				</sources>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[process B completes]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe4" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+			<!-- The split execution path from assign1 joins on probe3 -->
+			<!-- Probe3 will only fire if the transition condition from probe1 and probe2 both evaluate to true -->
+			<sequence>
+				<targets>
+					<joinCondition>$probe1-to-probe3 and $probe2-to-probe3</joinCondition>
+					<target linkName="probe1-to-probe3"/>
+					<target linkName="probe2-to-probe3"/>
+				</targets>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[processes A and B merge on process C]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe5" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+				> </invoke>
+			</sequence>
+		</flow>
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[merge into root process]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe6" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<!-- from the input data loopIndicator set the number of loop interations -->
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[test switch statement]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe7" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<if>
+			<condition>bpws:getVariableProperty("request", "wns:loopInd") = 'min'</condition>
+			<then>
+				<sequence>
+					<assign name="flow1-min-assign">
+						<copy>
+							<from>5</from>
+							<to variable="internalState" part="loop1"/>
+						</copy>
+						<copy>
+							<from>
+								<literal><![CDATA[case min: set loop iterations = 5]]></literal>
+							</from>
+							<to variable="probeInput" part="probeName"/>
+						</copy>
+					</assign>
+					<invoke name="probe8" partnerLink="probe" portType="prb:probeMessagePT"
+						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+					> </invoke>
+				</sequence>
+			</then>
+			<elseif>
+				<condition>$request.requestMessageData/loopIndicator = 'max'</condition>
+				<sequence>
+					<assign name="flow1-max-assign">
+						<copy>
+							<from>10</from>
+							<to variable="internalState" part="loop1"/>
+						</copy>
+						<copy>
+							<from>
+								<literal><![CDATA[case max: set loop iterations = 10]]></literal>
+							</from>
+							<to variable="probeInput" part="probeName"/>
+						</copy>
+					</assign>
+					<invoke name="probe9" partnerLink="probe" portType="prb:probeMessagePT"
+						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+						> </invoke>
+				</sequence>
+			</elseif>
+			<else>
+				<sequence>
+					<assign name="flow1-default-assign">
+						<copy>
+							<from>0</from>
+							<to variable="internalState" part="loop1"/>
+						</copy>
+						<copy>
+							<from>
+								<literal><![CDATA[otherwise: set loop iterations = 0]]></literal>
+							</from>
+							<to variable="probeInput" part="probeName"/>
+						</copy>
+					</assign>
+					<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT"
+						operation="probe" inputVariable="probeInput" outputVariable="probeInput"
+					> </invoke>
+				</sequence>
+			</else>
+		</if>
+		
+		<assign name="while-increment-initialize">
+			<copy>
+				<from>0</from>
+				<to variable="internalState" part="loop1Counter"></to>
+			</copy>
+			<copy>
+				<from>
+					<literal><![CDATA[test loop iterations]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe10" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<while>
+			<condition>$internalState.loop1Counter &lt; $internalState.loop1</condition>
+			<sequence>
+				<assign name="while-increment">
+					<copy>
+						<from>$internalState.loop1Counter + 1</from>
+						<to variable="internalState" part="loop1Counter"/>
+					</copy>
+					<copy>
+						<from>$internalState.loop1Counter + 1</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe11" partnerLink="probe" portType="prb:probeMessagePT"
+					operation="probe" inputVariable="probeInput" outputVariable="probeInput"/>
+
+			</sequence>
+		</while>
+		<!-- copy internal accumulators to the reply message -->
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[test1Process complete]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe12" partnerLink="probe" portType="prb:probeMessagePT" operation="probe"
+			inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<assign name="assign2">
+			<copy>
+				<from variable="probeInput" part="probeName"/>
+				<to variable="reply" part="replyID"/>
+			</copy>
+			<copy>
+				<from variable="probeInput" part="probeData"/>
+				<to variable="reply" part="replyText"/>
+			</copy>
+		</assign>
+		<reply name="reply" partnerLink="request" portType="wns:testFlowActivityPT" operation="request"
+			variable="reply"> </reply>
+	</sequence>
 </process>

Modified: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl (original)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl Wed Sep  5 22:46:42 2007
@@ -88,13 +88,13 @@
    </plnk:partnerLinkType>
    
   <vprop:property name="testProbeID" type="xsd:string"/>
-  <vprop:propertyAlias propertyName="tns:testProbeID" messageType="tns:requestMessage"/>
+  <vprop:propertyAlias propertyName="tns:testProbeID" messageType="tns:requestMessage" part="requestID"/>
   
   <vprop:property name="testPath" type="xsd:string"/>
-  <vprop:propertyAlias propertyName="tns:testPath" messageType="tns:requestMessage" part="requestMessageData">
+  <vprop:propertyAlias propertyName="tns:testPath" messageType="tns:requestMessage" part="requestMessageData">
     <vprop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
       typeIndicators/typens:indicatorTwo
-    </vprop:query> 
+    </vprop:query> 
   </vprop:propertyAlias>
 
 </wsdl:definitions>

Modified: ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionImpl.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionImpl.java (original)
+++ ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionImpl.java Wed Sep  5 22:46:42 2007
@@ -64,16 +64,24 @@
         _session = _sm.getSession();
     }
 
-    public MessageExchangeDAO createMessageExchange(char dir) {
+    public MessageExchangeDAO createMessageExchange(String mexId, char dir) {
         HMessageExchange mex = new HMessageExchange();
+        mex.setMexId(mexId);
         mex.setDirection(dir);
         _session.save(mex);
         return new MessageExchangeDaoImpl(_sm, mex);
     }
 
-    public MessageExchangeDAO getMessageExchange(String mexid) {
-        HMessageExchange mex = (HMessageExchange) _session.get(HMessageExchange.class, new Long(mexid));
-        return mex == null ? null : new MessageExchangeDaoImpl(_sm, mex);
+    public MessageExchangeDAO getMessageExchange(String mexId) {
+        try {
+            Criteria criteria = _session.createCriteria(HProcess.class);
+            criteria.add(Expression.eq("mexId", mexId));
+            HMessageExchange mex = (HMessageExchange) criteria.uniqueResult();
+            return mex == null ? null : new MessageExchangeDaoImpl(_sm, mex);
+        } catch (HibernateException e) {
+            __log.error("DbError", e);
+            throw e;
+        }
     }
 
     public ProcessDAO createProcess(QName pid, QName type, String guid, long version) {
@@ -131,7 +139,6 @@
         return daos;
     }
 
-    
     @SuppressWarnings("unchecked")
     static Iterator<HProcessInstance> _instanceQuery(Session session, boolean countOnly, InstanceFilter filter) {
         Criteria crit = session.createCriteria(HProcessInstance.class);
@@ -214,8 +221,7 @@
         try {
             CollectionsX.transformEx(ret, hevents, new UnaryFunctionEx<HBpelEvent, BpelEvent>() {
                 public BpelEvent apply(HBpelEvent x) throws Exception {
-                    return (BpelEvent) SerializableUtils.toObject(x.getData().getBinary(), BpelEvent.class
-                            .getClassLoader());
+                    return (BpelEvent) SerializableUtils.toObject(x.getData().getBinary(), BpelEvent.class.getClassLoader());
                 }
 
             });

Modified: ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageDaoImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageDaoImpl.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageDaoImpl.java (original)
+++ ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageDaoImpl.java Wed Sep  5 22:46:42 2007
@@ -20,8 +20,9 @@
 package org.apache.ode.daohib.bpel;
 
 
+import javax.xml.namespace.QName;
+
 import org.apache.ode.bpel.dao.MessageDAO;
-import org.apache.ode.bpel.dao.MessageExchangeDAO;
 import org.apache.ode.daohib.SessionManager;
 import org.apache.ode.daohib.bpel.hobj.HLargeData;
 import org.apache.ode.daohib.bpel.hobj.HMessage;
@@ -29,8 +30,6 @@
 import org.hibernate.Session;
 import org.w3c.dom.Element;
 
-import javax.xml.namespace.QName;
-
 public class MessageDaoImpl extends HibernateDao implements MessageDAO {
 
     private HMessage _hself;
@@ -70,10 +69,5 @@
         }
 
     }
-
-    public MessageExchangeDAO getMessageExchange() {
-        return new MessageExchangeDaoImpl(_sm,_hself.getMessageExchange());
-    }
-
 
 }

Modified: ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java (original)
+++ ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java Wed Sep  5 22:46:42 2007
@@ -19,11 +19,21 @@
 
 package org.apache.ode.daohib.bpel;
 
+import java.util.Collections;
+import java.util.Date;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
 import org.apache.ode.bpel.dao.MessageDAO;
 import org.apache.ode.bpel.dao.MessageExchangeDAO;
 import org.apache.ode.bpel.dao.PartnerLinkDAO;
 import org.apache.ode.bpel.dao.ProcessDAO;
 import org.apache.ode.bpel.dao.ProcessInstanceDAO;
+import org.apache.ode.bpel.iapi.InvocationStyle;
+import org.apache.ode.bpel.iapi.MessageExchange.AckType;
+import org.apache.ode.bpel.iapi.MessageExchange.FailureType;
+import org.apache.ode.bpel.iapi.MessageExchange.Status;
 import org.apache.ode.daohib.SessionManager;
 import org.apache.ode.daohib.bpel.hobj.HLargeData;
 import org.apache.ode.daohib.bpel.hobj.HMessage;
@@ -33,14 +43,10 @@
 import org.apache.ode.utils.DOMUtils;
 import org.w3c.dom.Element;
 
-import javax.xml.namespace.QName;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Set;
-
 public class MessageExchangeDaoImpl extends HibernateDao implements MessageExchangeDAO {
 
     private HMessageExchange _hself;
+    
 
     // Used when provided process and instance aren't hibernate implementations. The relation
     // therefore can't be persisted. Used for in-mem DAOs so that doesn't matter much. 
@@ -81,20 +87,19 @@
         update();
     }
 
-    public void setStatus(String status) {
-        _hself.setState(status);
+    public void setStatus(Status status) {
+        _hself.setState(status == null ? null : status.toString());
         update();
     }
 
-    public String getStatus() {
-        return _hself.getState();
+    public Status getStatus() {
+        return _hself.getState() == null ?  null : Status.valueOf(_hself.getState());
     }
 
     public MessageDAO createMessage(QName type) {
         HMessage message = new HMessage();
         message.setType(type == null ? null : type.toString());
         message.setCreated(new Date());
-        message.setMessageExchange(_hself);
         getSession().save(message);
         return new MessageDaoImpl(_sm, message);
 
@@ -119,11 +124,11 @@
         update();
     }
 
-    public String getCorrelationId() {
+    public String getPartnersKey() {
         return _hself.getClientKey();
     }
 
-    public void setCorrelationId(String clientKey) {
+    public void setPartnersKey(String clientKey) {
         _hself.setClientKey(clientKey);
         update();
     }
@@ -298,15 +303,57 @@
         return Collections.unmodifiableSet(_hself.getProperties().keySet());
     }
 
+    public void release() {
+        // no-op for now, could be used to do some cleanup
+    }
+
+    public InvocationStyle getInvocationStyle() {
+        return _hself.getInvocationStyle() == null ? null : InvocationStyle.valueOf(_hself.getInvocationStyle());
+    }
+
     public String getPipedMessageExchangeId() {
-        return _hself.getPipedMessageExchangeId();
+        return _hself.getPipedMessageExchange();
     }
 
-    public void setPipedMessageExchangeId(String mexId) {
-        _hself.setPipedMessageExchangeId(mexId);
+    public long getTimeout() {
+        return _hself.getTimeout();
     }
 
-    public void release() {
-        // no-op for now, could be used to do some cleanup
+    public void setFailureType(FailureType failureType) {
+        _hself.setFailureType(failureType == null ? null : failureType.toString());
+    }
+    
+    public FailureType getFailureType() {
+        return _hself.getFailureType() == null ? null : FailureType.valueOf(_hself.getFailureType());
+
+    }
+
+    public void setInvocationStyle(InvocationStyle invocationStyle) {
+        _hself.setInvocationStyle(invocationStyle == null ? null : invocationStyle.toString());
+    }
+
+    public void setPipedMessageExchangeId(String pipedMex) {
+        _hself.setPipedMesageExchange(pipedMex);
+    }
+
+    public void setTimeout(long timeout) {
+        _hself.setTimeout(timeout);
+    }
+
+    public AckType getAckType() {
+        return _hself.getAckType() == null ? null : AckType.valueOf(_hself.getAckType());
+    }
+
+    public void setAckType(AckType ackType) {
+        _hself.setAckType(ackType == null ? null : ackType.toString());
+    }
+
+    public QName getPipedPID() {
+        return _hself.getPipedPID() == null ? null : QName.valueOf(_hself.getPipedPID());
+    }
+
+    public void setPipedPID(QName pipedPid) {
+        _hself.setPipedPID(pipedPid == null ? null : pipedPid.toString());
+        
     }
 }