Yes this is similar to what I suggested. The task via MessageInjector calls a
URL that is
actually  Synapse Proxy - to initiate the task. This is cleaner than the
filter.

What I mean by strange is that Synapse is all about scripting and using
sequences... Then to do a task we go low level and basically call Quartz.
Why not just have an external Web service using Quartz call Synapse.

I would expect Synapse to have tasking based aorund higher level concepts
like a sequence or proxy. For example a file dump is an event that triggers
a VFS:File proxy. Why not a timer event that triggers either a sequence
or a proxy too. Calling Java is an ugly approach that means we have to
create 
hacks to get what we want.



Andreas Veithen-2 wrote:
> 
> The message injector indeed doesn't allow you to specify the sequence
> to execute. However Paul once described [1] a pattern that can be used
> to get around this limitation.
> 
> [1] http://markmail.org/thread/kfqxxqwrjwzohglm
> 
> On Mon, Mar 9, 2009 at 03:54, kimhorn <[email protected]> wrote:
>>
>> Seems strange that a task calls a Java class. Would it not be better for
>> it
>> to
>> start a <sequence>.
>>
>> I want to call two web services in a chain that also require a java call,
>> every 20 minutes.
>> A task is the solution for the timing bit. I want to start a complex
>> sequence.
>>
>> Part of the sequecne calls a Java class that adds BASIC auth info
>> (username
>> and password) to TRANSAPORT.
>>
>> With a task I can't call two Java classes, one to inject Message and one
>> to
>> add AUTH.
>>
>> I could to edit the Message Injector class to also add in the BASIC auth
>> headers.
>> So create a new injector with basic auth properties too. This also is a
>> very
>> poor solution.
>>
>> At the moment I am using the task message injector to call a Synapse
>> proxy
>> that runs
>> my sequence; as a named proxy. This sequence builds the message payload
>> and
>> calls the Java to add
>> BASIC Auth headers. This seems a round about and indirect  way to solve
>> the
>> problem.
>>
>> As I can embed a java class in a sequence, having a task call a sequence
>> would
>> be a more general solution than having it just call a java class.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tasks-are-strange.-tp22406367p22406367.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tasks-are-strange.-tp22406367p22424956.html
Sent from the Synapse - User mailing list archive at Nabble.com.

Reply via email to