On Sun, Feb 8, 2009 at 12:22 PM, Madars Vitolins <[email protected]> wrote:
> Hello! > What is current Ode status with inline variable initialization? Does > someone works on it or maybe it is finished? From Jira seems it is open > and unassigned ( http://issues.apache.org/jira/browse/ODE-236 ) It's filed in Jira and in our compliance page but nobody so far has volunteered to implement it. > > Can I take over it? Sure, that'd be pretty cool :) > And guys can you point out me what directions I > should do research? Would it affect BPEL compiler? It would definitely affect the compiler. You'll probably have to modify some runtime classes too but I don't foresee anything that would break backward compatibility. Although we'll have to keep an eye on it. > > I see possible way that compiler would generate extra object model > for > variable initialization in places where execution is performed - in > processes or scopes. For <sequence> activities that would be extra code > in the start of element. For other activities it would require to > generate extra "<sequence>" to moderate variable initialization and > other activities. What do you think? Is this right way? > Depends what you mean :) So I don't think we can implement this strictly as syntax sugar (only in the compiler, without modifying any OModel (the O* classes) or runtime classes). When a process starts, it's whole container chain starts but there's no way to stick activities before that. So the initialization will have to be done in the scope the variable is in and we can't really try to have the compiler generate an assignment before. My expectations would be that you'll have to modify OScope.Variable to add the from-spec (reusing the ones in OAssign probably) and the compiler to set that. Then at runtime, you'll have to alter SCOPE to set the variables when it gets instantiated. Hope that helps. Cheers, Matthieu > > Thanks a lot in advance, > Madars > >
