ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject Re: [SimPEL] Adding with
Date Wed, 19 Dec 2007 20:08:50 GMT
On Dec 19, 2007 11:45 AM, Assaf Arkin <arkin@intalio.com> wrote:

> On 12/19/07, Matthieu Riou <matthieu@offthelip.org> wrote:
> >
> > Here c, v, ca and va are actually aliases to the original path. I'd also
> > propose (optional) that a non-existent path used in *with* gets created
> if
> > it doesn't exist when a *with* relies on it. So in my previous example
> if
> > customer.payload.ns::customer doesn't exist, we create this XML
> structure
> > and set it on customer.
>
>
> If you meant for it to exist, it would be there.  If you didn't mean for
> it
> to exist, then I would expect it to fail.  The idea of data created
> magically is too much black magic for me.
>

I agree. And still think this is needed. The selection failures on
initialized variables is the single most encountered problem in the ODE user
mailing list. And I don't even count those who tried their first process to
get a feeling of it, got their first selection failure and then went to
something else without bothering abut subscribing to the mailing-list.

I just *know* that people will write stuff like the following snippet
without having initialized the customer structure.

  customer.payload.ns::customer.ns::firstname =
visitor.payload.ns::customer.ns::fname;

Now maybe that should be part of something else and not included in *with*.
I just don't know what that something else should be.

Matthieu


> Assaf
>
>
> So the would get translated to a BPEL equivalent to:
> >
> > <if>
> >   <condition>!exists(customer.payload.ns::customer)</condition>
> >   <assign>
> >     <from><literal><ns:customer></ns:customer></literal></from>
> >     <to>$customer.payload</to>
> >   </assign>
> > </if>
> >
> >   (same for visitor.payload but the if body wouldn't execute as it's the
> > source structure in this example)
> >
> > <assign>
> >   <copy>
> >     <from>$visitor.payload/ns:customer/ns::fname</from>
> >     <to>$customer.payload/ns:customer/ns::firstname</to>
> >   </copy>
> >   <copy>
> >     <from>$visitor.payload/ns:customer/ns::lname</from>
> >     <to>$customer.payload/ns:customer/ns::lastname</to>
> >   </copy>
> >   (blah blah blah)
> > </assign>
> >
> > What do you think? Looks good?
> >
> > Matthieu
> >
>
>
>
> --
> CTO, Intalio
> http://www.intalio.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message