The same can be done with switch mediator, but then once we add a new
sequence we need to update the existing code (switch mediator) by adding a
new case.
With the proposed idea we can add any number of dynamic sequences without
updating the existing code. :)

On Thu, Jul 2, 2015 at 6:17 PM, Amal Gunatilake <am...@wso2.com> wrote:

>
>
> On Thu, Jul 2, 2015 at 6:02 PM, Amal Gunatilake <am...@wso2.com> wrote:
>
>> Hi Team,
>>
>> I think it's better to add the following configuration on "*How to
>> switch between sequence using property*" to the sequence mediator
>> documentation.
>>
>> There was a requirement to switch between sequences based on a message
>> header parameter when there is a *WS chaining*. (I have attached the
>> diagram which related to initial requirement for better understanding)
>>
>> This can be done with following approach.
>>
>> *Set the custom header in the message*
>>
>> <!-- Remember to set the sequence name as it is, when setting the 
>> destination value -->
>> <header xmlns:ns="http://example.com/esb/destination"; name="ns:destination" 
>> scope="default" value="sequence1"/>
>>
>>
>> *How to extract the property and dynamically switch the sequence*
>>
>> <property xmlns:ns="http://example.com/esb/destination"; name="DESTINATION" 
>> expression="//ns:destination"/><sequence 
>> key="{get-property('DESTINATION')}"/>
>>
>> Since this is a already available functionality, I think we can add this
>> valuable information to the WSO2 ESB documentation. WDYT?
>>
>> Best regards,
>> Amal.
>>
>>
>> --
>> *Amal Gunatilake*
>>  Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
> *Amal Gunatilake*
>  Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>



-- 
*Amal Gunatilake*
 Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to