Hi John, Inside the Iterate mediator, use a <send> mediator, then use the <aggregate> mediator in the OutSequence. For reference, please see this iterate/aggregate sample (1) or the EIP guide here (2). In the EIP example, a clone mediator is used instead of iterate, but the aggregate functions in the same way.
(1) http://susinda.blogspot.com/2015/02/wso2-esb-iterateaggregate-sample.html (2) https://docs.wso2.com/display/IntegrationPatterns/Aggregator Thanks, Colin Roy-Ehri Software Engineer *WSO2, Inc. : wso2.com <http://wso2.com/>* *Mobile* : 812-219-6517 On Wed, Sep 16, 2015 at 1:15 PM, John Q <[email protected]> wrote: > Colin, thanks for your answer, actually I am using the iterate mediator, > the problem is that I want to receive the original message, iterate over > all the items calling the service for each one and finally call another > service onlye once, but the service is invoked many times. > > this is what I have now: > > <iterate> > <target> > here I call the service for the item... > </target> > </iterate> > here I call the service to notify > > the notify service is been invoked per each item... > > On Wed, Sep 16, 2015 at 1:11 PM, Colin Roy-Ehri <[email protected]> wrote: > >> Hi John Q, >> >> The aggregate mediator is used for exactly this purpose (1). >> >> (1) https://docs.wso2.com/display/ESB481/Aggregate+Mediator >> >> Thanks, >> Colin Roy-Ehri >> Software Engineer >> *WSO2, Inc. : wso2.com <http://wso2.com/>* >> *Mobile* : 812-219-6517 >> >> On Wed, Sep 16, 2015 at 12:56 PM, John Q <[email protected]> wrote: >> >>> Hello, I´m beginner and I need some help with the ESB. >>> >>> This is my situation: >>> >>> I will receive a message with many items, I need to iterate the items >>> list and call a service for creating each item. At the end of all of the >>> calls, I need to call another service to notify the end of items creation. >>> >>> how can I do it? I have used the iterate mediator and I have iterated >>> the items well, but I don´t know how to wait until the last item is created >>> and call the notify service only once. I have called the notify service >>> outside the iterator mediator, but it is invoked once per each item >>> iterated. >>> >>> can any body give me a clue? >>> >>> best regards... >>> >>> _______________________________________________ >>> Architecture mailing list >>> [email protected] >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>> >>> >> >
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
