ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yebo <yebo1...@qq.com>
Subject Re: ODE while error
Date Fri, 19 Sep 2008 15:41:16 GMT

Hi, i have changed my bpel according your suggestion, but this time it can't
get out of while

my bpel:

<?xml version="1.0" encoding="UTF-8"?>
<!--
BPEL Process Definition
Edited using ActiveBPEL(r) Designer Version 4.1.0
(http://www.active-endpoints.com)
-->
<bpel:process
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns1="http://bupt.edu.cn" xmlns:ns2="CreateConference.xsl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="getHelloWorld"
suppressJoinFailure="yes" targetNamespace="http://getHelloWorld"
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
   <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
location="WSDL/Hello.wsdl" namespace="http://bupt.edu.cn"/>
   <bpel:partnerLinks>
      <bpel:partnerLink myRole="getHelloPLTRole" name="TestHelloPLT"
partnerLinkType="ns1:TestHelloPLT" partnerRole="getHelloPLTRole"/>
   </bpel:partnerLinks>
   <bpel:variables>
      <bpel:variable messageType="ns1:getHelloWorldRequest"
name="getHelloWorldRequest"/>
      <bpel:variable messageType="ns1:getHelloWorldResponse"
name="getHelloWorldResponse"/>
      <bpel:variable name="repeatTimes" type="xsd:int"/>
      <bpel:variable name="repeat" type="xsd:int"/>
   </bpel:variables>
   <bpel:sequence name="TestSequence">
      <bpel:receive createInstance="yes" name="TestReceive"
operation="getHelloWorld" partnerLink="TestHelloPLT" portType="ns1:Hello"
variable="getHelloWorldRequest"/>
      <bpel:assign name="Initial">
         <bpel:copy>
            <bpel:from>
               <bpel:literal>1</bpel:literal>
            </bpel:from>
            <bpel:to variable="repeatTimes"/>
         </bpel:copy>
         <bpel:copy>
            <bpel:from>
               <bpel:literal>5</bpel:literal>
            </bpel:from>
            <bpel:to variable="repeat"/>
         </bpel:copy>
      </bpel:assign>
      <bpel:invoke inputVariable="getHelloWorldRequest" name="TestInvoke"
operation="getHelloWorld" outputVariable="getHelloWorldResponse"
partnerLink="TestHelloPLT" portType="ns1:Hello"/>
      <bpel:while name="TestWhile">
         <bpel:condition>$repeatTimes &lt; 5</bpel:condition>
         <bpel:sequence name="TestSequence">
            <bpel:assign>
               <bpel:copy>
                  <bpel:from variable="repeatTimes">
                     <bpel:query>$repeatTimes + '1'</bpel:query>
                  </bpel:from>
                  <bpel:to variable="repeatTimes"/>
               </bpel:copy>
            </bpel:assign>
         </bpel:sequence>
      </bpel:while>
      <bpel:assign>
         <bpel:copy>
            <bpel:from part="parameters" variable="getHelloWorldResponse">
               <bpel:query>concat(ns1:getHelloWorldReturn, 'Hello',
$repeatTimes, 'haha', $repeat )</bpel:query>
            </bpel:from>
            <bpel:to part="parameters" variable="getHelloWorldResponse">
               <bpel:query>ns1:getHelloWorldReturn</bpel:query>
            </bpel:to>
         </bpel:copy>
      </bpel:assign>
      <bpel:reply operation="getHelloWorld" partnerLink="TestHelloPLT"
portType="ns1:Hello" variable="getHelloWorldResponse"/>
   </bpel:sequence>
</bpel:process>




Hi,

Can you try the following:

  a) Change the types of repeatTimes and repeat to int.
  b) Use XPath 2.0 instead of XPath 1.0. This requires adding the
queryLanguage and expressionLanguage attributes in the process element
declaration like here:

http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/distro/src/examples-war/HelloWorld2/HelloWorld2.bpel

Thanks,
Matthieu http://www.nabble.com/file/p19574699/HelloBPEL-sa-1.0-SNAPSHOT.zip
HelloBPEL-sa-1.0-SNAPSHOT.zip 
-- 
View this message in context: http://www.nabble.com/ODE--while--error-tp19566046p19574699.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Mime
View raw message