Search code examples
wso2vfswso2-esb

How can I change vfs FileURI dynamically in WSO2 ESB?


I have this parameter with a path file:

<parameter name="transport.vfs.FileURI">file:///Users/Desktop/test/in</parameter>

I need to change FileURI value dynamically, for example, using the value of a property that was set before. Something like that:

<parameter name="transport.vfs.FileURI">get-property('path')</parameter>

Or that:

<parameter name="transport.vfs.FileURI" expression="get-property('path')"/>

How can I change the FileURI value for a property value?


Solution

  • As far as I know, with ESB 4.8.1, you can't change dynamically this parameter inside the mediation (this value is static).

    Perhaps coul'd you try to dynamically change this proxy definition at runtime :

    • using admin services (ProxyServiceAdmin)
    • or in java or javascript (with mc.getConfiguration(), you can access to synapse config)

    An other solution would be to use a scheduled task :