ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <boisv...@intalio.com>
Subject Re: Accessing a Counter inside a foreach
Date Mon, 07 Jan 2008 18:23:23 GMT

Which version of Ode are you using?   The latest Ode 1.1 branch compiles 
your process just fine, so it's probably something we've fixed recently.

You might want to try out Ode 1.2-RC2
http://www.nabble.com/ODE-1.1-RC2-td12134954.html#a12136219

alex


S┼Żebastien Mosser wrote:
>
>> Could you open a bug report (in Jira) with a full BPEL illustrating this
>> issue?   We have a few test cases in SVN that work with <forEach> and 
>> the
>> counter variable, so you must be doing something different.    Are 
>> you using
>> BPEL 1.1 / 2.0 ?
>
> Here is the process artefacts ...
>
> Where is the Jira web-interface ?
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0"?>
> <definitions name="getWeather"
>         targetNamespace="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo"
>         xmlns:tns="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo"
>         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>         xmlns="http://schemas.xmlsoap.org/wsdl/"
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/">
>
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      TYPE DEFINITION - List of types participating in this BPEL process 
>      The BPEL Designer will generate default request and response types
>      but you can define or import any XML Schema type and use them as part 
>      of the message types.
>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

>     <types>
>         <schema attributeFormDefault="unqualified" elementFormDefault="qualified"

>                 targetNamespace="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo"

>                 xmlns="http://www.w3.org/2001/XMLSchema">
>
>             <element name="getWeatherRequest">
>                 <complexType>
>                     <sequence>
>                         <element name="input" type="string"/>
>                     </sequence>
>                 </complexType>
>             </element>
>
>             <element name="getWeatherResponse">
>                 <complexType>
>                     <sequence>
>                         <element name="result" type="tns:WeatherInformation" minOccurs="0"
maxOccurs="unbounded"/>
>                     </sequence>
>                 </complexType>
>             </element>
>         
>             <complexType name="WeatherInformation">
>             	<sequence>
>             		<element name="date" type="string"></element>
>             		<element name="htmlContent" type="string"></element>
>             	</sequence>
>             </complexType>
>         </schema>
>     </types>
>
>
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      MESSAGE TYPE DEFINITION - Definition of the message types used as 
>      part of the port type defintions
>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

>     <message name="getWeatherRequestMessage">
>     </message>
>     <message name="getWeatherResponseMessage">
>         <part name="payload" element="tns:getWeatherResponse"/>
>     </message>
>
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      PORT TYPE DEFINITION - A port type groups a set of operations into
>      a logical service unit.
>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

>
>     <!-- portType implemented by the getWeather BPEL process -->
>     <portType name="getWeather">
>         <operation name="process">
>             <input  message="tns:getWeatherRequestMessage" />
>             <output message="tns:getWeatherResponseMessage"/>
>         </operation>
>     </portType>
>   
>
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      PARTNER LINK TYPE DEFINITION
>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

