Posted by
David E. Jones on
Mar 10, 2006; 11:33pm
URL: http://ofbiz.116.s1.nabble.com/Dev-how-to-pass-parameters-between-services-in-SECAs-tp167141p167144.html
On Mar 10, 2006, at 3:58 PM, Alexandre Gomes wrote:
> You mean all the output attributes must equal all the input or
> just the ones that I need?
Just the ones you need/want.
> Also, can I use the auto-attributes tag or do I have to
> explicitly declare the attribute with the attreibute tag?
It doesn't matter. As long as the attribute is declared it will take it.
> You mean I can catch it on the parameters map on the next service?
Yes, in the incoming parameters Map, which we often call the
"context", as opposed to the outgoing Map which we often call the
"results".
> I think this pattern of using SECA is very good for customizing
> code without touching the architecture. I find it an analog of the
> action/beanshell stuff for the model part of the view-model-
> controller pattern.
> Also you can save your customized SECAs and code on the
> directory of the new application you're developing and not in the
> already existing services and directories.
Yeah, it is a nice pattern and one based on one of the many varieties
of "rule engine" that exist. In fact there are various scholarly
works (and near-scholarly works) on the more general topic, and this
is just an application of these concepts to the service management
tool in OFBiz.
Hopefully some day we'll have more visualization or navigation tools
to make it easier to find services and see how they related so other
services directly or through ECAs or implicitly, or whatever.
Actually, we'd like to do this for everything so you can easily move
around among all of the different OFBiz artifacts (for research as
well as for development).
-David
>
> Alex
>
> On 3/10/06, David E. Jones <
[hidden email]> wrote:
> Right now the only way to do this is design your services such that
> the names for the OUT attributes/parameters match the names for the
> IN attributes in later services in the sequence. For these things the
> Service Engine create a "per-call" context that contains all original
> incoming attributes, and all OUT attributes from services already
> run, and creates the context for each service call in the ECA actions
> from this larger map using the definition of incoming attributes.
>
> -David
>
>
> On Mar 10, 2006, at 9:01 AM, Alexandre Gomes wrote:
>
> > Hi all,
> >
> > I'm trying to couple some services in a chain of SECAs but I can't
> > understand how to pass parameters between services.
> > Can anyone help me on this problem?
> >
> > Thanks,
> >
> > Alexandre Gomes
> >
> > _______________________________________________
> > Dev mailing list
> >
[hidden email]
> >
http://lists.ofbiz.org/mailman/listinfo/dev>
>
> _______________________________________________
> Dev mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/dev>
>
> _______________________________________________
> Dev mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/dev
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev