You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Jonathan Coogan <Jo...@Attachmate.com> on 2009/07/08 23:27:48 UTC

Inline variable initialization in Ode 1.3.2

Hello again.  I have a question about using the inline from-spec for
variable initialization
(http://cwiki.apache.org/confluence/display/ODExSITE/WS-BPEL+2.0+Specifi
cation+Compliance#WS-BPEL2.0SpecificationCompliance-Initialization).
 
It's not working for me and I was hoping someone could tell me if I'm
doing something wrong.  Here is a very simple example in which I try to
assign data to and from a variable that has an inline initializer.  I
get a selectionFailure at runtime.
 
--------------- Begin TestInlineInitialization.wsdl ---------------
<?xml version="1.0"?>
<definitions name="TestInlineInitialization"
  targetNamespace="mynamespace"
  xmlns:tns="mynamespace"
  xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns="http://schemas.xmlsoap.org/wsdl/"
  >

  <types>
    <schema attributeFormDefault="unqualified"
elementFormDefault="qualified" 
      targetNamespace="mynamespace" 
      xmlns="http://www.w3.org/2001/XMLSchema">

      <element name="Input" type="string" />
      <element name="Output" type="string" />

      <complexType name="StructureType">
        <sequence>
          <element name="Element1" type="string"></element>
          <element name="Element2" type="string"></element>
          <element name="Element3" type="string"></element>
        </sequence>
      </complexType>
      <element name="Structure" type="tns:StructureType"></element>
    </schema>
  </types>

  <message name="InputMessage">
    <part name="payload" element="tns:Input"/>
  </message>
  <message name="OutputMessage">
    <part name="payload" element="tns:Output"/>
  </message>

  <portType name="ServicePortType">
    <operation name="process">
      <input  message="tns:InputMessage" />
      <output message="tns:OutputMessage"/>
    </operation>
  </portType>

  <plnk:partnerLinkType name="ServicePartnerLinkType">
    <plnk:role name="ServiceProvider" portType="tns:ServicePortType"/>
  </plnk:partnerLinkType>

  <binding name="ServiceBinding" type="tns:ServicePortType">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="process">
      <soap:operation soapAction="mynamespace/process" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>
  </binding>

  <service name="TestInlineInitializationService">
    <port name="TestInlineInitializationPort"
binding="tns:ServiceBinding">
      <soap:address
location="http://[server]:[port]/processes/TestInlineInitialization" />
    </port>
  </service>
</definitions>
--------------- End TestInlineInitialization.wsdl ---------------


--------------- Begin TestInlineInitialization.bpel ---------------
<?xml version="1.0" encoding="UTF-8"?>
<bpel:process exitOnStandardFault="yes"
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    name="TestInlineInitialization"
    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    suppressJoinFailure="yes" targetNamespace="mynamespace"
 
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:ode="http://www.apache.org/ode/type/extension"
    xmlns:tns="mynamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
        location="TestInlineInitialization.wsdl"
namespace="mynamespace"/>
    <bpel:partnerLinks>
        <bpel:partnerLink myRole="ServiceProvider" name="client"
partnerLinkType="tns:ServicePartnerLinkType"/>
    </bpel:partnerLinks>
    <bpel:variables>
        <bpel:variable messageType="tns:InputMessage" name="input"/>
        <bpel:variable messageType="tns:OutputMessage" name="output"/>
        <bpel:variable element="tns:Structure" name="StructureVariable">
          <bpel:from>
            <bpel:literal>
              <tns:Structure xmlns:tns="mynamespace"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="mynamespace
TestInlineInitialization.wsdl ">
                <tns:Element1 />
                <tns:Element2 />
                <tns:Element3 />
              </tns:Structure>
            </bpel:literal>
          </bpel:from>
        </bpel:variable>
    </bpel:variables>
    <bpel:sequence name="process">
        <bpel:receive createInstance="yes" name="ReceiveInput"
            operation="process" partnerLink="client"
            portType="tns:ServicePortType" variable="input"/>
        <bpel:assign name="AssignInputToStructure" validate="no">
            <bpel:copy>
                <bpel:from part="payload" variable="input"/>
                <bpel:to variable="StructureVariable">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[
tns:Element2]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:assign name="AssignFromStructureToOutput" validate="no">
            <bpel:copy>
                <bpel:from variable="StructureVariable">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[
tns:Element2]]></bpel:query>
                </bpel:from>
                <bpel:to part="payload" variable="output"/>
            </bpel:copy>
        </bpel:assign>
        <bpel:reply name="ReplyWithOutput" operation="process"
            partnerLink="client" portType="tns:ServicePortType"
