This is a very useful improvement. If a sequence is not defined in the configuration, we can inject the message to the main sequence.
On Wed, Oct 3, 2012 at 4:33 PM, Miyuru Wanninayaka <[email protected]>wrote: > Hi all, > > Current synapse message injector task is not that user friendly. > Main reason is, it always injects messages to main sequence and user has > to add filter/switch to main sequence to route it to proper sequences. This > will become ugly with increasing number of tasks instances. > > I'm thinking about improving it by adding support to define a target > sequence, so task will directly inject message to sequence. > Also I feel that mandating parameters message, soap action and To is not > correct because user can define those using mediators later inside > sequences. In most use cases, users will put dummy values in task > configuration and overwrite later in a sequence. > > <task class="org.apache.synapse.startup.tasks.MessageInjector" > name="Task1"> > <property name="sequence" value="sequence1"/> <!--optional--> > <property name="to" > value="http://localhost:9000/services/SimpleStockQuoteService"/> > <!--optional--> > <property name="soapAction" value="urn:getQuote"/> <!--optional--> > <property name="message"> <!--optional--> > <m0:getQuote xmlns:m0="http://services.samples"> > <m0:request> > <m0:symbol>IBM</m0:symbol> > </m0:request> > </m0:getQuote> > </property> > <trigger interval="5"/> > </task> > > > Change will not break existing task implementation but will enable it to > use in a flexible way. > > WDYT? > > -- > Miyuru Wanninayaka > Senior Software Engineer - WSO2 Inc <http://wso2.com/>. > -- *Isuru Udana* * * * Software Engineer; WSO2 Inc.; http://wso2.com email: [email protected] blog: http://mytecheye.blogspot.com/ twitter: http://twitter.com/isudana *