>     <plnk:partnerLinkType name="getWeather">
>         <plnk:role name="getWeatherProvider" portType="tns:getWeather"/>
>     </plnk:partnerLinkType>
>     
>     <binding name="SOAP_Binding" type="tns:getWeather">
>     	<soap:binding style="document"
>     		transport="http://schemas.xmlsoap.org/soap/http" />
>     	<operation name="process">
>     		<soap:operation
>     			soapAction="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo/process"
/>
>     		<input>
>     			<soap:body use="literal" />
>     		</input>
>     		<output>
>     			<soap:body use="literal" />
>     		</output>
>     	</operation>
>     </binding>
>     <binding name="HTTP_GET_Binding" type="tns:getWeather">
>     	<http:binding verb="GET" />
>     	<operation name="process">
>     		<http:operation location="/process" />
>     		<input>
>     			<http:urlEncoded />
>     		</input>
>     		<output>
>     			<mime:content type="text/xml" />
>     		</output>
>     	</operation>
>     </binding>
>     <binding name="HTTP_POST_Binding" type="tns:getWeather">
>     	<http:binding verb="POST" />
>     	<operation name="process">
>     		<http:operation location="/process" />
>     		<input>
>     			<mime:content type="application/x-www-form-urlencoded" />
>     		</input>
>     		<output>
>     			<mime:content type="text/xml" />
>     		</output>
>     	</operation>
>     </binding>
>     <service name="WeatherService">
>     	<port name="WeatherService_SOAP" binding="tns:SOAP_Binding">
>     		<soap:address location="http://localhost:8080/ode/processes/SophiaInformations-getWeather"></soap:address>
>     	</port>
>     	<port name="WeatherService_HTTP_GET" binding="tns:HTTP_GET_Binding">
>     		<http:address location="http://localhost:8080/ode/processes/SophiaInformations-getWeather"></http:address>
>     	</port>
>     	<port name="WeatherService_HTTP_POST" binding="tns:HTTP_POST_Binding">
>     		<http:address location="http://localhost:8080/ode/processes/SophiaInformations-getWeather"
/>
>     	</port>
>     </service>
> </definitions>
>   
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <bpws:process exitOnStandardFault="yes" name="getWeather"
>     suppressJoinFailure="no"
>     targetNamespace="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo"
>     xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>     xmlns:ns="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteoArtifacts"
>     xmlns:ns0="http://rss.dataSources.seduite.rainbow.i3s.unice.fr"
>     xmlns:tns="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo"
>     xmlns:xsd="http://rss.dataSources.seduite.rainbow.i3s.unice.fr/xsd" xmlns:xsd0="http://www.w3.org/2001/XMLSchema">
>     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
>         location="getWeather.wsdl" namespace="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo"/>
>     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
>         location="rssreader.wsdl" namespace="http://rss.dataSources.seduite.rainbow.i3s.unice.fr"/>
>     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
>         location="getWeatherArtifacts.wsdl" namespace="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteoArtifacts"/>
>     <bpws:partnerLinks>
>         <bpws:partnerLink myRole="getWeatherProvider" name="client" partnerLinkType="tns:getWeather"/>
>         <bpws:partnerLink name="feedReader"
>             partnerLinkType="ns:feedReaderPartner" partnerRole="feedProvider"/>
>     </bpws:partnerLinks>
>     <bpws:variables>
>         <bpws:variable messageType="tns:getWeatherRequestMessage" name="input"/>
>         <bpws:variable messageType="tns:getWeatherResponseMessage" name="output"/>
>         <bpws:variable messageType="ns0:readSubSetContentResponse" name="feedReaderResponse"/>
>         <bpws:variable messageType="ns0:readSubSetContentRequest" name="feedReaderRequest"/>
>     </bpws:variables>
>     <bpws:sequence name="main">
>         <bpws:receive createInstance="yes" name="receiveInput"
>             operation="process" partnerLink="client"
>             portType="tns:getWeather" variable="input"/>
>         <bpws:assign name="FeedCallVariableInit" validate="no">
>             <bpws:copy>
>                 <bpws:from>
>                     <bpws:literal>
>                         <ns0:readSubSetContent xmlns:ns0="http://rss.dataSources.seduite.rainbow.i3s.unice.fr">
>                             <xsd:streamUrl xmlns:xsd="http://rss.dataSources.seduite.rainbow.i3s.unice.fr/xsd"/>
>                             <xsd:howMany xmlns:xsd="http://rss.dataSources.seduite.rainbow.i3s.unice.fr/xsd"/>
>                         </ns0:readSubSetContent>
>                     </bpws:literal>
>                 </bpws:from>
>                 <bpws:to part="parameters" variable="feedReaderRequest"/>
>             </bpws:copy>
>             <bpws:copy>
>                 <bpws:from><![CDATA["http://www.antibes.maville.com/flux/rss/meteo.php?xtor=RSS-18&code=at"]]></bpws:from>
>                 <bpws:to part="parameters" variable="feedReaderRequest">
>                     <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/xsd:streamUrl]]></bpws:query>
>                 </bpws:to>
>             </bpws:copy>
>             <bpws:copy>
>                 <bpws:from>
>                     <bpws:literal>2</bpws:literal>
>                 </bpws:from>
>                 <bpws:to part="parameters" variable="feedReaderRequest">
>                     <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/xsd:howMany]]></bpws:query>
>                 </bpws:to>
>             </bpws:copy>
>         </bpws:assign>
>         <bpws:invoke inputVariable="feedReaderRequest"
>             name="InvokeFeedReader" operation="readSubSetContent"
>             outputVariable="feedReaderResponse" partnerLink="feedReader" portType="ns0:ExternalStreamReaderPortType"/>
>         <bpws:assign name="OutputInit" validate="no">
>             <bpws:copy>
>                 <bpws:from>
>                     <bpws:literal>
>                         <tns:getWeatherResponse xmlns:tns="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo">
>                             <tns:result>
>                                 <tns:date/>
>                                 <tns:htmlContent/>
>                             </tns:result>
>                         </tns:getWeatherResponse>
>                     </bpws:literal>
>                 </bpws:from>
>                 <bpws:to part="payload" variable="output"/>
>             </bpws:copy>
>         </bpws:assign>
>         <bpws:forEach counterName="Counter" name="IterateOverResults" parallel="no">
>             <bpws:startCounterValue><![CDATA[1]]></bpws:startCounterValue>
>             <bpws:finalCounterValue><![CDATA[count($feedReaderResponse.parameters/xsd:return/xsd:content)]]></bpws:finalCounterValue>
>             <bpws:scope>
>                 <bpws:assign name="AddResultToOutput" validate="no">
>                     <bpws:copy>
>                         <bpws:from><![CDATA[$feedReaderResponse.parameters/xsd:return[$Counter]/xsd:title]]></bpws:from>
>                         <bpws:to><![CDATA[$output.payload/tns:result[$Counter]/tns:date]]></bpws:to>
>                     </bpws:copy>
>                     <bpws:copy>
>                         <bpws:from><![CDATA[$feedReaderResponse.parameters/xsd:return/xsd:content[$Counter]/xsd:content]]></bpws:from>
>                         <bpws:to><![CDATA[$output.payload/tns:result[$Counter]/tns:htmlContent]]></bpws:to>
>                     </bpws:copy>
>                 </bpws:assign>
>             </bpws:scope>
>         </bpws:forEach>
>         <bpws:reply name="replyOutput" operation="process"
>             partnerLink="client" portType="tns:getWeather" variable="output"/>
>         <bpws:exit name="Exit"/>
>     </bpws:sequence>
> </bpws:process>
>   
> ------------------------------------------------------------------------
>
> <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"
> 	xmlns:tns="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteo"
> 	xmlns:rssReader="http://rss.dataSources.seduite.rainbow.i3s.unice.fr"  >
> 	
> 	<process name="tns:getWeather">
> 		<active>true</active>
> 		<provide partnerLink="client">
> 			<service name="tns:WeatherService" 
> 					 port="WeatherService_SOAP"/>
> 		</provide>
> 		<invoke partnerLink="feedReader">
> 		  <service name="rssReader:ExternalStreamReader"
> 		  		   port="ExternalStreamReaderSOAP11port_http" />
> 		</invoke>
> 	</process>
> 	
> </deploy>
>
>   
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://rss.dataSources.seduite.rainbow.i3s.unice.fr"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://rss.dataSources.seduite.rainbow.i3s.unice.fr/xsd"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://rss.dataSources.seduite.rainbow.i3s.unice.fr">
>     <wsdl:documentation>ExternalStreamReader</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema xmlns:ns="http://rss.dataSources.seduite.rainbow.i3s.unice.fr/xsd"
attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rss.dataSources.seduite.rainbow.i3s.unice.fr/xsd">
>             <xs:element name="readCompleteContent">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="streamUrl" nillable="true"
type="xs:string"/>
>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="readCompleteContentResponse">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="return" nillable="true" type="ns:RssContent"/>
>                     </xs:sequence>
>                 </xs:complexType>
>
>             </xs:element>
>             <xs:complexType name="RssContent">
>                 <xs:sequence>
>                     <xs:element maxOccurs="unbounded" minOccurs="0" name="content"
nillable="true" type="ns:RssNode"/>
>                     <xs:element minOccurs="0" name="language" nillable="true" type="xs:string"/>
>                     <xs:element minOccurs="0" name="link" nillable="true" type="xs:string"/>
>                     <xs:element minOccurs="0" name="title" nillable="true" type="xs:string"/>
>                 </xs:sequence>
>             </xs:complexType>
>
>             <xs:complexType name="RssNode">
>                 <xs:sequence>
>                     <xs:element minOccurs="0" name="author" nillable="true" type="xs:string"/>
>                     <xs:element minOccurs="0" name="content" nillable="true" type="xs:string"/>
>                     <xs:element minOccurs="0" name="title" nillable="true" type="xs:string"/>
>                     <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
>                 </xs:sequence>
>             </xs:complexType>
>             <xs:element name="readSubSetContent">
>
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="streamUrl" nillable="true"
type="xs:string"/>
>                         <xs:element minOccurs="0" name="howMany" type="xs:int"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="readSubSetContentResponse">
>                 <xs:complexType>
>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="return" nillable="true" type="ns:RssContent"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="readCompleteContentRequest">
>         <wsdl:part name="parameters" element="ns0:readCompleteContent"/>
>
>     </wsdl:message>
>     <wsdl:message name="readCompleteContentResponse">
>         <wsdl:part name="parameters" element="ns0:readCompleteContentResponse"/>
>     </wsdl:message>
>     <wsdl:message name="readSubSetContentRequest">
>         <wsdl:part name="parameters" element="ns0:readSubSetContent"/>
>     </wsdl:message>
>     <wsdl:message name="readSubSetContentResponse">
>         <wsdl:part name="parameters" element="ns0:readSubSetContentResponse"/>
>
>     </wsdl:message>
>     <wsdl:portType name="ExternalStreamReaderPortType">
>         <wsdl:operation name="readCompleteContent">
>             <wsdl:input message="axis2:readCompleteContentRequest" wsaw:Action="urn:readCompleteContent"/>
>             <wsdl:output message="axis2:readCompleteContentResponse" wsaw:Action="urn:readCompleteContentResponse"/>
>         </wsdl:operation>
>         <wsdl:operation name="readSubSetContent">
>             <wsdl:input message="axis2:readSubSetContentRequest" wsaw:Action="urn:readSubSetContent"/>
>             <wsdl:output message="axis2:readSubSetContentResponse" wsaw:Action="urn:readSubSetContentResponse"/>
>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="ExternalStreamReaderSOAP11Binding" type="axis2:ExternalStreamReaderPortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="readCompleteContent">
>             <soap:operation soapAction="urn:readCompleteContent" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="readSubSetContent">
>             <soap:operation soapAction="urn:readSubSetContent" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="ExternalStreamReaderSOAP12Binding" type="axis2:ExternalStreamReaderPortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="readCompleteContent">
>             <soap12:operation soapAction="urn:readCompleteContent" style="document"/>
>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="readSubSetContent">
>             <soap12:operation soapAction="urn:readSubSetContent" style="document"/>
>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="ExternalStreamReaderHttpBinding" type="axis2:ExternalStreamReaderPortType">
>
>         <http:binding verb="POST"/>
>         <wsdl:operation name="readCompleteContent">
>             <http:operation location="ExternalStreamReader/readCompleteContent"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="readCompleteContent"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <mime:content type="text/xml" part="readCompleteContent"/>
>             </wsdl:output>
>
>         </wsdl:operation>
>         <wsdl:operation name="readSubSetContent">
>             <http:operation location="ExternalStreamReader/readSubSetContent"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="readSubSetContent"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <mime:content type="text/xml" part="readSubSetContent"/>
>             </wsdl:output>
>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="ExternalStreamReader">
>         <wsdl:port name="ExternalStreamReaderSOAP11port_http" binding="axis2:ExternalStreamReaderSOAP11Binding">
>             <soap:address location="http://localhost:8080/axis2/services/ExternalStreamReader"/>
>         </wsdl:port>
>         <wsdl:port name="ExternalStreamReaderSOAP12port_http" binding="axis2:ExternalStreamReaderSOAP12Binding">
>             <soap12:address location="http://localhost:8080/axis2/services/ExternalStreamReader"/>
>         </wsdl:port>
>
>         <wsdl:port name="ExternalStreamReaderHttpport" binding="axis2:ExternalStreamReaderHttpBinding">
>             <http:address location="http://localhost:8080/axis2/services/ExternalStreamReader"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:tns="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteoArtifacts"
xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://rss.dataSources.seduite.rainbow.i3s.unice.fr"
name="getWeatherArtifacts" targetNamespace="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/sophia/meteoArtifacts"
xmlns="http://schemas.xmlsoap.org/wsdl/">
> <plnk:partnerLinkType name="feedReaderPartner">
> <plnk:role name="feedProvider" portType="wsdl:ExternalStreamReaderPortType"/>
> </plnk:partnerLinkType>
> <import location="rssreader.wsdl" namespace="http://rss.dataSources.seduite.rainbow.i3s.unice.fr"/>
> </definitions>
>   


Mime
View raw message