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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to