I’m assuming you’re just trying to get the DataSet to work for testing - 
correct? (DataSet isn’t really meant for anything other than testing).

If that’s the case, use the DataSet as the Consumer  - i.e. 
from(“dataset://source”) and you should be OK.


> On Oct 27, 2016, at 7:15 AM, Edoardo Causarano <edoardo.causar...@gmail.com> 
> wrote:
> 
> Hi,
> 
> answers inline:
> 
>> On 27 Oct 2016, at 14:50, Brad Johnson <brad.john...@mediadriver.com> wrote:
>> 
>> Try putting in .log(${body}) in between each of the lines and see what you
>> get. It appears you are using the SimpleDataSet which takes a single
>> String.  What behavior are you expecting from ti?  Is it throwing an
>> exception?  Have you tried sending in a List<String> with a ListDataSet to
>> see what behavior it gives you?
> 
> I’m expecting the SimpleDataSet to provide 1 message body consisting of a 
> List<DbxEntry> (a list of items from a DropBox query.)
> It’s throwing when trying to assert that the body correspond to the data 
> provided by the direct producer template (I only figured that out after step 
> debugging, is this the intended behavior?) 
> 
>> Is there a specific reason you are using a .pipeline() call explicitly?  I
>> believe that's the default behavior.  The only reason I can think of
>> explicitly using it is when you just want to use it as a short hand for
>> routing as shown in the Camel documentation. You don't have to chain a
>> bunch of to() method calls then.
> 
> Because I’d like to broadcast a timer trigger to a couple pipelines 
> consisting of remote API getters and transformers. Otherwise all stages - 
> including the transformers - would be directly wired to the timer and that 
> would make no sense. 
> 
> timer -->  pipeline(dropbox, transformer) --> doStuff
>        |->  pipeline(google, transformer)   --|   
> 
> 
> Best,
> Edoardo
> 
>> from("direct:a").pipeline("direct:x", "direct:y", "direct:z",
>> "mock:result");
>> 
>> On Thu, Oct 27, 2016 at 7:03 AM, Edoardo Causarano <
>> edoardo.causar...@gmail.com> wrote:
>> 
>>> Hi all,
>>> 
>>> I’m trying to do something relatively simple, yet it’s been eluding me for
>>> hours already!
>>> 
>>> I’d like to have a timer trigger a broadcast to a couple pipelines to
>>> invoke a remote cloud component, transform the responses to a common type
>>> and merge the results in one homogenous list to further process.
>>> 
>>> It’s been a nightmare so far and even testing is proving to be nigh
>>> impossible, even this simple setup is failing with a :
>>> 
>>> @Override
>>> protected RouteBuilder createRouteBuilder() {
>>>   return new RouteBuilder() {
>>>       @Override
>>>       public void configure() throws Exception {
>>>           from("direct:start").pipeline()
>>>                   .to("dataset:source")
>>>                   .to("dropBoxTranslator")
>>>                   .end()
>>>               .to("mock:result");
>>>       }
>>>   };
>>> }
>>> 
>>> Seems that the dataset endpoint tries to assert that its’ own output equal
>>> the dummy string I sent from the direct:start producer to execute an
>>> exchange (in 
>>> org.apache.camel.component.dataset.DataSetSupport#assertMessageExpected).
>>> What on earth is going on?!
>>> 
>>> 
>>> Best,
>>> Edoardo
> 

Reply via email to