You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2010/11/24 15:48:44 UTC

svn commit: r1038633 - in /ode/trunk/bpel-test/src/test: java/org/apache/ode/test/ resources/bpel/2.0/TestIfBoolean/

Author: vanto
Date: Wed Nov 24 14:48:43 2010
New Revision: 1038633

URL: http://svn.apache.org/viewvc?rev=1038633&view=rev
Log:
Test case for ODE-763, ODE-900 added. Thanks Rick!

Added:
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpel
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpelex
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.wsdl   (with props)
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/deploy.xml   (with props)
    ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/test.properties   (with props)
Modified:
    ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java

Modified: ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java?rev=1038633&r1=1038632&r2=1038633&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java (original)
+++ ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java Wed Nov 24 14:48:43 2010
@@ -53,6 +53,10 @@ public class BasicActivities20Test exten
         go("/bpel/2.0/TestIf");
     }
 
+    @Test public void testIfBoolean() throws Throwable {
+        go("/bpel/2.0/TestIfBoolean");
+    }
+
     /**
      * Tests the wait "for" syntax.
      * @throws Throwable

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpel?rev=1038633&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpel (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpel Wed Nov 24 14:48:43 2010
@@ -0,0 +1,88 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<process name="TestIf"
+         targetNamespace="http://ode/bpel/unit-test"
+         xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+         xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+         xmlns:tns="http://ode/bpel/unit-test"
+         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+         xmlns:test="http://ode/bpel/unit-test.wsdl">
+
+    <import location="TestIf.wsdl"
+            namespace="http://ode/bpel/unit-test.wsdl"
+            importType="http://schemas.xmlsoap.org/wsdl/" />
+
+    <partnerLinks>
+        <partnerLink name="helloPartnerLink"
+                     partnerLinkType="test:HelloPartnerLinkType"
+                     myRole="me" />
+    </partnerLinks>
+
+    <variables>
+        <variable name="myVar" messageType="test:HelloMessage"/>
+        <variable name="tmpBool" type="xsd:boolean"/>
+    </variables>
+
+    <sequence>
+        <receive
+                name="start"
+                partnerLink="helloPartnerLink"
+                portType="test:HelloPortType"
+                operation="hello"
+                variable="myVar"
+                createInstance="yes"/>
+
+        <assign name="assign1">
+            <copy>
+                <from>false()</from>
+                <to variable="tmpBool"/>
+            </copy>
+        </assign>
+        <if>
+            <!-- <condition>boolean($tmpBool)</condition> --> <!-- TRUE -->
+            <!-- <condition>$tmpBool</condition> --> <!-- TRUE -->
+            <!-- <condition>string($tmpBool)='true'</condition> --> <!-- FALSE -->
+            <!-- <condition>true()</condition>  --><!-- TRUE -->
+            <condition>$tmpBool</condition>
+            <assign name="assignTrue">
+                <copy>
+                    <from>
+                        <literal>TRUE</literal>
+                    </from>
+                    <to variable="myVar" part="TestPart"/>
+                </copy>
+            </assign>
+            <else>
+                <assign name="assignFalse">
+                    <copy>
+                        <from>
+                            <literal>FALSE</literal>
+                        </from>
+                        <to variable="myVar" part="TestPart"/>
+                    </copy>
+                </assign>
+            </else>
+        </if>
+        <reply name="end"
+               partnerLink="helloPartnerLink"
+               portType="test:HelloPortType"
+               operation="hello"
+               variable="myVar"/>
+    </sequence>
+</process>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpelex
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpelex?rev=1038633&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpelex (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.bpelex Wed Nov 24 14:48:43 2010
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:extensionmodel="http:///extensionmodel.ecore" xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore" namespace="http://org.eclipse.bpel.ui/">
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@variables/@children.0"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@variables/@children.1"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.0"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.1"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.1/@copy.0"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.2"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.3"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#/"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension" modificationStamp="1290610006330"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.2/@else/@activity"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.2/@else/@activity/@copy.0"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.2/@activity"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+  </extensions>
+  <extensions>
+    <extendedObject href="TestIf.bpel#//@activity/@activities.2/@activity/@copy.0"/>
+    <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+  </extensions>
+</extensionmodel:ExtensionMap>

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.wsdl?rev=1038633&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.wsdl (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.wsdl Wed Nov 24 14:48:43 2010
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<wsdl:definitions 
+    targetNamespace="http://ode/bpel/unit-test.wsdl"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:tns="http://ode/bpel/unit-test.wsdl"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <soap:operation soapAction="" style="rpc"/>
+            <wsdl:input>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl"
+                    use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body
+                    namespace="http://ode/bpel/unit-test.wsdl" 
+                    use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="HelloService">
+		<wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+     		<soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+		</wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="HelloPartnerLinkType">
+       <plnk:role name="me" portType="tns:HelloPortType"/>
+       <plnk:role name="you" portType="tns:HelloPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
+

Propchange: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/TestIf.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/deploy.xml?rev=1038633&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/deploy.xml (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/deploy.xml Wed Nov 24 14:48:43 2010
@@ -0,0 +1,30 @@
+<!--
+  ~ 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" 
+	xmlns:wns="http://ode/bpel/unit-test.wsdl">
+
+
+	<process name="pns:TestIf">
+		<active>true</active>
+		<provide partnerLink="helloPartnerLink">
+			<service name="wns:HelloService" port="HelloPort"/>
+		</provide>
+	</process>
+</deploy>

Propchange: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/deploy.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/test.properties
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/test.properties?rev=1038633&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/test.properties (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/test.properties Wed Nov 24 14:48:43 2010
@@ -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.wsdl
+service=HelloService
+operation=hello
+request1=<message><TestPart>2.0</TestPart></message>
+response1=.*FALSE.*

Propchange: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestIfBoolean/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native