Hi,

Thank you for this information. It will be added to the docs. I will reply
once that is done.

Best Regards,
Rukshani.

On Thu, Jul 2, 2015 at 9:53 PM, Amal Gunatilake <[email protected]> wrote:

> 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 <[email protected]> wrote:
>
>>
>>
>> On Thu, Jul 2, 2015 at 6:02 PM, Amal Gunatilake <[email protected]> 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
>



-- 
Rukshani Weerasinha

WSO2 Inc.
Web:http://wso2.com
Mobile: 0777 683 738
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to