Chris,

That element ties to CallSimpleMethod.java. If you look in there, you'll see that there is possibly lots of changes necessary to achieve private scope.

Compare that with CallService.java. Think about the shortfall in 
CallSimpleMethod.java in comparison.

Question to ask: Is it easier to enhance CallService.java for private scoped simple-method calls, or is it easier to enhance CallSimpleMethod.java?

Bear in mind that a private scope (like a proper Java method, PHP method, any method that is NOT a mere macro) is useless unless we can get return values from it.

Jonathon

Chris Howe wrote:
This would probably be easiest to use as an attribute of
<call-simple-method/> e.g. <call-simple-method scope="true"/>
--- Jonathon -- Improov <[EMAIL PROTECTED]> wrote:

David,

I've created in Minilang an element <call-simple-method-scoped> that
very closely mimics <call-service>. In fact, CallSimpleMethodScoped.java is very similar
to CallService.java.

The change is purely additive.

Is that advisable?

Jonathon

Jonathon -- Improov wrote:
David,

Ok, thanks. I'll do something about this, then let you guys decide
how
to phrase it on Jira and possibly commit it if you'd like.

Jonathon

David E Jones wrote:
It would have to be an option specified in an attribute or
something.
Most of the code that uses this expects it to be an in-line call
and
share the same scope, basically running as if the code were
inserted
where the call-simple-method tag is.

Changing the default behavior would break a lot of stuff, so we
won't
be doing that. Adding an option to run in a separate scope is fine
(the MapStack in OFBiz used by the Screen Widget and other things
is
helpful for this).

-David


Jonathon -- Improov wrote:
Does <call-simple-method> call a simple-method that has private
scope
and local variables? I gather not.

If not, is it alright to do so? I don't mind submitting the code
for
this.

Yes, I understand that services are the right way to go. But if
it's
not too much trouble, do we mind adding private scope and local variables to simple-methods called via <call-simple-method>? Any repercussions?

Jonathon






Reply via email to