Hi Thivya,
Did you try as below. IMO this should work.
<property name="propertyCompare" expression="get-property('USER_NAME') =
get-property('PATIENT_ID')" scope="default" type="BOOLEAN"/>
<switch source="get-property('propertyCompare')">
<case regex="true">
</case>
<case regex="false">
</case>
</switch>
Thanks,
Iqbal
On Fri, Nov 24, 2017 at 2:13 PM, Rukshan Premathunga <[email protected]>
wrote:
> Hi Thivya,
>
> You may be able to use script mediator[1]. You can perfume the string
> comparison in the script mediator and then use the filter mediator for the
> result.
>
> <script language="js">
> <![CDATA[
> var user = mc.getProperty("USER_NAME");
> var patient = mc.getProperty("PATIENT_ID");
> mc.setProperty("RESULT", user == patient);
> ]]>
> </script>
>
> <filter source="$ctx:RESULT" regex="true">
>
> <then>
> <loopback />
> </then>
> <else>
> </else>
>
> </filter>
>
> [1] https://docs.wso2.com/display/ESB500/Script+Mediator
>
> Thanks and Regards
>
> On Fri, Nov 24, 2017 at 10:20 AM, Thivya Mahenthirarasa <[email protected]>
> wrote:
>
>> Hi Dev,
>>
>> Requirement: I need to check a condition before loop back to out sequence
>> whether the USER_NAME and PATIENT_ID are equal.
>>
>> I'm using a filter in my in sequence.
>>
>> <filter xpath="get-property('USER_NAME') = get-property('PATIENT_ID')">
>> <then>
>> <loopback />
>> </then></filter>
>>
>>
>> I'm seeing always "evaluates to false and no else path - skipping child
>> mediators" in console even in the case of synapse properties USER_NAME and
>> PATIENT_ID are equal.
>>
>> Could anyone help?
>>
>>
>> Thanks,
>> Thivya
>>
>>
>> --
>>
>> *Thivya Mahenthirarasa*
>>
>> *Software Engineer -Support Team | WSO2*
>>
>>
>> *Email: [email protected] <[email protected]>*
>>
>> *Mobile: +94766461966 <+94%2076%20646%201966> <http://wso2.com/signature>*
>> *Web: http://wso2.com <http://wso2.com>*
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
> +94711822074 <+94%2071%20182%202074>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
Irham Iqbal
Software Engineer
WSO2
phone: +94 777888452
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev