I am not able to read value of key that is stored in Object Store from App1.
I have 2 application, App1 which stores the value of variable (say 'name,) to some value (say 'abc'). From App2, I wanted to retrieve the value of the key ('name' in our case), but it always fails with the org.mule.api.store.ObjectDoesNotExistException.
If both of the flow is on the same app, it works, but this is not the expected behaviour.
Both the applications are running on the same runtime, hence it should be able to retrieve the value.
Below is my code for App1
<flow name="objectstore1Flow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/retrieve" allowedMethods="GET" doc:name="HTTP"/>
<set-variable value="abc" variableName="name" doc:name="Variable" />
<objectstore:store config-ref="ObjectStore__Connector" key="name" value-ref="#[flowVars.name]" doc:name="ObjectStore" />
</flow>
Code for App2
<flow name="objectstore2Flow">
<http:listener config-ref="gcc-httpDomainListenerConfig" path="/store2" allowedMethods="GET" doc:name="HTTP"/>
<objectstore:retrieve config-ref="ObjectStore__Connector" key="name" doc:name="ObjectStore" targetScope="INVOCATION"/>
<logger message="Value of name from cache is : #[payload]" level="INFO" doc:name="Logger"/>
</flow>
Object Store configuration for both the application is :
<objectstore:config name="ObjectStore__Connector" partition="name_value" doc:name="ObjectStore: Connector"/>
Can some one guide me, where I am going wrong ?