variable="output"/>
    </bpel:sequence>
</bpel:process>
--------------- End TestInlineInitialization.bpel ---------------

This is the selectionFailure I get:

Assignment Fault:
{http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailu
re,lineNo=38,faultExplanation=No results for expression:
{OXPath10Expression tns:Element2}

Thank you.
-Jon

Re: Inline variable initialization in Ode 1.3.2

Posted by Jonathan Coogan <Jo...@attachmate.com>.
Thanks Daniel.

-Jon


On 7/9/09 9:57 AM, "Daniel Dominguez" <da...@parasoft.com> wrote:

> According to http://issues.apache.org/jira/browse/ODE-236 it looks like
> this has only been fixed on the 2.0 version.
> 
> Jonathan Coogan wrote:
>> Hi Bill.  I remember reading that at some point in the past.  I thought
>> that inline initialization was a new feature in Ode 1.3 but maybe it
>> wasn't added after all.
>> 
>> The compliance page needs to be updated in either case.  I guess the
>> question now is whether inline initialization is supposed to work in
>> 1.3.2.
>> 
>> Thanks.
>> -Jon
>> 
>> 
>> 
>> -----Original Message-----
>> From: Bill McCusker [mailto:wmccusker@parasoft.com]
>> Sent: Thursday, July 09, 2009 6:22 AM
>> To: user@ode.apache.org
>> Subject: Re: Inline variable initialization in Ode 1.3.2
>> 
>> Hi Jonathan,
>> 
>>     An interesting bit was pointed out to me on the specification
>> compliance page
>> (http://ode.apache.org/ws-bpel-20-specification-compliance.html). It may
>> just be old information but under <assign> activity there is a line
>> stating "Inline assignment as part of the variable declaration isn't
>> currently supported." I recall that at some point in time it was not
>> supported but it would be nice to get this clarified: should inline
>> initialization work?
>> 
>> Bill McCusker
>> 
>> Jonathan Coogan wrote:
>>   
>>> Hi Bill.  Good suggestion.  Even when I echo the inline initialized
>>> variable back to the response it does not work.  I created a simpler
>>> example that uses an initialized variable of type string.  When I
>>> assign to to the response I get an AssignmentFault saying that the
>>> variable is uninitialized.
>>> 
>>> ---------- Begin TestInlineInitialization2.wsdl ---------- <?xml
>>> version="1.0"?> <definitions name="TestInlineInitialization2"
>>>         targetNamespace="mynamespace"
>>>         xmlns:tns="mynamespace"
>>>         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>>>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>         xmlns="http://schemas.xmlsoap.org/wsdl/"
>>>> 
>>> 
>>>     <types>
>>>         <schema attributeFormDefault="unqualified"
>>> elementFormDefault="qualified"
>>>                 targetNamespace="mynamespace"
>>>                 xmlns="http://www.w3.org/2001/XMLSchema">
>>> 
>>>             <element name="Input" type="string" />
>>>             <element name="Output" type="string" />
>>>         </schema>
>>>     </types>
>>> 
>>>     <message name="InputMessage">
>>>         <part name="payload" element="tns:Input"/>
>>>     </message>
>>>     <message name="OutputMessage">
>>>         <part name="payload" element="tns:Output"/>
>>>     </message>
>>> 
>>>     <portType name="ServicePortType">
>>>         <operation name="process">
>>>             <input  message="tns:InputMessage" />
>>>             <output message="tns:OutputMessage"/>
>>>         </operation>
>>>     </portType>
>>>      
>>>     <plnk:partnerLinkType name="ServicePartnerLinkType">
>>>         <plnk:role name="ServiceProvider"
>>> portType="tns:ServicePortType"/>
>>>     </plnk:partnerLinkType>
>>>     
>>>     <binding name="ServiceBinding" type="tns:ServicePortType">
>>>       <soap:binding style="document"
>>> transport="http://schemas.xmlsoap.org/soap/http" />
>>>       <operation name="process">
>>>         <soap:operation soapAction="mynamespace/process" />
>>>         <input>
>>>           <soap:body use="literal" />
>>>         </input>
>>>         <output>
>>>           <soap:body use="literal" />
>>>         </output>
>>>       </operation>
>>>     </binding>
>>>     
>>>     <service name="TestInlineInitialization2Service">
>>>         <port name="TestInlineInitialization2Port"
>>> binding="tns:ServiceBinding">
>>>           <soap:address
>>> location="http://[server]:[port]/processes/TestInlineInitialization2"
>>>     
>> />
>>   
>>>         </port>
>>>     </service>
>>> </definitions>
>>> ---------- End TestInlineInitialization2.wsdl ----------
>>> 
>>> 
>>> ---------- Begin TestInlineInitialization2.bpel ---------- <?xml
>>> version="1.0" encoding="UTF-8"?> <bpel:process
>>> exitOnStandardFault="yes"
>>> 
>>>     
>> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>>   
>>>     name="TestInlineInitialization2"
>>>     queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>>>     suppressJoinFailure="yes" targetNamespace="mynamespace"
>>>  
>>> xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>>>  
>>> xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>>>     xmlns:ode="http://www.apache.org/ode/type/extension"
>>>     xmlns:tns="mynamespace"
>>>     
>> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>   
>>>     <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
>>>         location="TestInlineInitialization2.wsdl"
>>> namespace="mynamespace"/>
>>>     <bpel:partnerLinks>
>>>         <bpel:partnerLink myRole="ServiceProvider" name="client"
>>> partnerLinkType="tns:ServicePartnerLinkType"/>
>>>     </bpel:partnerLinks>
>>>     <bpel:variables>
>>>         <bpel:variable messageType="tns:InputMessage" name="input"/>
>>>         <bpel:variable messageType="tns:OutputMessage" name="output"/>
>>>         <bpel:variable name="StringVariable" type="xs:string">
>>>           <bpel:from>
>>>             <bpel:literal>Value</bpel:literal>
>>>           </bpel:from>
>>>         </bpel:variable>
>>>     </bpel:variables>
>>>     <bpel:sequence name="process">
>>>         <bpel:receive createInstance="yes" name="ReceiveInput"
>>>             operation="process" partnerLink="client"
>>>             portType="tns:ServicePortType" variable="input"/>
>>>         <bpel:assign name="Assign" validate="no">
>>>             <bpel:copy>
>>>                 <bpel:from variable="StringVariable"/>
>>>                 <bpel:to part="payload" variable="output"/>
>>>             </bpel:copy>
>>>         </bpel:assign>
>>>         <bpel:reply name="ReplyWithOutput" operation="process"
>>>             partnerLink="client" portType="tns:ServicePortType"
>>> variable="output"/>
>>>     </bpel:sequence>
>>> </bpel:process>
>>> ---------- Begin TestInlineInitialization2.bpel ----------
>>> 
>>> Here is the fault I get:
>>> 
>>> INFO  [ASSIGN]: Assignment Fault:
>>> {http://docs.oasis-open.org/wsbpel/2.0/process/executable}uninitialize
>>> dV ariable,lineNo=30,faultExplanation=The variable StringVariable
>>> isn't properly initialized.
>>> 
>>>   
>>>     
>> 
>> 
>>   


Re: Inline variable initialization in Ode 1.3.2

Posted by Daniel Dominguez <da...@parasoft.com>.
According to http://issues.apache.org/jira/browse/ODE-236 it looks like 
this has only been fixed on the 2.0 version.

Jonathan Coogan wrote:
> Hi Bill.  I remember reading that at some point in the past.  I thought
> that inline initialization was a new feature in Ode 1.3 but maybe it
> wasn't added after all.
>
> The compliance page needs to be updated in either case.  I guess the
> question now is whether inline initialization is supposed to work in
> 1.3.2.
>
> Thanks.
> -Jon
>
>
>
> -----Original Message-----
> From: Bill McCusker [mailto:wmccusker@parasoft.com] 
> Sent: Thursday, July 09, 2009 6:22 AM
> To: user@ode.apache.org
> Subject: Re: Inline variable initialization in Ode 1.3.2
>
> Hi Jonathan,
>
>     An interesting bit was pointed out to me on the specification
> compliance page
> (http://ode.apache.org/ws-bpel-20-specification-compliance.html). It may
> just be old information but under <assign> activity there is a line
> stating "Inline assignment as part of the variable declaration isn't
> currently supported." I recall that at some point in time it was not
> supported but it would be nice to get this clarified: should inline
> initialization work?
>
> Bill McCusker
>
> Jonathan Coogan wrote:
>   
>> Hi Bill.  Good suggestion.  Even when I echo the inline initialized 
>> variable back to the response it does not work.  I created a simpler 
>> example that uses an initialized variable of type string.  When I 
>> assign to to the response I get an AssignmentFault saying that the 
>> variable is uninitialized.
>>
>> ---------- Begin TestInlineInitialization2.wsdl ---------- <?xml 
>> version="1.0"?> <definitions name="TestInlineInitialization2"
>>         targetNamespace="mynamespace"
>>         xmlns:tns="mynamespace"
>>         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>         xmlns="http://schemas.xmlsoap.org/wsdl/"
>>         >
>>
>>     <types>
>>         <schema attributeFormDefault="unqualified"
>> elementFormDefault="qualified" 
>>                 targetNamespace="mynamespace" 
>>                 xmlns="http://www.w3.org/2001/XMLSchema">
>>
>>             <element name="Input" type="string" />
>>             <element name="Output" type="string" />
>>         </schema>
>>     </types>
>>
>>     <message name="InputMessage">
>>         <part name="payload" element="tns:Input"/>
>>     </message>
>>     <message name="OutputMessage">
>>         <part name="payload" element="tns:Output"/>
>>     </message>
>>
>>     <portType name="ServicePortType">
>>         <operation name="process">
>>             <input  message="tns:InputMessage" />
>>             <output message="tns:OutputMessage"/>
>>         </operation>
>>     </portType>
>>      
>>     <plnk:partnerLinkType name="ServicePartnerLinkType">
>>         <plnk:role name="ServiceProvider"
>> portType="tns:ServicePortType"/>
>>     </plnk:partnerLinkType>
>>     
>>     <binding name="ServiceBinding" type="tns:ServicePortType">
>>       <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http" />
>>       <operation name="process">
>>         <soap:operation soapAction="mynamespace/process" />
>>         <input>
>>           <soap:body use="literal" />
>>         </input>
>>         <output>
>>           <soap:body use="literal" />
>>         </output>
>>       </operation>
>>     </binding>
>>     
>>     <service name="TestInlineInitialization2Service">
>>         <port name="TestInlineInitialization2Port"
>> binding="tns:ServiceBinding">
>>           <soap:address
>> location="http://[server]:[port]/processes/TestInlineInitialization2"
>>     
> />
>   
>>         </port>
>>     </service>
>> </definitions>
>> ---------- End TestInlineInitialization2.wsdl ----------
>>
>>
>> ---------- Begin TestInlineInitialization2.bpel ---------- <?xml 
>> version="1.0" encoding="UTF-8"?> <bpel:process 
>> exitOnStandardFault="yes"
>>
>>     
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>   
>>     name="TestInlineInitialization2"
>>     queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>>     suppressJoinFailure="yes" targetNamespace="mynamespace"
>>  
>> xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>>  
>> xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>>     xmlns:ode="http://www.apache.org/ode/type/extension"
>>     xmlns:tns="mynamespace"
>>     
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
>   
>>     <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
>>         location="TestInlineInitialization2.wsdl"
>> namespace="mynamespace"/>
>>     <bpel:partnerLinks>
>>         <bpel:partnerLink myRole="ServiceProvider" name="client"
>> partnerLinkType="tns:ServicePartnerLinkType"/>
>>     </bpel:partnerLinks>
>>     <bpel:variables>
>>         <bpel:variable messageType="tns:InputMessage" name="input"/>
>>         <bpel:variable messageType="tns:OutputMessage" name="output"/>
>>         <bpel:variable name="StringVariable" type="xs:string">
>>           <bpel:from>
>>             <bpel:literal>Value</bpel:literal>
>>           </bpel:from>
>>         </bpel:variable>
>>     </bpel:variables>
>>     <bpel:sequence name="process">
>>         <bpel:receive createInstance="yes" name="ReceiveInput"
>>             operation="process" partnerLink="client"
>>             portType="tns:ServicePortType" variable="input"/>
>>         <bpel:assign name="Assign" validate="no">
>>             <bpel:copy>
>>                 <bpel:from variable="StringVariable"/>
>>                 <bpel:to part="payload" variable="output"/>
>>             </bpel:copy>
>>         </bpel:assign>
>>         <bpel:reply name="ReplyWithOutput" operation="process"
>>             partnerLink="client" portType="tns:ServicePortType"
>> variable="output"/>
>>     </bpel:sequence>
>> </bpel:process>
>> ---------- Begin TestInlineInitialization2.bpel ----------
>>
>> Here is the fault I get:
>>
>> INFO  [ASSIGN]: Assignment Fault:
>> {http://docs.oasis-open.org/wsbpel/2.0/process/executable}uninitialize
>> dV ariable,lineNo=30,faultExplanation=The variable StringVariable 
>> isn't properly initialized.
>>
>>   
>>     
>
>
>   

RE: Inline variable initialization in Ode 1.3.2

Posted by Jonathan Coogan <Jo...@Attachmate.com>.
Hi Bill.  I remember reading that at some point in the past.  I thought
that inline initialization was a new feature in Ode 1.3 but maybe it
wasn't added after all.

The compliance page needs to be updated in either case.  I guess the
question now is whether inline initialization is supposed to work in
1.3.2.

Thanks.
-Jon



-----Original Message-----
From: Bill McCusker [mailto:wmccusker@parasoft.com] 
Sent: Thursday, July 09, 2009 6:22 AM
To: user@ode.apache.org
Subject: Re: Inline variable initialization in Ode 1.3.2

Hi Jonathan,

    An interesting bit was pointed out to me on the specification
compliance page
(http://ode.apache.org/ws-bpel-20-specification-compliance.html). It may
just be old information but under <assign> activity there is a line
stating "Inline assignment as part of the variable declaration isn't
currently supported." I recall that at some point in time it was not
supported but it would be nice to get this clarified: should inline
initialization work?

Bill McCusker

Jonathan Coogan wrote:
> Hi Bill.  Good suggestion.  Even when I echo the inline initialized 
> variable back to the response it does not work.  I created a simpler 
> example that uses an initialized variable of type string.  When I 
> assign to to the response I get an AssignmentFault saying that the 
> variable is uninitialized.
>
> ---------- Begin TestInlineInitialization2.wsdl ---------- <?xml 
> version="1.0"?> <definitions name="TestInlineInitialization2"
>         targetNamespace="mynamespace"
>         xmlns:tns="mynamespace"
>         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>         xmlns="http://schemas.xmlsoap.org/wsdl/"
>         >
>
>     <types>
>         <schema attributeFormDefault="unqualified"
> elementFormDefault="qualified" 
>                 targetNamespace="mynamespace" 
>                 xmlns="http://www.w3.org/2001/XMLSchema">
>
>             <element name="Input" type="string" />
>             <element name="Output" type="string" />
>         </schema>
>     </types>
>
>     <message name="InputMessage">
>         <part name="payload" element="tns:Input"/>
>     </message>
>     <message name="OutputMessage">
>         <part name="payload" element="tns:Output"/>
>     </message>
>
>     <portType name="ServicePortType">
>         <operation name="process">
>             <input  message="tns:InputMessage" />
>             <output message="tns:OutputMessage"/>
>         </operation>
>     </portType>
>      
>     <plnk:partnerLinkType name="ServicePartnerLinkType">
>         <plnk:role name="ServiceProvider"
> portType="tns:ServicePortType"/>
>     </plnk:partnerLinkType>
>     
>     <binding name="ServiceBinding" type="tns:ServicePortType">
>       <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>       <operation name="process">
>         <soap:operation soapAction="mynamespace/process" />
>         <input>
>           <soap:body use="literal" />
>         </input>
>         <output>
>           <soap:body use="literal" />
>         </output>
>       </operation>
>     </binding>
>     
>     <service name="TestInlineInitialization2Service">
>         <port name="TestInlineInitialization2Port"
> binding="tns:ServiceBinding">
>           <soap:address
> location="http://[server]:[port]/processes/TestInlineInitialization2"
/>
>         </port>
>     </service>
> </definitions>
> ---------- End TestInlineInitialization2.wsdl ----------
>
>
> ---------- Begin TestInlineInitialization2.bpel ---------- <?xml 
> version="1.0" encoding="UTF-8"?> <bpel:process 
> exitOnStandardFault="yes"
>
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>     name="TestInlineInitialization2"
>     queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>     suppressJoinFailure="yes" targetNamespace="mynamespace"
>  
> xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>  
> xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>     xmlns:ode="http://www.apache.org/ode/type/extension"
>     xmlns:tns="mynamespace"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
>         location="TestInlineInitialization2.wsdl"
> namespace="mynamespace"/>
>     <bpel:partnerLinks>
>         <bpel:partnerLink myRole="ServiceProvider" name="client"
> partnerLinkType="tns:ServicePartnerLinkType"/>
>     </bpel:partnerLinks>
>     <bpel:variables>
>         <bpel:variable messageType="tns:InputMessage" name="input"/>
>         <bpel:variable messageType="tns:OutputMessage" name="output"/>
>         <bpel:variable name="StringVariable" type="xs:string">
>           <bpel:from>
>             <bpel:literal>Value</bpel:literal>
>           </bpel:from>
>         </bpel:variable>
>     </bpel:variables>
>     <bpel:sequence name="process">
>         <bpel:receive createInstance="yes" name="ReceiveInput"
>             operation="process" partnerLink="client"
>             portType="tns:ServicePortType" variable="input"/>
>         <bpel:assign name="Assign" validate="no">
>             <bpel:copy>
>                 <bpel:from variable="StringVariable"/>
>                 <bpel:to part="payload" variable="output"/>
>             </bpel:copy>
>         </bpel:assign>
>         <bpel:reply name="ReplyWithOutput" operation="process"
>             partnerLink="client" portType="tns:ServicePortType"
> variable="output"/>
>     </bpel:sequence>
> </bpel:process>
> ---------- Begin TestInlineInitialization2.bpel ----------
>
> Here is the fault I get:
>
> INFO  [ASSIGN]: Assignment Fault:
> {http://docs.oasis-open.org/wsbpel/2.0/process/executable}uninitialize
> dV ariable,lineNo=30,faultExplanation=The variable StringVariable 
> isn't properly initialized.
>
>   


Re: Inline variable initialization in Ode 1.3.2

Posted by Bill McCusker <wm...@parasoft.com>.
Hi Jonathan,

    An interesting bit was pointed out to me on the specification 
compliance page 
(http://ode.apache.org/ws-bpel-20-specification-compliance.html). It may 
just be old information but under <assign> activity there is a line 
stating "Inline assignment as part of the variable declaration isn't 
currently supported." I recall that at some point in time it was not 
supported but it would be nice to get this clarified: should inline 
initialization work?

Bill McCusker

Jonathan Coogan wrote:
> Hi Bill.  Good suggestion.  Even when I echo the inline initialized
> variable back to the response it does not work.  I created a simpler
> example that uses an initialized variable of type string.  When I assign
> to to the response I get an AssignmentFault saying that the variable is
> uninitialized.
>
> ---------- Begin TestInlineInitialization2.wsdl ---------- 
> <?xml version="1.0"?>
> <definitions name="TestInlineInitialization2"
>         targetNamespace="mynamespace"
>         xmlns:tns="mynamespace"
>         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>         xmlns="http://schemas.xmlsoap.org/wsdl/"
>         >
>
>     <types>
>         <schema attributeFormDefault="unqualified"
> elementFormDefault="qualified" 
>                 targetNamespace="mynamespace" 
>                 xmlns="http://www.w3.org/2001/XMLSchema">
>
>             <element name="Input" type="string" />
>             <element name="Output" type="string" />
>         </schema>
>     </types>
>
>     <message name="InputMessage">
>         <part name="payload" element="tns:Input"/>
>     </message>
>     <message name="OutputMessage">
>         <part name="payload" element="tns:Output"/>
>     </message>
>
>     <portType name="ServicePortType">
>         <operation name="process">
>             <input  message="tns:InputMessage" />
>             <output message="tns:OutputMessage"/>
>         </operation>
>     </portType>
>      
>     <plnk:partnerLinkType name="ServicePartnerLinkType">
>         <plnk:role name="ServiceProvider"
> portType="tns:ServicePortType"/>
>     </plnk:partnerLinkType>
>     
>     <binding name="ServiceBinding" type="tns:ServicePortType">
>       <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>       <operation name="process">
>         <soap:operation soapAction="mynamespace/process" />
>         <input>
>           <soap:body use="literal" />
>         </input>
>         <output>
>           <soap:body use="literal" />
>         </output>
>       </operation>
>     </binding>
>     
>     <service name="TestInlineInitialization2Service">
>         <port name="TestInlineInitialization2Port"
> binding="tns:ServiceBinding">
>           <soap:address
> location="http://[server]:[port]/processes/TestInlineInitialization2" />
>         </port>
>     </service>
> </definitions>
> ---------- End TestInlineInitialization2.wsdl ----------
>
>
> ---------- Begin TestInlineInitialization2.bpel ----------
> <?xml version="1.0" encoding="UTF-8"?>
> <bpel:process exitOnStandardFault="yes"
>     expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>     name="TestInlineInitialization2"
>     queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>     suppressJoinFailure="yes" targetNamespace="mynamespace"
>  
> xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>  
> xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>     xmlns:ode="http://www.apache.org/ode/type/extension"
>     xmlns:tns="mynamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
>         location="TestInlineInitialization2.wsdl"
> namespace="mynamespace"/>
>     <bpel:partnerLinks>
>         <bpel:partnerLink myRole="ServiceProvider" name="client"
> partnerLinkType="tns:ServicePartnerLinkType"/>
>     </bpel:partnerLinks>
>     <bpel:variables>
>         <bpel:variable messageType="tns:InputMessage" name="input"/>
>         <bpel:variable messageType="tns:OutputMessage" name="output"/>
>         <bpel:variable name="StringVariable" type="xs:string">
>           <bpel:from>
>             <bpel:literal>Value</bpel:literal>
>           </bpel:from>
>         </bpel:variable>
>     </bpel:variables>
>     <bpel:sequence name="process">
>         <bpel:receive createInstance="yes" name="ReceiveInput"
>             operation="process" partnerLink="client"
>             portType="tns:ServicePortType" variable="input"/>
>         <bpel:assign name="Assign" validate="no">
>             <bpel:copy>
>                 <bpel:from variable="StringVariable"/>
>                 <bpel:to part="payload" variable="output"/>
>             </bpel:copy>
>         </bpel:assign>
>         <bpel:reply name="ReplyWithOutput" operation="process"
>             partnerLink="client" portType="tns:ServicePortType"
> variable="output"/>
>     </bpel:sequence>
> </bpel:process>
> ---------- Begin TestInlineInitialization2.bpel ----------
>
> Here is the fault I get:
>
> INFO  [ASSIGN]: Assignment Fault:
> {http://docs.oasis-open.org/wsbpel/2.0/process/executable}uninitializedV
> ariable,lineNo=30,faultExplanation=The variable StringVariable isn't
> properly initialized.
>
>   


RE: Inline variable initialization in Ode 1.3.2

Posted by Jonathan Coogan <Jo...@Attachmate.com>.
Hi Bill.  Good suggestion.  Even when I echo the inline initialized
variable back to the response it does not work.  I created a simpler
example that uses an initialized variable of type string.  When I assign
to to the response I get an AssignmentFault saying that the variable is
uninitialized.

---------- Begin TestInlineInitialization2.wsdl ---------- 
<?xml version="1.0"?>
<definitions name="TestInlineInitialization2"
        targetNamespace="mynamespace"
        xmlns:tns="mynamespace"
        xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        >

    <types>
        <schema attributeFormDefault="unqualified"
elementFormDefault="qualified" 
                targetNamespace="mynamespace" 
                xmlns="http://www.w3.org/2001/XMLSchema">

            <element name="Input" type="string" />
            <element name="Output" type="string" />
        </schema>
    </types>

    <message name="InputMessage">
        <part name="payload" element="tns:Input"/>
    </message>
    <message name="OutputMessage">
        <part name="payload" element="tns:Output"/>
    </message>

    <portType name="ServicePortType">
        <operation name="process">
            <input  message="tns:InputMessage" />
            <output message="tns:OutputMessage"/>
        </operation>
    </portType>
     
    <plnk:partnerLinkType name="ServicePartnerLinkType">
        <plnk:role name="ServiceProvider"
portType="tns:ServicePortType"/>
    </plnk:partnerLinkType>
    
    <binding name="ServiceBinding" type="tns:ServicePortType">
      <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
      <operation name="process">
        <soap:operation soapAction="mynamespace/process" />
        <input>
          <soap:body use="literal" />
        </input>
        <output>
          <soap:body use="literal" />
        </output>
      </operation>
    </binding>
    
    <service name="TestInlineInitialization2Service">
        <port name="TestInlineInitialization2Port"
binding="tns:ServiceBinding">
          <soap:address
location="http://[server]:[port]/processes/TestInlineInitialization2" />
        </port>
    </service>
</definitions>
---------- End TestInlineInitialization2.wsdl ----------


---------- Begin TestInlineInitialization2.bpel ----------
<?xml version="1.0" encoding="UTF-8"?>
<bpel:process exitOnStandardFault="yes"
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    name="TestInlineInitialization2"
    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    suppressJoinFailure="yes" targetNamespace="mynamespace"
 
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
 
xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:ode="http://www.apache.org/ode/type/extension"
    xmlns:tns="mynamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
        location="TestInlineInitialization2.wsdl"
namespace="mynamespace"/>
    <bpel:partnerLinks>
        <bpel:partnerLink myRole="ServiceProvider" name="client"
partnerLinkType="tns:ServicePartnerLinkType"/>
    </bpel:partnerLinks>
    <bpel:variables>
        <bpel:variable messageType="tns:InputMessage" name="input"/>
        <bpel:variable messageType="tns:OutputMessage" name="output"/>
        <bpel:variable name="StringVariable" type="xs:string">
          <bpel:from>
            <bpel:literal>Value</bpel:literal>
          </bpel:from>
        </bpel:variable>
    </bpel:variables>
    <bpel:sequence name="process">
        <bpel:receive createInstance="yes" name="ReceiveInput"
            operation="process" partnerLink="client"
            portType="tns:ServicePortType" variable="input"/>
        <bpel:assign name="Assign" validate="no">
            <bpel:copy>
                <bpel:from variable="StringVariable"/>
                <bpel:to part="payload" variable="output"/>
            </bpel:copy>
        </bpel:assign>
        <bpel:reply name="ReplyWithOutput" operation="process"
            partnerLink="client" portType="tns:ServicePortType"
variable="output"/>
    </bpel:sequence>
</bpel:process>
---------- Begin TestInlineInitialization2.bpel ----------

Here is the fault I get:

INFO  [ASSIGN]: Assignment Fault:
{http://docs.oasis-open.org/wsbpel/2.0/process/executable}uninitializedV
ariable,lineNo=30,faultExplanation=The variable StringVariable isn't
properly initialized.

-----Original Message-----
From: Bill McCusker [mailto:wmccusker@parasoft.com] 
Sent: Wednesday, July 08, 2009 2:45 PM
To: user@ode.apache.org
Subject: Re: Inline variable initialization in Ode 1.3.2

Hi Jonathan,

    The inline initialization looks fine in regard to the spec. A
selectionFailure could also come from a problem with the query used in
the assign. If you just echo the inline initialized variable back to the
response does the expected structure get returned? If so then the
problem is the query used in the assign.

Bill McCusker

Jonathan Coogan wrote:
> Hello again.  I have a question about using the inline from-spec for 
> variable initialization 
> (http://cwiki.apache.org/confluence/display/ODExSITE/WS-BPEL+2.0+Speci
> fi
> cation+Compliance#WS-BPEL2.0SpecificationCompliance-Initialization).
>  
> It's not working for me and I was hoping someone could tell me if I'm 
> doing something wrong.  Here is a very simple example in which I try 
> to assign data to and from a variable that has an inline initializer.

> I get a selectionFailure at runtime.
>  
>
>   


Re: Inline variable initialization in Ode 1.3.2

Posted by Bill McCusker <wm...@parasoft.com>.
Hi Jonathan,

    The inline initialization looks fine in regard to the spec. A 
selectionFailure could also come from a problem with the query used in 
the assign. If you just echo the inline initialized variable back to the 
response does the expected structure get returned? If so then the 
problem is the query used in the assign.

Bill McCusker

Jonathan Coogan wrote:
> Hello again.  I have a question about using the inline from-spec for
> variable initialization
> (http://cwiki.apache.org/confluence/display/ODExSITE/WS-BPEL+2.0+Specifi
> cation+Compliance#WS-BPEL2.0SpecificationCompliance-Initialization).
>  
> It's not working for me and I was hoping someone could tell me if I'm
> doing something wrong.  Here is a very simple example in which I try to
> assign data to and from a variable that has an inline initializer.  I
> get a selectionFailure at runtime.
>  
>
>