Update LocalEntry content in WSO2 EI 6.6.0

300 Views Asked by At

I have a LocalEntry named: Test with the content below and saved in the local file system.

<test>
   <value1>a</value1>
</test>

I can retrieve the value1 using a property like this:

<property name="value" expression="get-property('Test')/*[local-name()='value1']/text()" type="string" scope="default" />

But, I can not change the content of the LocalEntry file nither via property mediator nor enrich mediator, my enrich configuration is as follows:

<enrich>
    <source clone="true" xpath="$ctx:newValue"/>
    <target xpath="get-property('Test')/*[local-name()='value1']/text()"/>
</enrich>

I had this exact configuration in ESB-5.0.0 and it worked like a charm.

Why I can not do the same in EI-6.6.0? Is there any alternative solution?

1

There are 1 best solutions below

0
tmoasz On

For saving and loading content, you can use registry. Using property mediator to read and write. There is some downside, that wso2 cache that is read for 15sec. When that is a problem, you cane use more "nasty" method using script mediator. I have described it much more with an example, along with this encountered problem here