Harm Verhagen wrote: > I've a question regarding esb tasks. > > I found an excellent example how to create a Task in [1] > Question: how can one configure in which sequence a Task injected > messages is processed ? Hi Harm,
This article is about writing your own custom task. You could write your own custom task to implement this sort of an injection. If you use the MessageInjectorTask shipped by default, it just injects the messages into the main sequence. You could write a new task with a String parameter specifying the sequence to which the message needs to be injected and write the getter and setters properly so that you can configure the injection sequence at runtime. If you are looking for the code to do this, you could use the following method in the Task#execute() method, of course you need to store the SynapseEnvironment inside the task implementation at the initialization. SynapseEnvironment#injectAsync(MessageContext smc, SequenceMediator seq) You could use the SynapseConfiguration#getSequence(String key) method to retrieve a sequence to be passed into the above method. Is this what you wanted to know? Thanks, Ruwan > > Regards, > Harm > > [1] http://wso2.org/library/2900 > ------------------------------------------------------------------------ > > _______________________________________________ > Esb-java-user mailing list > [email protected] > https://wso2.org/cgi-bin/mailman/listinfo/esb-java-user > -- Ruwan Linton Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb WSO2 Inc.; http://wso2.org email: [email protected]; cell: +94 77 341 3097 blog: http://ruwansblog.blogspot.com _______________________________________________ Esb-java-user mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-user
