You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/11/06 23:31:55 UTC

svn commit: r711994 [1/2] - in /ode/branches/APACHE_ODE_1.X: bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ bpel-obj/src/main/java/org/apache/ode/bpel/o/ bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ bpel-test/src/test/java/org/apa...

Author: mriou
Date: Thu Nov  6 14:31:35 2008
New Revision: 711994

URL: http://svn.apache.org/viewvc?rev=711994&view=rev
Log:
ODE-50 Support initiate=join for receives with no createInstance

Added:
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/deploy.xml
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test1.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test2.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.bpel
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.wsdl
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/deploy.xml
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test1.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test2.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.bpel
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.wsdl
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4.wsdl
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/deploy.xml
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test1.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test2.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.bpel
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.wsdl
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/deploy.xml
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/test1.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/test2.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/test4-process.bpel
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/test4-process.wsdl
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/test4.wsdl
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReceive/
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReceive/deploy.xml
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReceive/test1.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReceive/test2.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReceive/testCorrelation.bpel
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReceive/testCorrelation.wsdl
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReply/
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReply/deploy.xml
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReply/test1.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReply/test2.properties
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReply/testCorrelation.bpel
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinReply/testCorrelation.wsdl
Modified:
    ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
    ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java
    ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickGeneratorMessages.java
    ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickReceiveGenerator.java
    ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ReplyGenerator.java
    ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OEventHandler.java
    ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OInvoke.java
    ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OPickReceive.java
    ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OReply.java
    ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java
    ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
    ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java
    ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java
    ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/MessageRouting20Test.java
    ode/branches/APACHE_ODE_1.X/dao-hibernate-db/src/main/sql/ode.derby.properties

Modified: ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java Thu Nov  6 14:31:35 2008
@@ -138,6 +138,7 @@
 
     private Date _generatedDate;
 
+    @SuppressWarnings("unchecked")
     private HashMap<Class, ActivityGenerator> _actGenerators = new HashMap<Class, ActivityGenerator>();
 
     private boolean _supressJoinFailure = false;
@@ -1294,7 +1295,8 @@
                         oevent.initCorrelations.add(cset);
                         break;
                     case JOIN:
-                        throw new CompilationException(__cmsgs.errTODO("Rendezvous."));
+                        oevent.joinCorrelation = cset;
+                        oevent.partnerLink.addCorrelationSetForOperation(oevent.operation, cset);
                     }
 
                     for (OProcess.OProperty property : cset.properties) {
@@ -1590,6 +1592,7 @@
         return type;
     }
 
+    @SuppressWarnings("unchecked")
     private ActivityGenerator findActivityGen(Activity source) {
 
         Class actClass = source.getClass();
@@ -1606,6 +1609,7 @@
         throw new CompilationException(__cmsgs.errUnknownActivity(actClass.getName()).setSource(source));
     }
 
