ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject [SimPEL] Adding with
Date Wed, 19 Dec 2007 18:14:09 GMT

Doing some test processes with SimPEL I realized that our assignment was
still pretty basic which leaded to painfully long statements because of the
hierarchical nature of XML. Things like:

customer.payload.ns::customer.ns::firstname =
customer.payload.ns::customer.ns::lastname =
customer.payload.ns::customer.ns::address.ns::city =
customer.payload.ns::customer.ns::address.ns::zipcode =

And in the real world those structures usually contain more than 4 elements
:) So to DRY the thing a bit:

with(c = customer.payload.ns::customer, v = visitor.payload.ns::customer) {
  c.ns::firstname = v.ns::fname;
  c.ns::lastname = v.ns::lname;
  with (ca = c.ns::address, va = v.ns::address) {
     ca.ns::city = va::ns.city;
     ca.ns::zipcode = va.ns::zip;

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.

So the would get translated to a BPEL equivalent to:


  (same for visitor.payload but the if body wouldn't execute as it's the
source structure in this example)

  (blah blah blah)

What do you think? Looks good?


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