How to use contains operation in Object Store Mule 4

What is Contains operation in Object Store?




Contains operation in Object Store is used to check if there is any value that exists in the given key. The result of Contains operation is a boolean value that is either true or false.

We can use this operation to perform a conditional check in the middle of the flow

Object Store Contains operation configuration in Mule 4 flow


1. Store a value using the Store operation


Can we access the variables created before Scatter gather after the routes




2. Add the contains component of object store to test if there is any value present.


2a. To do that specify the key value as below



 

2b. Also mention the target variable (if required) with a name to store the result

Postman Test Results for Object Store Sample Mule 4 Application


Store Flow: key is stored in Object Store




Contains Flow: key is present in the Object store. So, true is returned in the response



Also read: Object store connector in Mule 4 with a simple example


 

Post a Comment

0 Comments