+    @SuppressWarnings("unchecked")
     protected void registerActivityCompiler(Class defClass, ActivityGenerator generator) {
         if (__log.isDebugEnabled()) {
             __log.debug("Adding compiler for nodes class \"" + defClass.getName() + " = " + generator);
@@ -1640,6 +1644,7 @@
         _expLanguageCompilers.put(expLangUri, expressionCompiler);
     }
 
+    @SuppressWarnings("unchecked")
     protected void registerExpressionLanguage(String expLangUri, String classname) throws Exception {
         Class cls = Class.forName(classname);
         registerExpressionLanguage(expLangUri, (ExpressionCompiler) cls.newInstance());

Modified: ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java Thu Nov  6 14:31:35 2008
@@ -105,21 +105,23 @@
 
         if (oinvoke.inputVar != null) {
             doCorrelations(outcorrelations, oinvoke.inputVar, oinvoke.assertCorrelationsInput,
-                    oinvoke.initCorrelationsInput);
+                    oinvoke.initCorrelationsInput, oinvoke.joinCorrelationsInput);
             doCorrelations(inoutcorrelations, oinvoke.inputVar, oinvoke.assertCorrelationsInput,
-                    oinvoke.initCorrelationsInput);
+                    oinvoke.initCorrelationsInput, oinvoke.joinCorrelationsInput);
         }
         if (oinvoke.outputVar != null) {
             doCorrelations(incorrelations, oinvoke.outputVar,
-                    oinvoke.assertCorrelationsOutput, oinvoke.initCorrelationsOutput);
+                    oinvoke.assertCorrelationsOutput, oinvoke.initCorrelationsOutput, oinvoke.joinCorrelationsOutput);
             doCorrelations(inoutcorrelations, oinvoke.outputVar,
-                    oinvoke.assertCorrelationsOutput, oinvoke.initCorrelationsOutput);
+                    oinvoke.assertCorrelationsOutput, oinvoke.initCorrelationsOutput, oinvoke.joinCorrelationsOutput);
         }
         
     }
 
     private void doCorrelations(List<Correlation> correlations, OScope.Variable var,
-            Collection<OScope.CorrelationSet> assertCorrelations, Collection<OScope.CorrelationSet> initCorrelations) {
+            Collection<OScope.CorrelationSet> assertCorrelations, 
+            Collection<OScope.CorrelationSet> initCorrelations,
+            Collection<OScope.CorrelationSet> joinCorrelations) {
         for (Correlation correlation : correlations) {
             OScope.CorrelationSet cset = _context.resolveCorrelationSet(correlation.getCorrelationSet());
             switch (correlation.getInitiate()) {
@@ -130,8 +132,7 @@
                 initCorrelations.add(cset);
                 break;
             case JOIN:
-                // TODO: fixe errror
-                throw new UnsupportedOperationException();
+                joinCorrelations.add(cset);
             }
             for (OProcess.OProperty property : cset.properties) {
                 // Force resolution of alias, to make sure that we have one for

Modified: ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickGeneratorMessages.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickGeneratorMessages.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickGeneratorMessages.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickGeneratorMessages.java Thu Nov  6 14:31:35 2008
@@ -28,8 +28,8 @@
      * Attempt to use multiple non-initiate correlation sets; second set was
      * "{0}".
      */
-    public CompilationMessage errSecondNonInitiateCorrelationSet(String setName) {
-        return this.formatCompilationMessage("Attempt to use multiple non-initiate correlation sets;"
+    public CompilationMessage errSecondNonInitiateOrJoinCorrelationSet(String setName) {
+        return this.formatCompilationMessage("Attempt to use multiple non-initiate or join correlation sets;"
                 + " second set was \"{0}\".", setName);
     }
 

Modified: ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickReceiveGenerator.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickReceiveGenerator.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickReceiveGenerator.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickReceiveGenerator.java Thu Nov  6 14:31:35 2008
@@ -90,8 +90,8 @@
                 if (createInstance)
                     throw new CompilationException(__cmsgsGeneral.errUseOfUninitializedCorrelationSet(correlation
                             .getCorrelationSet()));
-                if (onMessage.matchCorrelation != null)
-                    throw new CompilationException(__cmsgs.errSecondNonInitiateCorrelationSet(correlation
+                if (onMessage.matchCorrelation != null || onMessage.joinCorrelation != null)
+                    throw new CompilationException(__cmsgs.errSecondNonInitiateOrJoinCorrelationSet(correlation
                             .getCorrelationSet()));
                 onMessage.matchCorrelation = cset;
                 onMessage.partnerLink.addCorrelationSetForOperation(onMessage.operation, cset);
@@ -101,17 +101,14 @@
                 onMessage.partnerLink.addCorrelationSetForOperation(onMessage.operation, cset);
                 break;
             case JOIN:
-                if (createInstance) {
-                    onMessage.partnerLink.addCorrelationSetForOperation(onMessage.operation, cset);
-                    onMessage.initCorrelations.add(cset);
-                    onMessage.matchCorrelation = cset;
-                } else {
-                    throw new CompilationException(__cmsgs.errRendezvousNotSupported());
-
-                }
+                if (onMessage.matchCorrelation != null || onMessage.joinCorrelation != null)
+                    throw new CompilationException(__cmsgs.errSecondNonInitiateOrJoinCorrelationSet(correlation
+                            .getCorrelationSet()));
+            	onMessage.joinCorrelation = cset;
+                onMessage.partnerLink.addCorrelationSetForOperation(onMessage.operation, cset);
                 break;
 
-                default:
+            default:
                     throw new AssertionError("Unexpected value for correlation set enumeration!");
             }
 

Modified: ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ReplyGenerator.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ReplyGenerator.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ReplyGenerator.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ReplyGenerator.java Thu Nov  6 14:31:35 2008
@@ -98,6 +98,9 @@
                 case YES:
                     oreply.initCorrelations.add(cset);
                     break;
+                case JOIN:
+                	oreply.joinCorrelations.add(cset);
+                	break;
                 default:
                     // TODO: Make error for this.
                     throw new AssertionError();

Modified: ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OEventHandler.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OEventHandler.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OEventHandler.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OEventHandler.java Thu Nov  6 14:31:35 2008
@@ -58,6 +58,9 @@
         /** Correlation set to match on. */
         public OScope.CorrelationSet matchCorrelation;
 
+        /** Correlation set to join on. */
+        public OScope.CorrelationSet joinCorrelation;
+
         public OPartnerLink partnerLink;
         public Operation operation;
         public OScope.Variable variable;

Modified: ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OInvoke.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OInvoke.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OInvoke.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OInvoke.java Thu Nov  6 14:31:35 2008
@@ -37,7 +37,7 @@
     /** Correlation sets initialized on the input message. */
     public final List<OScope.CorrelationSet> initCorrelationsInput = new ArrayList<OScope.CorrelationSet>();
 
-    /** Correlation sets initialized on the input message. */
+    /** Correlation sets initialized on the output message. */
     public final List <OScope.CorrelationSet> initCorrelationsOutput = new ArrayList<OScope.CorrelationSet>();
 
     /** Correlation sets asserted on input. */
@@ -46,6 +46,12 @@
     /** Correlation sets asserted on output. */
     public final List<OScope.CorrelationSet> assertCorrelationsOutput = new ArrayList<OScope.CorrelationSet>();
 
+    /** Correlation sets joined on input. */
+    public final List <OScope.CorrelationSet> joinCorrelationsInput = new ArrayList<OScope.CorrelationSet>();
+
+    /** Correlation sets joined on output. */
+    public final List<OScope.CorrelationSet> joinCorrelationsOutput = new ArrayList<OScope.CorrelationSet>();
+
     public OInvoke(OProcess owner, OActivity parent) {
         super(owner, parent);
     }

Modified: ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OPickReceive.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OPickReceive.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OPickReceive.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OPickReceive.java Thu Nov  6 14:31:35 2008
@@ -62,6 +62,9 @@
         /** Correlation set to match on. */
         public OScope.CorrelationSet matchCorrelation;
 
+        /** Correlation to join on. */
+        public OScope.CorrelationSet joinCorrelation;
+
         public OPartnerLink partnerLink;
         public Operation operation;
         public OScope.Variable variable;

Modified: ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OReply.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OReply.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OReply.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-obj/src/main/java/org/apache/ode/bpel/o/OReply.java Thu Nov  6 14:31:35 2008
@@ -47,6 +47,9 @@
     /** Correlation sets asserted. */
     public final List<OScope.CorrelationSet> assertCorrelations = new ArrayList<OScope.CorrelationSet>();
 
+    /** Correlation sets joined. */
+    public final List<OScope.CorrelationSet> joinCorrelations = new ArrayList<OScope.CorrelationSet>();
+
     /** OASIS modification - Message Exchange Id. */
     public String messageExchangeId = "";
 

Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java Thu Nov  6 14:31:35 2008
@@ -36,7 +36,6 @@
 import org.apache.ode.bpel.runtime.channels.PickResponseChannelListener;
 import org.apache.ode.bpel.runtime.channels.TerminationChannel;
 import org.apache.ode.bpel.runtime.channels.TerminationChannelListener;
-import org.apache.ode.bpel.evt.ScopeEvent;
 import org.apache.ode.bpel.evt.VariableModificationEvent;
 import org.apache.ode.jacob.ChannelListener;
 import org.apache.ode.jacob.SynchChannel;
@@ -114,9 +113,15 @@
             Selector selector;
             try {
                 PickResponseChannel pickResponseChannel = newChannel(PickResponseChannel.class);
-                CorrelationKey key;
+                CorrelationKey key = null;
                 PartnerLinkInstance pLinkInstance = _scopeFrame.resolve(_oevent.partnerLink);
-                if (_oevent.matchCorrelation == null) {
+                if(_oevent.joinCorrelation != null) {
+                	if(getBpelRuntimeContext().isCorrelationInitialized(_scopeFrame.resolve(_oevent.joinCorrelation))) {
+                		key = getBpelRuntimeContext().readCorrelation(_scopeFrame.resolve(_oevent.joinCorrelation));
+
+                		assert key != null;
+                	}
+                } else if (_oevent.matchCorrelation == null ) {
                     // Adding a route for opaque correlation. In this case correlation is done on "out-of-band" session id.
                     String sessionId = getBpelRuntimeContext().fetchMySessionId(pLinkInstance);
                     key = new CorrelationKey(-1, new String[] {sessionId});
@@ -153,6 +158,7 @@
             _pickResponseChannel = pickResponseChannel;
         }
 
+        @SuppressWarnings("unchecked")
         public void run() {
 
             if (!_active.isEmpty() || _pickResponseChannel != null) {
@@ -251,6 +257,10 @@
                                 for (OScope.CorrelationSet cset : _oevent.initCorrelations) {
                                     initializeCorrelation(ehScopeFrame.resolve(cset), ehScopeFrame.resolve(_oevent.variable));
                                 }
+                                if( _oevent.joinCorrelation != null ) {
+                                	// will be ignored if already initialized
+                                    initializeCorrelation(ehScopeFrame.resolve(_oevent.joinCorrelation), ehScopeFrame.resolve(_oevent.variable));
+                                }
 
                                 if (_oevent.partnerLink.hasPartnerRole()) {
                                     // Trying to initialize partner epr based on a message-provided epr/session.

Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java Thu Nov  6 14:31:35 2008
@@ -69,7 +69,7 @@
     public final void run() {
         Element outboundMsg;
         try {
-            outboundMsg = setupOutbound(_oinvoke, _oinvoke.initCorrelationsInput);
+            outboundMsg = setupOutbound(_oinvoke, _oinvoke.initCorrelationsInput, _oinvoke.joinCorrelationsInput);
         } catch (FaultException e) {
             __log.error(e);
             FaultData fault = createFault(e.getQName(), _oinvoke);
@@ -136,6 +136,10 @@
                             for (OScope.CorrelationSet anInitCorrelationsOutput : _oinvoke.initCorrelationsOutput) {
                                 initializeCorrelation(_scopeFrame.resolve(anInitCorrelationsOutput), outputVar);
                             }
+                            for (OScope.CorrelationSet aJoinCorrelationsOutput : _oinvoke.joinCorrelationsOutput) {
+                            	// will be ignored if already initialized
+                                initializeCorrelation(_scopeFrame.resolve(aJoinCorrelationsOutput), outputVar);
+                            }
                             if (_oinvoke.partnerLink.hasPartnerRole()) {
                                 // Trying to initialize partner epr based on a message-provided epr/session.
                                 if (!getBpelRuntimeContext().isPartnerRoleEndpointInitialized(_scopeFrame
@@ -207,12 +211,14 @@
         }
     }
 
-    private Element setupOutbound(OInvoke oinvoke, Collection<OScope.CorrelationSet> outboundInitiations)
+    private Element setupOutbound(OInvoke oinvoke, Collection<OScope.CorrelationSet> outboundInitiations, Collection<OScope.CorrelationSet> outboundJoins)
             throws FaultException, ExternalVariableModuleException {
-        if (outboundInitiations.size() > 0) {
-            for (OScope.CorrelationSet c : outboundInitiations) {
-                initializeCorrelation(_scopeFrame.resolve(c), _scopeFrame.resolve(oinvoke.inputVar));
-            }
+        for (OScope.CorrelationSet c : outboundInitiations) {
+            initializeCorrelation(_scopeFrame.resolve(c), _scopeFrame.resolve(oinvoke.inputVar));
+        }
+        for (OScope.CorrelationSet c : outboundJoins) {
+        	// will be ignored if already initialized
+            initializeCorrelation(_scopeFrame.resolve(c), _scopeFrame.resolve(oinvoke.inputVar));
         }
 
         if (oinvoke.operation.getInput().getMessage().getParts().size() > 0) {
@@ -224,6 +230,8 @@
         } else return null;
     }
 
+    @SuppressWarnings("unused")
+    // TODO: does somebody need this method??
     private void requireRecovery() {
         if (__log.isDebugEnabled())
             __log.debug("ActivityRecovery: Invoke activity " + _self.aId + " requires recovery");

Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java Thu Nov  6 14:31:35 2008
@@ -35,6 +35,7 @@
 import org.apache.ode.bpel.o.OPickReceive;
 import org.apache.ode.bpel.o.OScope;
 import org.apache.ode.bpel.o.OMessageVarType.Part;
+import org.apache.ode.bpel.o.OScope.CorrelationSet;
 import org.apache.ode.bpel.runtime.channels.FaultData;
 import org.apache.ode.bpel.runtime.channels.PickResponseChannel;
 import org.apache.ode.bpel.runtime.channels.PickResponseChannelListener;
@@ -77,30 +78,17 @@
             selectors = new Selector[_opick.onMessages.size()];
             int idx = 0;
             for (OPickReceive.OnMessage onMessage : _opick.onMessages) {
-                CorrelationKey key = null; // this will be the case for the
-                // createInstance activity
+                CorrelationSet matchCorrelation = null;
+                if( onMessage.joinCorrelation != null &&
+                		getBpelRuntimeContext().isCorrelationInitialized(_scopeFrame.resolve(onMessage.joinCorrelation))) {
+                	// use this join correlation as a match correlation to resolve the correlation key
+                	matchCorrelation = onMessage.joinCorrelation;
+                } else {
+                	matchCorrelation = onMessage.matchCorrelation;
+                }
 
                 PartnerLinkInstance pLinkInstance = _scopeFrame.resolve(onMessage.partnerLink);
-                if (onMessage.matchCorrelation == null && !_opick.createInstanceFlag) {
-                    // Adding a route for opaque correlation. In this case,
-                    // correlation is on "out-of-band" session-id
-                    String sessionId = getBpelRuntimeContext().fetchMySessionId(pLinkInstance);
-                    key = new CorrelationKey(-1, new String[] { sessionId });
-                } else if (onMessage.matchCorrelation != null) {
-                    if (!getBpelRuntimeContext().isCorrelationInitialized(
-                            _scopeFrame.resolve(onMessage.matchCorrelation))) {
-                        // the following should really test if this is a "join"
-                        // type correlation...
-                        if (!_opick.createInstanceFlag)
-                            throw new FaultException(_opick.getOwner().constants.qnCorrelationViolation,
-                                    "Correlation not initialized.");
-                    } else {
-
-                        key = getBpelRuntimeContext().readCorrelation(_scopeFrame.resolve(onMessage.matchCorrelation));
-
-                        assert key != null;
-                    }
-                }
+                CorrelationKey key = resolveCorrelationKey(pLinkInstance, matchCorrelation);
 
                 selectors[idx] = new Selector(idx, pLinkInstance, onMessage.operation.getName(), onMessage.operation
                         .getOutput() == null, onMessage.messageExchangeId, key, onMessage.route);
@@ -141,6 +129,40 @@
     }
 
     /**
+     * Resolves the correlation key from the given PartnerLinkInstance and a match type correlation(non-initiate or
+     * already initialized join correlation).
+     * 
+     * @param pLinkInstance the partner link instance
+     * @param matchCorrelation the match type correlation
+     * @return returns the resolved CorrelationKey
+     * @throws FaultException thrown when the correlation is not initialized and createInstance flag is not set
+     */
+    private CorrelationKey resolveCorrelationKey(PartnerLinkInstance pLinkInstance, OScope.CorrelationSet matchCorrelation) throws FaultException {
+        CorrelationKey key = null; // this will be the case for the
+        // createInstance activity
+
+        if (matchCorrelation == null && !_opick.createInstanceFlag) {
+            // Adding a route for opaque correlation. In this case,
+            // correlation is on "out-of-band" session-id
+            String sessionId = getBpelRuntimeContext().fetchMySessionId(pLinkInstance);
+            key = new CorrelationKey(-1, new String[] { sessionId });
+        } else if (matchCorrelation != null) {
+            if (!getBpelRuntimeContext().isCorrelationInitialized(
+                    _scopeFrame.resolve(matchCorrelation))) {
+                if (!_opick.createInstanceFlag)
+                    throw new FaultException(_opick.getOwner().constants.qnCorrelationViolation,
+                            "Correlation not initialized.");
+            } else {
+                key = getBpelRuntimeContext().readCorrelation(_scopeFrame.resolve(matchCorrelation));
+
+                assert key != null;
+            }
+        }
+        
+        return key;
+    }
+    
+    /**
      * Calculate a duration offset from right now.
      *
      * @param duration
@@ -272,6 +294,11 @@
                         for (OScope.CorrelationSet cset : onMessage.initCorrelations) {
                             initializeCorrelation(_scopeFrame.resolve(cset), _scopeFrame.resolve(onMessage.variable));
                         }
+                        OScope.CorrelationSet cset = onMessage.joinCorrelation;
+                        if( cset != null ) {
+                        	// will be ignored if already initialized
+                        	initializeCorrelation(_scopeFrame.resolve(cset), _scopeFrame.resolve(onMessage.variable));
+                    	}
                         if (onMessage.partnerLink.hasPartnerRole()) {
                             // Trying to initialize partner epr based on a
                             // message-provided epr/session.

Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java Thu Nov  6 14:31:35 2008
@@ -59,6 +59,10 @@
                 initializeCorrelation(_scopeFrame.resolve(cset),
                         _scopeFrame.resolve(oreply.variable));
             }
+            for (OScope.CorrelationSet aJoinCorrelation : oreply.joinCorrelations) {
+            	// will be ignored if already initialized
+                initializeCorrelation(_scopeFrame.resolve(aJoinCorrelation), _scopeFrame.resolve(oreply.variable));
+            }
 
             //		send reply
             getBpelRuntimeContext()

Modified: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/MessageRouting20Test.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/MessageRouting20Test.java?rev=711994&r1=711993&r2=711994&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/MessageRouting20Test.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/MessageRouting20Test.java Thu Nov  6 14:31:35 2008
@@ -31,6 +31,30 @@
 		go("/bpel/2.0/TestCorrelation1");
 	}
 
+	@Test public void testCorrelationJoin() throws Throwable {
+		go("/bpel/2.0/TestCorrelationJoin");
+	}
+
+	@Test public void testCorrelationJoinReceive() throws Throwable {
+		go("/bpel/2.0/TestCorrelationJoinReceive");
+	}
+
+	@Test public void testCorrelationJoinInvoke() throws Throwable {
+		go("/bpel/2.0/TestCorrelationJoinInvoke");
+	}
+
+	@Test public void testCorrelationJoinOnMessage() throws Throwable {
+		go("/bpel/2.0/TestCorrelationJoinOnMessage");
+	}
+
+	@Test public void testCorrelationJoinEvent() throws Throwable {
+		go("/bpel/2.0/TestCorrelationJoinEvent");
+	}
+
+	@Test public void testCorrelationJoinReply() throws Throwable {
+		go("/bpel/2.0/TestCorrelationJoinReply");
+	}
+
 	@Ignore("fix test bed for handling ASYNC mex") @Test public void testCorrelationOpaque() throws Throwable {
 		//TODO Fix me, we need to capture the session id to send it in the second test message
 		go("/bpel/2.0/TestCorrelationOpaque");

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/deploy.xml?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/deploy.xml Thu Nov  6 14:31:35 2008
@@ -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.
+-->
+
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+	xmlns:pns="http://ode/bpel/unit-test/testCorrelation" 
+	xmlns:prns="http://ode/bpel/unit-test/ProbeService.wsdl"
+	xmlns:wns="http://ode/bpel/unit-test/testCorrelation.wsdl">
+
+
+	<process name="pns:TestCorrelationProcess">
+		<active>true</active>
+		<provide partnerLink="request">
+			<service name="wns:testCorrelationService" port="wns:testCorrelationPort"/>
+		</provide>
+		<invoke partnerLink="probe">
+			<service name="prns:testCorrelationService" port="prns:testCorrelationPort"/>
+		</invoke>
+	</process>
+</deploy>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test1.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test1.properties?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test1.properties (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test1.properties Thu Nov  6 14:31:35 2008
@@ -0,0 +1,22 @@
+#
+#    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.
+#
+
+namespace=http://ode/bpel/unit-test/testCorrelation.wsdl
+service=testCorrelationService
+operation=request
+request1=<message><requestMessageData><requestID>Start Test5.1</requestID><requestText>Event Start Test5.1</requestText><requestEnd>no</requestEnd></requestMessageData></message>
+response1=.*Event Start Test5.1 -&gt; loop on receive until message includes requestEnd = yes -&gt; received message -&gt; process complete.*

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test2.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test2.properties?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test2.properties (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/test2.properties Thu Nov  6 14:31:35 2008
@@ -0,0 +1,21 @@
+#
+#    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.
+#
+
+namespace=http://ode/bpel/unit-test/testCorrelation.wsdl
+service=testCorrelationService
+operation=continue
+request1=<message><requestMessageData><requestID>Start Test5.1</requestID><requestText>Event Start Test5.2.1</requestText><requestEnd>yes</requestEnd></requestMessageData></message>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.bpel?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.bpel (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.bpel Thu Nov  6 14:31:35 2008
@@ -0,0 +1,118 @@
+<!--
+	~ 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/testCorrelation"
+ xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+ xmlns:wns="http://ode/bpel/unit-test/testCorrelation.wsdl"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ name="TestCorrelationProcess"
+ targetNamespace="http://ode/bpel/unit-test/testCorrelation"
+ 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="testCorrelation.wsdl"
+		namespace="http://ode/bpel/unit-test/testCorrelation.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 correlated receive -->
+	<partnerLinks>
+		<partnerLink name="request" partnerLinkType="wns:testCorrelationRequest" myRole="testCorrelationService"/>
+		<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"/>
+	</variables>
+	<correlationSets>
+		<correlationSet name="testCorr1" properties="wns:testProbeID"/>
+	</correlationSets>
+	<sequence>
+		<receive name="receive1" partnerLink="request" portType="wns:testCorrelationPT" operation="request" variable="request" createInstance="yes">
+			<correlations>
+				<correlation set="testCorr1" initiate="join"/>
+			</correlations>
+		</receive>
+		<!-- Copy input variables to internal accumulators -->
+		<assign name="assign1">
+			<copy>
+				<from variable="request" property="wns:testProbeID"/>
+				<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[loop on receive until message includes requestEnd = yes]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe" partnerLink="probe" portType="prb:probeMessagePT" operation="probe" inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+		<while>
+			<condition>$request.requestMessageData/requestEnd = 'no'</condition>
+			<sequence>
+				<receive name="receive2" partnerLink="request" portType="wns:testCorrelationPT" operation="continue" variable="request">
+					<correlations>
+						<correlation set="testCorr1" initiate="join"/>
+					</correlations>
+				</receive>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[received message]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe" partnerLink="probe" portType="prb:probeMessagePT" operation="probe" inputVariable="probeInput" outputVariable="probeInput"> </invoke>
+			</sequence>
+		</while>
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[process complete]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe" 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:testCorrelationPT" operation="request" variable="reply"> </reply>
+	</sequence>
+</process>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.wsdl?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoin/testCorrelation.wsdl Thu Nov  6 14:31:35 2008
@@ -0,0 +1,108 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<wsdl:definitions
+        targetNamespace="http://ode/bpel/unit-test/testCorrelation.wsdl"
+        xmlns:tns="http://ode/bpel/unit-test/testCorrelation.wsdl"
+        xmlns:typens="http://ode/bpel/unit-test/testCorrelation.wsdl.types"
+        xmlns="http://ode/bpel/unit-test/testCorrelation.wsdl"
+        xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+        xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:prop="http://docs.oasis-open.org/wsbpel/2.0/varprop">
+
+
+    <!-- type defs -->
+    <wsdl:types>
+        <xsd:schema
+                targetNamespace="http://ode/bpel/unit-test/testCorrelation.wsdl.types"
+                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+            <xsd:complexType name="testMessage">
+                <xsd:sequence>
+                    <xsd:element name="requestID" type="xsd:string"/>
+                    <xsd:element name="requestText" type="xsd:string"/>
+                    <xsd:element name="requestEnd" type="xsd:string"/>
+                </xsd:sequence>
+            </xsd:complexType>
+        </xsd:schema>
+    </wsdl:types>
+
+
+    <wsdl:message name="requestMessage">
+        <wsdl:part name="requestMessageData" type="typens:testMessage"/>
+    </wsdl:message>
+
+    <wsdl:message name="replyMessage">
+        <wsdl:part name="replyID" type="xsd:string"/>
+        <wsdl:part name="replyText" type="xsd:string"/>
+    </wsdl:message>
+
+
+    <wsdl:portType name="testCorrelationPT">
+        <wsdl:operation name="request">
+            <wsdl:input message="requestMessage"/>
+            <wsdl:output message="replyMessage"/>
+        </wsdl:operation>
+        <wsdl:operation name="continue">
+            <wsdl:input message="requestMessage"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="TestCorrelationBinding" type="tns:testCorrelationPT">
+        <wsdl:operation name="request">
+        </wsdl:operation>
+        <wsdl:operation name="continue">
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="TestCorrelationService">
+        <wsdl:port name="TestCorrelationPort" binding="tns:TestCorrelationBinding">
+        </wsdl:port>
+    </wsdl:service>
+
+    <plnk:partnerLinkType name="testCorrelationRequest">
+        <plnk:role name="testCorrelationService" portType="testCorrelationPT"/>
+    </plnk:partnerLinkType>
+
+    <plnk:partnerLinkType name="probeRequest">
+        <plnk:role name="probeService" portType="prb:probeMessagePT"/>
+    </plnk:partnerLinkType>
+
+    <prop:property name="testProbeID" type="xsd:string"/>
+    <prop:propertyAlias propertyName="tns:testProbeID" messageType="tns:requestMessage" part="requestMessageData">
+        <prop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+            requestID
+        </prop:query>
+    </prop:propertyAlias>
+    <prop:propertyAlias propertyName="tns:testProbeID" messageType="prb:probeMessage" part="probeName">
+        <prop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+            .
+        </prop:query>
+    </prop:propertyAlias>
+
+    <prop:property name="testProbeData" type="xsd:string"/>
+    <prop:propertyAlias propertyName="tns:testProbeData" messageType="tns:requestMessage" part="requestMessageData">
+        <prop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+            requestText
+        </prop:query>
+    </prop:propertyAlias>
+
+</wsdl:definitions>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/deploy.xml?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/deploy.xml Thu Nov  6 14:31:35 2008
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<dd:deploy xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd">
+    <dd:process xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd" xmlns:Pool="http://ode.apache.org/test4/Pool"
+                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diag="http://ode.apache.org/test4"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:this="http://ode.apache.org/test4/process" 
+                xmlns:NPGServices_Abstract="http://www.ode.apache.org/NPG/v1/wsdl"
+                xmlns:NPGData="http://www.ode.apache.org/NPG/v1" name="this:process" fileName="test4-process.bpel">
+  <dd:property name="PATH">test4</dd:property>
+  <dd:property name="SVG">test4.svg</dd:property>
+  <dd:provide partnerLink="processAndPoolPlkVar">
+    <dd:service name="this:CanonicServiceForPool" port="canonicPort"></dd:service>
+  </dd:provide>
+</dd:process></dd:deploy>
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test1.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test1.properties?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test1.properties (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test1.properties Thu Nov  6 14:31:35 2008
@@ -0,0 +1,21 @@
+#
+#    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.
+#
+
+namespace=http://ode.apache.org/test4/process
+service=CanonicServiceForPool
+operation=receiveNPR
+request1=<message><body><receiveNPRRequest xmlns="http://ode.apache.org/test4/process">1</receiveNPRRequest></body></message>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test2.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test2.properties?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test2.properties (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test2.properties Thu Nov  6 14:31:35 2008
@@ -0,0 +1,21 @@
+#
+#    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.
+#
+
+namespace=http://ode.apache.org/test4/process
+service=CanonicServiceForPool
+operation=receiveCancel
+request1=<message><body><receiveCancelRequest xmlns="http://ode.apache.org/test4/process">1</receiveCancelRequest></body></message>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.bpel?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.bpel (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.bpel Thu Nov  6 14:31:35 2008
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpel:process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:NPGData="http://www.ode.apache.org/NPG/v1" xmlns:this="http://ode.apache.org/test4/process" xmlns:NPGServices_Abstract="http://www.ode.apache.org/NPG/v1/wsdl" xmlns:diag="http://ode.apache.org/test4" xmlns:Pool="http://ode.apache.org/test4/Pool" xmlns:bpmn="http://www.intalio.com/bpms" xmlns:atomic="http://ode.apache.org/atomicScope" queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" bpmn:label="process" bpmn:id="_Ef3rkFmMEd2BsZsV-epWfA" name="process" targetNamespace="http://ode.apache.org/test4/proc
 ess">
+  <bpel:import namespace="http://ode.apache.org/test4" location="test4.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
+  <bpel:import namespace="http://ode.apache.org/test4/process" location="test4-process.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
+  <bpel:partnerLinks>
+    <bpel:partnerLink name="processAndPoolPlkVar" partnerLinkType="diag:processAndPool" myRole="process_for_Pool"/>
+  </bpel:partnerLinks>
+  <bpel:correlationSets>
+    <bpel:correlationSet name="portIdCorr" properties="this:portIdProp"/>
+  </bpel:correlationSets>
+  <bpel:variables>
+    <bpel:variable name="thisReceiveNPRRequestMsg" messageType="this:receiveNPRRequest"/>
+  </bpel:variables>
+  <bpel:sequence>
+    <bpel:receive partnerLink="processAndPoolPlkVar" portType="this:ForPool" operation="receiveNPR" variable="thisReceiveNPRRequestMsg" createInstance="yes">
+      <bpel:correlations>
+        <bpel:correlation set="portIdCorr" initiate="join"/>
+      </bpel:correlations>
+    </bpel:receive>
+
+    <bpel:scope name="SubProcess_C81ZcFm2Ed2BsZsV-epWfA" bpmn:label="SubProcess" bpmn:id="_C81ZcFm2Ed2BsZsV-epWfA">
+      <bpel:variables>
+        <bpel:variable name="thisReceive3RequestMsg" messageType="this:receive3Request"/>
+        <bpel:variable name="thisReceive2RequestMsg" messageType="this:receive2Request"/>
+      </bpel:variables>
+      <bpel:faultHandlers>
+        <bpel:catch faultName="this:cancel">
+          <bpel:scope name="SubProcess_eO1BoFnPEd2xsdtTaIB7mA" bpmn:label="SubProcess" bpmn:id="_eO1BoFnPEd2xsdtTaIB7mA">
+            <bpel:sequence>
+              <bpel:empty bpmn:label="stop" bpmn:id="_sR3bYFnLEd2xsdtTaIB7mA"/>
+            </bpel:sequence>
+          </bpel:scope>
+        </bpel:catch>
+      </bpel:faultHandlers>
+      <bpel:eventHandlers>
+        <bpel:onEvent partnerLink="processAndPoolPlkVar" portType="this:ForPool" operation="receiveCancel" messageType="this:receiveCancelRequest" variable="thisReceiveCancelRequestMsg" bpmn:label="receiveCancel" bpmn:id="_x9bsgFnKEd2xsdtTaIB7mA">
+            <bpel:correlations>
+              <bpel:correlation set="portIdCorr" initiate="join"></bpel:correlation>
+            </bpel:correlations>
+          <bpel:scope name="cancel_8YLNEFnKEd2xsdtTaIB7mA" bpmn:label="cancel" bpmn:id="_8YLNEFnKEd2xsdtTaIB7mA">
+            <bpel:sequence>
+              <bpel:empty bpmn:label="handleCancel" bpmn:id="_8YjAgFnKEd2xsdtTaIB7mA"/>
+            </bpel:sequence>
+          </bpel:scope>
+        </bpel:onEvent>
+        <!--bpel:onAlarm>
+          <bpel:for>"PT30S"</bpel:for>
+          <bpel:scope name="SubProcess_RM2fcFnXEd2xsdtTaIB7mA" bpmn:label="SubProcess" bpmn:id="_RM2fcFnXEd2xsdtTaIB7mA">
+            <bpel:sequence>
+              <bpel:throw faultName="this:cancel"/>
+            </bpel:sequence>
+          </bpel:scope>
+        </bpel:onAlarm-->
+      </bpel:eventHandlers>
+      <bpel:repeatUntil>
+        <bpel:pick bpmn:label="GatewayEventBasedExclusive" bpmn:id="_iIpO0FmuEd2BsZsV-epWfA">
+          <bpel:onMessage partnerLink="processAndPoolPlkVar" portType="this:ForPool" operation="receive2" variable="thisReceive2RequestMsg" bpmn:label="receive2" bpmn:id="_lHOf0FmuEd2BsZsV-epWfA">
+<!--
+            <bpel:correlations>
+              <bpel:correlation set="portIdCorr" initiate="join"></bpel:correlation>
+            </bpel:correlations>
+-->
+            <bpel:sequence>
+              <bpel:empty name="firstOnMessage"/>
+            </bpel:sequence>
+          </bpel:onMessage>
+          <bpel:onMessage partnerLink="processAndPoolPlkVar" portType="this:ForPool" operation="receive3" variable="thisReceive3RequestMsg" bpmn:label="receive3" bpmn:id="_mcnlcFmuEd2BsZsV-epWfA">
+<!--
+            <bpel:correlations>
+              <bpel:correlation set="portIdCorr" initiate="join"></bpel:correlation>
+            </bpel:correlations>
+-->
+            <bpel:sequence>
+              <bpel:empty name="secondOnMessage"/>
+            </bpel:sequence>
+          </bpel:onMessage>
+        </bpel:pick>
+        <bpel:condition>false()</bpel:condition>
+      </bpel:repeatUntil>
+    </bpel:scope>
+    <bpel:exit bpmn:label="EventEndTerminate" bpmn:id="_5XCLkFmvEd2BsZsV-epWfA"/>
+  </bpel:sequence>
+</bpel:process>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.wsdl?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4-process.wsdl Thu Nov  6 14:31:35 2008
@@ -0,0 +1,79 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:Pool="http://ode.apache.org/test4/Pool" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:diag="http://ode.apache.org/test4" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:this="http://ode.apache.org/test4/process" xmlns:NPGServices_Abstract="http://www.ode.apache.org/NPG/v1/wsdl" xmlns:NPGData="http://www.ode.apache.org/NPG/v1" targetNamespace="http://ode.apache.org/test4/process">
+    <wsdl:types>
+        <xs:schema elementFormDefault="qualified" targetNamespace="http://ode.apache.org/test4/process">
+            <xs:element name="receiveCancelRequest" type="xs:string"/>
+            <xs:element name="receiveNPRRequest" type="xs:string"/>
+            <xs:element name="receive3Request" type="xs:string"/>
+            <xs:element name="receive2Request" type="xs:string"/>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="receiveCancelRequest">
+        <wsdl:part name="body" element="this:receiveCancelRequest"/>
+    </wsdl:message>
+    <wsdl:message name="receiveNPRRequest">
+        <wsdl:part name="body" element="this:receiveNPRRequest"/>
+    </wsdl:message>
+    <wsdl:message name="receive3Request">
+        <wsdl:part name="body" element="this:receive3Request"/>
+    </wsdl:message>
+    <wsdl:message name="receive2Request">
+        <wsdl:part name="body" element="this:receive2Request"/>
+    </wsdl:message>
+    <wsdl:portType name="ForPool">
+        <wsdl:operation name="receiveCancel">
+            <wsdl:input message="this:receiveCancelRequest" name="receiveCancel"/>
+        </wsdl:operation>
+        <wsdl:operation name="receiveNPR">
+            <wsdl:input message="this:receiveNPRRequest" name="receiveNPR"/>
+        </wsdl:operation>
+        <wsdl:operation name="receive3">
+            <wsdl:input message="this:receive3Request" name="receive3"/>
+        </wsdl:operation>
+        <wsdl:operation name="receive2">
+            <wsdl:input message="this:receive2Request" name="receive2"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="CanonicBindingForPool" type="this:ForPool">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="receiveCancel">
+            <soap:operation style="document" soapAction="http://ode.apache.org/test4/process/ForPool/receiveCancel"/>
+            <wsdl:input name="receiveCancel">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="receiveNPR">
+            <soap:operation style="document" soapAction="http://ode.apache.org/test4/process/ForPool/receiveNPR"/>
+            <wsdl:input name="receiveNPR">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="receive3">
+            <soap:operation style="document" soapAction="http://ode.apache.org/test4/process/ForPool/receive3"/>
+            <wsdl:input name="receive3">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="receive2">
+            <soap:operation style="document" soapAction="http://ode.apache.org/test4/process/ForPool/receive2"/>
+            <wsdl:input name="receive2">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="CanonicServiceForPool">
+        <wsdl:port name="canonicPort" binding="this:CanonicBindingForPool">
+            <soap:address location="http://localhost:8080/ode/processes/NPG072408_4/test4/process/Pool"/>
+        </wsdl:port>
+    </wsdl:service>
+
+    <vprop:property name="portIdProp" type="xs:string"/>
+    <vprop:propertyAlias propertyName="this:portIdProp" messageType="this:receiveNPRRequest" part="body">
+    </vprop:propertyAlias>
+    <vprop:propertyAlias propertyName="this:portIdProp" messageType="this:receive2Request" part="body">
+    </vprop:propertyAlias>
+    <vprop:propertyAlias propertyName="this:portIdProp" messageType="this:receive3Request" part="body">
+    </vprop:propertyAlias>
+    <vprop:propertyAlias propertyName="this:portIdProp" messageType="this:receiveCancelRequest" part="body">
+    </vprop:propertyAlias>
+</wsdl:definitions>
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4.wsdl?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinEvent/test4.wsdl Thu Nov  6 14:31:35 2008
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:process="http://ode.apache.org/test4/process"
+                  xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+                  xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  targetNamespace="http://ode.apache.org/test4">
+    <wsdl:import namespace="http://ode.apache.org/test4/process" location="test4-process.wsdl"/>
+    <pnlk:partnerLinkType name="processAndPool">
+        <pnlk:role name="process_for_Pool" portType="process:ForPool"/>
+    </pnlk:partnerLinkType>
+</wsdl:definitions>
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/deploy.xml?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/deploy.xml Thu Nov  6 14:31:35 2008
@@ -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.
+-->
+
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+	xmlns:pns="http://ode/bpel/unit-test/testCorrelation" 
+	xmlns:prns="http://ode/bpel/unit-test/ProbeService.wsdl"
+	xmlns:wns="http://ode/bpel/unit-test/testCorrelation.wsdl">
+
+
+	<process name="pns:TestCorrelationProcess">
+		<active>true</active>
+		<provide partnerLink="request">
+			<service name="wns:testCorrelationService" port="wns:testCorrelationPort"/>
+		</provide>
+		<invoke partnerLink="probe">
+			<service name="prns:testCorrelationService" port="prns:testCorrelationPort"/>
+		</invoke>
+	</process>
+</deploy>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test1.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test1.properties?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test1.properties (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test1.properties Thu Nov  6 14:31:35 2008
@@ -0,0 +1,22 @@
+#
+#    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.
+#
+
+namespace=http://ode/bpel/unit-test/testCorrelation.wsdl
+service=testCorrelationService
+operation=request
+request1=<message><requestMessageData><requestID>Start Test5.1</requestID><requestText>Event Start Test5.1</requestText><requestEnd>no</requestEnd></requestMessageData></message>
+response1=.*Event Start Test5.1 -&gt; loop on receive until message includes requestEnd = yes -&gt; received message -&gt; process complete.*

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test2.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test2.properties?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test2.properties (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/test2.properties Thu Nov  6 14:31:35 2008
@@ -0,0 +1,21 @@
+#
+#    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.
+#
+
+namespace=http://ode/bpel/unit-test/testCorrelation.wsdl
+service=testCorrelationService
+operation=continue
+request1=<message><requestMessageData><requestID>Start Test5.1</requestID><requestText>Event Start Test5.2.1</requestText><requestEnd>yes</requestEnd></requestMessageData></message>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.bpel?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.bpel (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.bpel Thu Nov  6 14:31:35 2008
@@ -0,0 +1,127 @@
+<!--
+	~ 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/testCorrelation"
+ xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+ xmlns:wns="http://ode/bpel/unit-test/testCorrelation.wsdl"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ name="TestCorrelationProcess"
+ targetNamespace="http://ode/bpel/unit-test/testCorrelation"
+ 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="../ProbeService/probeService.wsdl"
+		namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/"/>
+	<import location="testCorrelation.wsdl"
+		namespace="http://ode/bpel/unit-test/testCorrelation.wsdl"
+		importType="http://schemas.xmlsoap.org/wsdl/" />
+	
+	<!-- test correlated receive -->
+	<partnerLinks>
+		<partnerLink name="request" partnerLinkType="wns:testCorrelationRequest" myRole="testCorrelationService"/>
+		<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"/>
+	</variables>
+	<correlationSets>
+		<correlationSet name="testCorr1" properties="wns:testProbeID"/>
+		<correlationSet name="testCorr2" properties="wns:testProbeID"/>
+	</correlationSets>
+	<sequence>
+		<receive name="receive1" partnerLink="request" portType="wns:testCorrelationPT" operation="request" variable="request" createInstance="yes">
+			<correlations>
+				<correlation set="testCorr1" initiate="join"/>
+			</correlations>
+		</receive>
+		<!-- Copy input variables to internal accumulators -->
+		<assign name="assign1">
+			<copy>
+				<from variable="request" property="wns:testProbeID"/>
+				<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[loop on receive until message includes requestEnd = yes]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe" partnerLink="probe" portType="prb:probeMessagePT" operation="probe" inputVariable="probeInput" outputVariable="probeInput"> 
+			<correlations>
+				<correlation set="testCorr2" initiate="join" pattern="out"/>
+			</correlations>
+		</invoke>
+		<while>
+			<condition>$request.requestMessageData/requestEnd = 'no'</condition>
+			<sequence>
+				<receive name="receive2" partnerLink="request" portType="wns:testCorrelationPT" operation="continue" variable="request">
+					<correlations>
+						<correlation set="testCorr1" initiate="join"/>
+					</correlations>
+				</receive>
+				<assign>
+					<copy>
+						<from>
+							<literal><![CDATA[received message]]></literal>
+						</from>
+						<to variable="probeInput" part="probeName"/>
+					</copy>
+				</assign>
+				<invoke name="probe" partnerLink="probe" portType="prb:probeMessagePT" operation="probe" inputVariable="probeInput" outputVariable="probeInput">
+					<correlations>
+						<correlation set="testCorr2" initiate="join" pattern="out"/>
+					</correlations>
+				</invoke>
+			</sequence>
+		</while>
+		<assign>
+			<copy>
+				<from>
+					<literal><![CDATA[process complete]]></literal>
+				</from>
+				<to variable="probeInput" part="probeName"/>
+			</copy>
+		</assign>
+		<invoke name="probe" 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:testCorrelationPT" operation="request" variable="reply"> </reply>
+	</sequence>
+</process>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.wsdl?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinInvoke/testCorrelation.wsdl Thu Nov  6 14:31:35 2008
@@ -0,0 +1,108 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+<wsdl:definitions
+        targetNamespace="http://ode/bpel/unit-test/testCorrelation.wsdl"
+        xmlns:tns="http://ode/bpel/unit-test/testCorrelation.wsdl"
+        xmlns:typens="http://ode/bpel/unit-test/testCorrelation.wsdl.types"
+        xmlns="http://ode/bpel/unit-test/testCorrelation.wsdl"
+        xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+        xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:prop="http://docs.oasis-open.org/wsbpel/2.0/varprop">
+
+
+    <!-- type defs -->
+    <wsdl:types>
+        <xsd:schema
+                targetNamespace="http://ode/bpel/unit-test/testCorrelation.wsdl.types"
+                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+            <xsd:complexType name="testMessage">
+                <xsd:sequence>
+                    <xsd:element name="requestID" type="xsd:string"/>
+                    <xsd:element name="requestText" type="xsd:string"/>
+                    <xsd:element name="requestEnd" type="xsd:string"/>
+                </xsd:sequence>
+            </xsd:complexType>
+        </xsd:schema>
+    </wsdl:types>
+
+
+    <wsdl:message name="requestMessage">
+        <wsdl:part name="requestMessageData" type="typens:testMessage"/>
+    </wsdl:message>
+
+    <wsdl:message name="replyMessage">
+        <wsdl:part name="replyID" type="xsd:string"/>
+        <wsdl:part name="replyText" type="xsd:string"/>
+    </wsdl:message>
+
+
+    <wsdl:portType name="testCorrelationPT">
+        <wsdl:operation name="request">
+            <wsdl:input message="requestMessage"/>
+            <wsdl:output message="replyMessage"/>
+        </wsdl:operation>
+        <wsdl:operation name="continue">
+            <wsdl:input message="requestMessage"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="TestCorrelationBinding" type="tns:testCorrelationPT">
+        <wsdl:operation name="request">
+        </wsdl:operation>
+        <wsdl:operation name="continue">
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="TestCorrelationService">
+        <wsdl:port name="TestCorrelationPort" binding="tns:TestCorrelationBinding">
+        </wsdl:port>
+    </wsdl:service>
+
+    <plnk:partnerLinkType name="testCorrelationRequest">
+        <plnk:role name="testCorrelationService" portType="testCorrelationPT"/>
+    </plnk:partnerLinkType>
+
+    <plnk:partnerLinkType name="probeRequest">
+        <plnk:role name="probeService" portType="prb:probeMessagePT"/>
+    </plnk:partnerLinkType>
+
+    <prop:property name="testProbeID" type="xsd:string"/>
+    <prop:propertyAlias propertyName="tns:testProbeID" messageType="tns:requestMessage" part="requestMessageData">
+        <prop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+            requestID
+        </prop:query>
+    </prop:propertyAlias>
+    <prop:propertyAlias propertyName="tns:testProbeID" messageType="prb:probeMessage" part="probeName">
+        <prop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+            .
+        </prop:query>
+    </prop:propertyAlias>
+
+    <prop:property name="testProbeData" type="xsd:string"/>
+    <prop:propertyAlias propertyName="tns:testProbeData" messageType="tns:requestMessage" part="requestMessageData">
+        <prop:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+            requestText
+        </prop:query>
+    </prop:propertyAlias>
+
+</wsdl:definitions>

Added: ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/deploy.xml?rev=711994&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestCorrelationJoinOnMessage/deploy.xml Thu Nov  6 14:31:35 2008
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<dd:deploy xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd">
+    <dd:process xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd" xmlns:Pool="http://ode.apache.org/test4/Pool"
+                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diag="http://ode.apache.org/test4"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:this="http://ode.apache.org/test4/process" 
+                xmlns:NPGServices_Abstract="http://www.ode.apache.org/NPG/v1/wsdl"
+                xmlns:NPGData="http://www.ode.apache.org/NPG/v1" name="this:process" fileName="test4-process.bpel">
+  <dd:property name="PATH">test4</dd:property>
+  <dd:property name="SVG">test4.svg</dd:property>
+  <dd:provide partnerLink="processAndPoolPlkVar">
+    <dd:service name="this:CanonicServiceForPool" port="canonicPort"></dd:service>
+  </dd:provide>
+</dd:process></dd:deploy>
\ No newline at end of file