Most of the time i use to get question on "How to compare the values of the property in WSO2 EBS" from most of the wso2 ESB users. WSO2 ESB give a adequate support for value comparison for properties.
I have created simple configuration to demonstrate that functionality.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<property name="propertyA" value="'abc'"/> | |
<log level="custom"> | |
<property name="propertyA" expression="get-property('propertyA')"/> | |
</log> | |
<property name="propertyB" value="'abc'"/> | |
<log level="custom"> | |
<property name="propertyB" expression="get-property('propertyB')"/> | |
</log> | |
<property name="propertyCompare" expression="get-property('propertyA') = get-property('propertyB')"/> | |
<log level="custom"> | |
<property name="propertyCompare" expression="get-property('propertyCompare')"/> | |
</log> | |
<filter source="get-property('propertyCompare')" regex="true"> | |
<then> | |
<log level="custom"> | |
<property name="filterA" expression="'worked'"/> | |
</log> | |
</then> | |
</filter> | |
<filter xpath="get-property('propertyA') = get-property('propertyB')"> | |
<then> | |
<log level="custom"> | |
<property name="filterB" expression="'worked'"/> | |
</log> | |
</then> | |
</filter> |