ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Kearns" <dan.kea...@gmail.com>
Subject Re: Easy BPEL aka BPEL4Coders aka BPEL4Hackers
Date Tue, 06 Nov 2007 17:17:52 GMT
On 11/5/07, Matthieu Riou <matthieu@offthelip.org> wrote:

> So any opinion on both proposals? What are the parts that you like better?
> Tammo, did you have a look at AAM?


I think the almost-javascript aspect is going to be really confusing - where
can I put a javascript expression? where not?

Is there any reason not to attempt to have a process just be a totally valid
javascript? Using e4x would save having to create new xml-isms, and the
whole thing would also have the potential side-benefit that it could be
implemented inside a browser. Imagine a google gears app with embedded
Ode...  that would rock!

Plus, there could be the added irony of combining e4x with json. There could
be a couple of preordained object-literal constructs, and a way to bless
those things into actual processes, scopes, partners, etc. Some logic chunks
normally handled in bpel might get delegated to javascript, but that doesn't
seem like a big problem.

Random syntax examples:

default xml namespace = "urn:my:process";
var scope = {
   Sequence: { ... }, // or Flow, etc
   onEvent: function(e) { ...},
   onFault: function(f) { ...}
};

With e4x, PortTypes and references could be literals if needed:

var epr = <EndpointReference><Address>http://foo/bar
</Address></EndpointReference>;
var pt = new QName(x, y);
var counter_pl = { PortType: pt , Epr: epr} ;

Slight modification of one of the examples:

var ExternalCounter = new Process({
  onReceive: function(my_pl, start_op, msg_in) {
    var resp = <root><count>0</count></root>;
    while(resp.root.count < 10) {
      invoke( {
         Link: counter_pl,
         Operation: partner_start_op,
         Message: <counter>{resp.root.count}</counter>,
         onReply: function(reply) { resp.root.count += reply.counter; }
         onFault: function(fault) { ... };
      } );
    }
    reply(resp);
  }
});

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