You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by Madars Vitolins <m...@silodev.eu> on 2009/03/30 07:10:43 UTC

Full message variable initialization from Literal

Hello!

Is it possible to initialize message type variable fully using literal
with out specifying to-part?

<assing>
	<copy>
		<from>
			<literal>
				...
			</literal>
		</from>
		<to variable="msgVar1">
	</copy>
</assing>

For assing/copy that is not problem, but how with inline variable
initialization? Should such way be supported?

Thanks,
Madars


Re: Full message variable initialization from Literal

Posted by Matthieu Riou <ma...@gmail.com>.
On Mon, Mar 30, 2009 at 1:08 PM, Madars Vitolins <m...@silodev.eu> wrote:

> I am working on support for inline variable initialization :)
> Seems something works, I will have to do some more testing and figure
> out the error handling.
>
>
> I have also tried to initialize full message type variable, for example:
> <variables>
>  <variable name="getNameDayVar" messageType="day:getNameDay" >
>       <from>
>                <literal>
>                        <message><parameters xmlns="">
>                                <day:getNameDay>
>                                        <arg0>8</arg0>
>                                        <arg1>7</arg1>
>                                </day:getNameDay>
>                        </parameters></message>
>                </literal>
>        </from>
>     </variable>
> </variables>
>
> This way works. Only here is nasty thing with "<message><parameters
> xmlns="">" - they must be together (if not then WS invocation fails - it
> cannot cast, seems because it at some point finds newlines, tabs, etc),
> and that xmlns="" must be such.
>

I'm guessing you need your xmlns="" attribute because otherwise the
parameter element ends up in the BPEL namespace, which seems to be your
default namespace here.

Matthieu


>
>
> What do you think, is this acceptable for full message type variable
> initialization (does standard allows this)?
> If OK, I could try fix that <message><part> thing.
>
> Also for me looks like this construction doesn't work for
> <assign><copy><from /><to /></copy></assign> because of some extra
> validation.
>
>
> Thanks,
> Madars
>
> On Mon, 2009-03-30 at 09:09 -0400, Ford, Mark wrote:
> > ODE doesn't support variable initialization yet. See here:
> http://ode.apache.org/ws-bpel-20-specification-compliance.html
> >
> > The only way to initialize a message variable is through a copy operation
> within an assign activity. You can initialize all of the parts of a message
> at once if you are copying from another message variable of the same message
> type. If you are copying from an expression, literal, or other variable type
> then you need to specify the message part in the to specification.
> >
> > On 3/30/09 1:10 AM, "Madars Vitolins" <m...@silodev.eu> wrote:
> >
> > Hello!
> >
> > Is it possible to initialize message type variable fully using literal
> > with out specifying to-part?
> >
> > <assing>
> >         <copy>
> >                 <from>
> >                         <literal>
> >                                 ...
> >                         </literal>
> >                 </from>
> >                 <to variable="msgVar1">
> >         </copy>
> > </assing>
> >
> > For assing/copy that is not problem, but how with inline variable
> > initialization? Should such way be supported?
> >
> > Thanks,
> > Madars
> >
> >
> >
> >
> >
> > --
> > Mark Ford
> > MIT Lincoln Laboratory
> > 244 Wood Street
> > Lexington MA 02420
> > (781) 981-1843
>
>

Re: Full message variable initialization from Literal

Posted by "Ford, Mark" <ma...@ll.mit.edu>.
The WS-BPEL 2.0 specification doesn't allow for this type of message variable initialization. I should have prefaced my comments below with respect to what the specification permits as opposed to what's possible in ODE. If you build processes with this pattern then there are no guarantees that it'll work on other platforms.

Inline variable initialization is a good feature to add to ODE but supporting element style variables for web service exchanges is more valuable in my opinion. If ODE supports this then you'd never have to deal with message type variables. Of course that assumes that you're interacting with WS-I Basic Profile compliant services.


On 3/30/09 4:08 PM, "Madars Vitolins" <m...@silodev.eu> wrote:

I am working on support for inline variable initialization :)
Seems something works, I will have to do some more testing and figure
out the error handling.


I have also tried to initialize full message type variable, for example:
<variables>
  <variable name="getNameDayVar" messageType="day:getNameDay" >
       <from>
                <literal>
                        <message><parameters xmlns="">
                                <day:getNameDay>
                                        <arg0>8</arg0>
                                        <arg1>7</arg1>
                                </day:getNameDay>
                        </parameters></message>
                </literal>
        </from>
     </variable>
</variables>

This way works. Only here is nasty thing with "<message><parameters
xmlns="">" - they must be together (if not then WS invocation fails - it
cannot cast, seems because it at some point finds newlines, tabs, etc),
and that xmlns="" must be such.


What do you think, is this acceptable for full message type variable
initialization (does standard allows this)?
If OK, I could try fix that <message><part> thing.

