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 2007/09/07 18:06:17 UTC

svn commit: r573620 - in /ode/branches/APACHE_ODE_1.1/bpel-test/src: main/java/org/apache/ode/test/ test/java/org/apache/ode/test/ test/resources/bpel/2.0/TestForEach/

Author: mriou
Date: Fri Sep  7 09:06:12 2007
New Revision: 573620

URL: http://svn.apache.org/viewvc?rev=573620&view=rev
Log:
New test for the forEach activity.

Added:
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.bpel
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.cbp   (with props)
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.wsdl
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach.wsdl
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/deploy.xml
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/foreach.xsd
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/test.properties
Modified:
    ode/branches/APACHE_ODE_1.1/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java
    ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/StructuredActivities20Test.java

Modified: ode/branches/APACHE_ODE_1.1/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java?rev=573620&r1=573619&r2=573620&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java Fri Sep  7 09:06:12 2007
@@ -620,6 +620,7 @@
                     if (mex.getResponse() == null)
                         failure(_invocation, "Expected response, but got none.", null);
                     String responseStr = DOMUtils.domToString(mex.getResponse().getMessage());
+                    System.out.println("=>" + responseStr);
                     Matcher matcher = _invocation.expectedResponsePattern.matcher(responseStr);
                     if (!matcher.matches())
                         failure(_invocation, "Response does not match expected pattern", _invocation.expectedResponsePattern, responseStr);

Modified: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/StructuredActivities20Test.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/StructuredActivities20Test.java?rev=573620&r1=573619&r2=573620&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/StructuredActivities20Test.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/StructuredActivities20Test.java Fri Sep  7 09:06:12 2007
@@ -29,4 +29,8 @@
         // Test Flow with XPath10
         go("/bpel/2.0/TestFlowActivity2");
     }
