Flowable -> camel -> flowable problem


I have some camel-routes invoked from flowable as camelTask. (flowable:type=“camel”).

One camel Routeconfig is like this (pseudo-camel-code):



.to(“log: before aggregate”)
.to(“log: after aggregate”)

Problem is, that flowable workflow continues after the first route was invoked.
The input message came, route is invoced, file was written, aggregateStragegy is called.
But is continues in flowable! “before aggregate” was called, but not “after aggregate”. As expected. But flowable continues. Although aggregations was not complete.

How can I prevent this.

Maybe my approched to implement a quasi synchrounos file-IO to another system that way is wrong. Than we can discuss that in a secondary thread. But question remains, how can I end a camelTask.
So that the workflow ends here.

Regards Thomas