Also for me looks like this construction doesn't work for
<assign><copy><from /><to /></copy></assign> because of some extra
validation.


Thanks,
Madars

On Mon, 2009-03-30 at 09:09 -0400, Ford, Mark wrote:
> ODE doesn't support variable initialization yet. See here: http://ode.apache.org/ws-bpel-20-specification-compliance.html
>
> The only way to initialize a message variable is through a copy operation within an assign activity. You can initialize all of the parts of a message at once if you are copying from another message variable of the same message type. If you are copying from an expression, literal, or other variable type then you need to specify the message part in the to specification.
>
> On 3/30/09 1:10 AM, "Madars Vitolins" <m...@silodev.eu> wrote:
>
> Hello!
>
> Is it possible to initialize message type variable fully using literal
> with out specifying to-part?
>
> <assing>
>         <copy>
>                 <from>
>                         <literal>
>                                 ...
>                         </literal>
>                 </from>
>                 <to variable="msgVar1">
>         </copy>
> </assing>
>
> For assing/copy that is not problem, but how with inline variable
> initialization? Should such way be supported?
>
> Thanks,
> Madars
>
>
>
>
>
> --
> Mark Ford
> MIT Lincoln Laboratory
> 244 Wood Street
> Lexington MA 02420
> (781) 981-1843





--
Mark Ford
MIT Lincoln Laboratory
244 Wood Street
Lexington MA 02420
(781) 981-1843

Re: Full message variable initialization from Literal

Posted by Madars Vitolins <m...@silodev.eu>.
I am working on support for inline variable initialization :)
Seems something works, I will have to do some more testing and figure
out the error handling.


I have also tried to initialize full message type variable, for example:
<variables>
  <variable name="getNameDayVar" messageType="day:getNameDay" >
       <from>
                <literal>
                        <message><parameters xmlns="">
                                <day:getNameDay>
                                        <arg0>8</arg0>
                                        <arg1>7</arg1>
                                </day:getNameDay>
                        </parameters></message>
                </literal>
        </from>
     </variable>
</variables>

This way works. Only here is nasty thing with "<message><parameters
xmlns="">" - they must be together (if not then WS invocation fails - it
cannot cast, seems because it at some point finds newlines, tabs, etc),
and that xmlns="" must be such.


What do you think, is this acceptable for full message type variable
initialization (does standard allows this)?
If OK, I could try fix that <message><part> thing.

Also for me looks like this construction doesn't work for
<assign><copy><from /><to /></copy></assign> because of some extra
validation.


Thanks,
Madars

On Mon, 2009-03-30 at 09:09 -0400, Ford, Mark wrote:
> ODE doesn't support variable initialization yet. See here: http://ode.apache.org/ws-bpel-20-specification-compliance.html
> 
> The only way to initialize a message variable is through a copy operation within an assign activity. You can initialize all of the parts of a message at once if you are copying from another message variable of the same message type. If you are copying from an expression, literal, or other variable type then you need to specify the message part in the to specification.
> 
> On 3/30/09 1:10 AM, "Madars Vitolins" <m...@silodev.eu> wrote:
> 
> Hello!
> 
> Is it possible to initialize message type variable fully using literal
> with out specifying to-part?
> 
> <assing>
>         <copy>
>                 <from>
>                         <literal>
>                                 ...
>                         </literal>
>                 </from>
>                 <to variable="msgVar1">
>         </copy>
> </assing>
> 
> For assing/copy that is not problem, but how with inline variable
> initialization? Should such way be supported?
> 
> Thanks,
> Madars
> 
> 
> 
> 
> 
> --
> Mark Ford
> MIT Lincoln Laboratory
> 244 Wood Street
> Lexington MA 02420
> (781) 981-1843


Re: Full message variable initialization from Literal

Posted by "Ford, Mark" <ma...@ll.mit.edu>.
ODE doesn't support variable initialization yet. See here: http://ode.apache.org/ws-bpel-20-specification-compliance.html

The only way to initialize a message variable is through a copy operation within an assign activity. You can initialize all of the parts of a message at once if you are copying from another message variable of the same message type. If you are copying from an expression, literal, or other variable type then you need to specify the message part in the to specification.

On 3/30/09 1:10 AM, "Madars Vitolins" <m...@silodev.eu> wrote:

Hello!

Is it possible to initialize message type variable fully using literal
with out specifying to-part?

<assing>
        <copy>
                <from>
                        <literal>
                                ...
                        </literal>
                </from>
                <to variable="msgVar1">
        </copy>
</assing>

For assing/copy that is not problem, but how with inline variable
initialization? Should such way be supported?

Thanks,
Madars





--
Mark Ford
MIT Lincoln Laboratory
244 Wood Street
Lexington MA 02420
(781) 981-1843