+	@Test public void testForEach() throws Throwable {
+        // Test Flow with XPath10
+        go("/bpel/2.0/TestForEach");
+    }
 }

Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.bpel?rev=573620&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.bpel (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.bpel Fri Sep  7 09:06:12 2007
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpel:process xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+              xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+              xmlns:foreach="http://www.example.org/jms" xmlns:diag="http://example.com/ForEach"
+              xmlns:Pool="http://example.com/ForEach/Pool" xmlns:this="http://example.com/ForEach/ForEach"
+              xmlns:bpmn="http://www.intalio.com/bpms" queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+              expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+              name="ForEach" targetNamespace="http://example.com/ForEach/ForEach">
+
+    <bpel:import namespace="http://example.com/ForEach" location="ForEach.wsdl"
+                 importType="http://schemas.xmlsoap.org/wsdl/"/>
+    <bpel:import namespace="http://example.com/ForEach/ForEach" location="ForEach-ForEach.wsdl"
+                 importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+    <bpel:partnerLinks>
+        <bpel:partnerLink name="poolAndForEachPlkVar" partnerLinkType="diag:PoolAndForEach" myRole="ForEach_for_Pool"/>
+    </bpel:partnerLinks>
+    
+    <bpel:variables>
+        <bpel:variable name="thisStartRequestMsg" messageType="this:startRequest"/>
+        <bpel:variable name="thisStartResponseMsg" messageType="this:startResponse"/>
+    </bpel:variables>
+
+    <bpel:sequence>
+        <bpel:receive partnerLink="poolAndForEachPlkVar" portType="this:ForPool"
+                      operation="start" variable="thisStartRequestMsg" createInstance="yes"/>
+
+        <bpel:forEach parallel="no" counterName="ForEachCounter">
+            <bpel:startCounterValue>"1"</bpel:startCounterValue>
+            <bpel:finalCounterValue>"3"</bpel:finalCounterValue>
+            <bpel:scope bpmn:label="ForEach">
+                <bpel:sequence>
+                    <bpel:assign>
+                        <bpel:copy>
+                            <bpel:from>concat($thisStartRequestMsg.body/text(), $ForEachCounter)</bpel:from>
+                            <bpel:to>$thisStartRequestMsg.body</bpel:to>
+                        </bpel:copy>
+                    </bpel:assign>
+                </bpel:sequence>
+            </bpel:scope>
+        </bpel:forEach>
+
+        <bpel:assign>
+            <bpel:copy>
+                <bpel:from>$thisStartRequestMsg.body</bpel:from>
+                <bpel:to>$thisStartResponseMsg.body</bpel:to>
+            </bpel:copy>
+        </bpel:assign>
+        <bpel:reply partnerLink="poolAndForEachPlkVar" portType="this:ForPool" operation="start" variable="thisStartResponseMsg"/>
+    </bpel:sequence>
+</bpel:process>
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.cbp
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.cbp?rev=573620&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.cbp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.wsdl?rev=573620&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.wsdl (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach-ForEach.wsdl Fri Sep  7 09:06:12 2007
@@ -0,0 +1,33 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:Pool="http://example.com/ForEach/Pool" xmlns:diag="http://example.com/ForEach" xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/" xmlns:foreach="http://www.example.org/jms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:this="http://example.com/ForEach/ForEach" targetNamespace="http://example.com/ForEach/ForEach">
+    <wsdl:types>
+        <xs:schema targetNamespace="http://www.example.org/jms">
+            <xs:include schemaLocation="foreach.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="startRequest">
+        <wsdl:part name="body" element="foreach:input"/>
+    </wsdl:message>
+    <wsdl:message name="startResponse">
+        <wsdl:part name="body" element="foreach:input"/>
+    </wsdl:message>
+    <wsdl:portType name="ForPool">
+        <wsdl:operation name="start">
+            <wsdl:input message="this:startRequest" name="start"/>
+            <wsdl:output message="this:startResponse" name="startResponse"/>
+        </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="start">
+            <soap:operation style="document" soapAction="http://example.com/ForEach/ForEach/ForPool/start"/>
+            <wsdl:input><soap:body use="literal"/></wsdl:input>
+            <wsdl:output><soap:body use="literal"/></wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="CanonicServiceForPool">
+        <wsdl:port name="canonicPort" binding="this:CanonicBindingForPool">
+            <soap:address location="http://localhost:8080/ode/processes/ForEach/Pool"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach.wsdl?rev=573620&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach.wsdl (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/ForEach.wsdl Fri Sep  7 09:06:12 2007
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:bpdm="http://www.intalio/designer/business-process-data-modeling" xmlns:Pool="http://example.com/ForEach/Pool" xmlns:ForEach="http://example.com/ForEach/ForEach" xmlns:diag="http://example.com/ForEach" xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:foreach="http://www.example.org/jms" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://example.com/ForEach">
+    <wsdl:import namespace="http://example.com/ForEach/ForEach" location="ForEach-ForEach.wsdl"/>
+    <pnlk:partnerLinkType name="PoolAndForEach">
+        <pnlk:role name="ForEach_for_Pool" portType="ForEach:ForPool"/>
+    </pnlk:partnerLinkType>
+</wsdl:definitions>
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/deploy.xml?rev=573620&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/deploy.xml Fri Sep  7 09:06:12 2007
@@ -0,0 +1,7 @@
+<?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://example.com/ForEach/Pool" xmlns:diag="http://example.com/ForEach" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:foreach="http://www.example.org/jms" xmlns:this="http://example.com/ForEach/ForEach" name="this:ForEach" fileName="ForEach-ForEach.bpel">
+  <dd:property name="PATH">ForEach</dd:property>
+  <dd:property name="SVG">ForEach.svg</dd:property>
+  <dd:provide partnerLink="poolAndForEachPlkVar">
+    <dd:service name="this:CanonicServiceForPool" port="canonicPort" />
+  </dd:provide>
+</dd:process></dd:deploy>
\ No newline at end of file

Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/foreach.xsd
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/foreach.xsd?rev=573620&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/foreach.xsd (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/foreach.xsd Fri Sep  7 09:06:12 2007
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	targetNamespace="http://www.example.org/jms"
+	xmlns:tns="http://www.example.org/foreach"
+	elementFormDefault="qualified">
+
+    <xs:element name="input" type="xs:string" />
+</xs:schema>
+
+

Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/test.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/test.properties?rev=573620&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/test.properties (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestForEach/test.properties Fri Sep  7 09:06:12 2007
@@ -0,0 +1,23 @@
+#
+#    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://example.com/ForEach/ForEach
+service=CanonicServiceForPool
+operation=start
+request1=<message><body><input xmlns="http://www.example.org/jms">in</input></body></message>
+response1=.*123.*
+