A bit hard to tell but why don't you put a .log() statement before the
.aggregate and see how your body and headers look? Do you get a header with
aggregationId?

On Wed, Jan 25, 2017 at 8:51 PM, catequil [via Camel] <
ml-node+s465427n5793058...@n5.nabble.com> wrote:

> *Camel route not getting to aggregation and bean in certain cases.*
> Below is my camel route.  When the route encounters a SoapFault the route
> works great.  However, in the case of success from the soap call the route
> never gets to the aggregation and bean calls marked <==== below.  I would
> expect that the call to "direct:processDeviceUsageSoapCall" would
> eventually get an exchange body from the DeviceUsageHistoryPostProcessor.
> Is this not the expected result?  What am I doing wrong?
>
> from("direct:processDeviceUsageJob").routeId("processDeviceUsageJob")
>               .process(new DeviceUsageEndOfCycleProcessor()) //Sets the 
> exchange body to List<Devices>
>               .to("direct:processDeviceUsageAggregation");
>
> from("direct:processDeviceUsageAggregation")
>               .split(body()) //Splits Devices from the list
>               .doTry()
>               .to("direct:processDeviceUsageSoapCall") //Each Device goes to 
> be queried for usage
>               .doCatch(SoapFault.class,
>                               UnknownHostException.class,
>                               ConnectException.class,
>                               SocketTimeoutException.class,
>                               NoRouteToHostException.class)
>               .process(new BatchExceptionProcessor())
>               .endDoTry()
>                 //Aggregation strategy combines totalUsage into one value
>               .aggregate(header("aggregationId"), new 
> TotalUsageAggregationStrategy())  <=========
>               .completionTimeout(30000)
>                 //Saves totalUsage tot he database
>               .bean(iSchedulerService, "saveDeviceUsageHistory")              
>                    <=========
>               
> .log("*************************Done*****************************");
>
>
> from("direct:processDeviceUsageSoapCall")
>               .process(new DeviceUsageHistoryPreProcessor(env))    //Prepares 
> SOAP request
>               .to(IEndPoints.URI_SOAP_DEVICE_USAGE_ENDPOINT) //Queries Soap 
> Endpoint
>               .process(new DeviceUsageHistoryPostProcessor());      
> //Receives SOAP response
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Camel-route-not-getting-
> to-aggregation-and-bean-in-certain-cases-tp5793058.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-not-getting-to-aggregation-and-bean-in-certain-cases-tp5793058p5793059.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to